From 9849c6f6d8e6539a990a4904b5d310daf55cf73a Mon Sep 17 00:00:00 2001 From: ucwong Date: Sat, 27 Jan 2024 22:32:08 +0800 Subject: [PATCH] deps --- common/big.go | 6 +- go.mod | 22 +- go.sum | 44 +- .../aws/aws-sdk-go-v2/config/CHANGELOG.md | 5 + .../config/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/internal/ini/CHANGELOG.md | 4 + .../internal/ini/go_module_metadata.go | 2 +- .../aws/aws-sdk-go-v2/internal/ini/strings.go | 4 - .../github.com/cockroachdb/pebble/ingest.go | 111 +- .../github.com/cockroachdb/pebble/internal.go | 2 + .../pebble/internal/base/internal.go | 3 + .../pebble/objstorage/objstorage.go | 3 + .../objstorage/objstorageprovider/provider.go | 8 +- .../objstorage/objstorageprovider/remote.go | 4 +- .../objstorageprovider/remote_backing.go | 24 +- vendor/github.com/cockroachdb/pebble/open.go | 2 +- vendor/github.com/google/uuid/CHANGELOG.md | 13 + vendor/github.com/google/uuid/hash.go | 6 + vendor/github.com/google/uuid/version7.go | 39 +- .../github.com/klauspost/compress/README.md | 14 +- .../compress/internal/race/norace.go | 13 + .../klauspost/compress/internal/race/race.go | 26 + .../klauspost/compress/s2/decode.go | 6 + .../klauspost/compress/s2/encode_amd64.go | 14 + .../klauspost/compress/s2/reader.go | 16 +- vendor/github.com/klauspost/compress/s2/s2.go | 4 + .../klauspost/compress/s2/writer.go | 14 +- vendor/github.com/klauspost/compress/s2sx.mod | 2 +- .../klauspost/compress/zstd/decodeheader.go | 56 +- .../compress/zstd/encoder_options.go | 6 +- .../klauspost/compress/zstd/frameenc.go | 2 +- .../compress/zstd/fse_decoder_generic.go | 11 +- .../klauspost/compress/zstd/seqdec_amd64.s | 136 +- vendor/github.com/rivo/uniseg/README.md | 2 +- .../github.com/rivo/uniseg/eastasianwidth.go | 78 +- .../rivo/uniseg/emojipresentation.go | 18 +- .../github.com/rivo/uniseg/gen_breaktest.go | 10 +- .../github.com/rivo/uniseg/gen_properties.go | 13 +- .../rivo/uniseg/graphemeproperties.go | 58 +- .../github.com/rivo/uniseg/graphemerules.go | 2 +- vendor/github.com/rivo/uniseg/line.go | 6 +- .../github.com/rivo/uniseg/lineproperties.go | 109 +- vendor/github.com/rivo/uniseg/linerules.go | 2 +- .../rivo/uniseg/sentenceproperties.go | 54 +- vendor/github.com/rivo/uniseg/width.go | 7 + .../github.com/rivo/uniseg/wordproperties.go | 71 +- vendor/github.com/rivo/uniseg/wordrules.go | 4 +- vendor/modernc.org/libc/capi_illumos_amd64.go | 528 ++ .../libc/errno/capi_illumos_amd64.go | 5 + .../libc/errno/capi_linux_loong64.go | 2 +- .../libc/errno/errno_illumos_amd64.go | 167 + .../libc/errno/errno_linux_loong64.go | 311 +- .../libc/fcntl/capi_illumos_amd64.go | 5 + .../libc/fcntl/capi_linux_loong64.go | 2 +- .../libc/fcntl/fcntl_illumos_amd64.go | 3242 ++++++++ .../libc/fcntl/fcntl_linux_loong64.go | 697 +- .../libc/fts/capi_illumos_amd64.go | 5 + .../libc/fts/capi_linux_loong64.go | 2 +- .../modernc.org/libc/fts/fts_illumos_amd64.go | 3038 +++++++ .../modernc.org/libc/fts/fts_linux_loong64.go | 938 ++- .../libc/grp/capi_illumos_amd64.go | 5 + .../libc/grp/capi_linux_loong64.go | 2 +- .../modernc.org/libc/grp/grp_illumos_amd64.go | 3181 ++++++++ .../modernc.org/libc/grp/grp_linux_loong64.go | 349 +- vendor/modernc.org/libc/ioutil_illumos.go | 70 + .../libc/langinfo/capi_illumos_amd64.go | 5 + .../libc/langinfo/capi_linux_loong64.go | 2 +- .../libc/langinfo/langinfo_illumos_amd64.go | 834 ++ .../libc/langinfo/langinfo_linux_loong64.go | 241 +- vendor/modernc.org/libc/libc_illumos.go | 2104 +++++ vendor/modernc.org/libc/libc_illumos_amd64.go | 794 ++ vendor/modernc.org/libc/libc_linux_loong64.go | 6 +- vendor/modernc.org/libc/libc_unix.go | 14 - vendor/modernc.org/libc/libc_unix1.go | 27 + vendor/modernc.org/libc/libc_unix2.go | 26 + vendor/modernc.org/libc/libc_windows.go | 4 +- .../libc/limits/capi_illumos_amd64.go | 5 + .../libc/limits/capi_linux_loong64.go | 2 +- .../libc/limits/limits_illumos_amd64.go | 1234 +++ .../libc/limits/limits_linux_loong64.go | 310 +- vendor/modernc.org/libc/musl_illumos_amd64.go | 7210 +++++++++++++++++ .../libc/netdb/capi_illumos_amd64.go | 5 + .../libc/netdb/capi_linux_loong64.go | 2 +- .../libc/netdb/netdb_illumos_amd64.go | 5631 +++++++++++++ .../libc/netdb/netdb_linux_loong64.go | 1504 ++-- .../libc/netinet/in/capi_illumos_amd64.go | 5 + .../libc/netinet/in/capi_linux_loong64.go | 2 +- .../libc/netinet/in/in_illumos_amd64.go | 4038 +++++++++ .../libc/netinet/in/in_linux_loong64.go | 1870 +++-- .../libc/poll/capi_illumos_amd64.go | 5 + .../libc/poll/capi_linux_loong64.go | 2 +- .../libc/poll/poll_illumos_amd64.go | 4081 ++++++++++ .../libc/poll/poll_linux_loong64.go | 236 +- .../libc/pthread/capi_illumos_amd64.go | 5 + .../libc/pthread/capi_linux_loong64.go | 2 +- .../libc/pthread/pthread_illumos_amd64.go | 3059 +++++++ .../libc/pthread/pthread_linux_loong64.go | 845 +- .../libc/pwd/capi_illumos_amd64.go | 5 + .../libc/pwd/capi_linux_loong64.go | 2 +- .../modernc.org/libc/pwd/pwd_illumos_amd64.go | 3188 ++++++++ .../modernc.org/libc/pwd/pwd_linux_loong64.go | 353 +- .../libc/signal/capi_illumos_amd64.go | 5 + .../libc/signal/capi_linux_loong64.go | 2 +- .../libc/signal/more_illumos_amd64.go | 12 + .../libc/signal/signal_illumos_amd64.go | 4146 ++++++++++ .../libc/signal/signal_linux_loong64.go | 1351 +-- .../libc/stdio/capi_illumos_amd64.go | 5 + .../libc/stdio/capi_linux_loong64.go | 2 +- .../libc/stdio/stdio_illumos_amd64.go | 1020 +++ .../libc/stdio/stdio_linux_loong64.go | 256 +- .../libc/stdlib/capi_illumos_amd64.go | 5 + .../libc/stdlib/capi_linux_loong64.go | 2 +- .../libc/stdlib/stdlib_illumos_amd64.go | 1092 +++ .../libc/stdlib/stdlib_linux_loong64.go | 670 +- .../libc/sys/socket/capi_illumos_amd64.go | 5 + .../libc/sys/socket/capi_linux_loong64.go | 2 +- .../libc/sys/socket/socket_illumos_amd64.go | 5226 ++++++++++++ .../libc/sys/socket/socket_linux_loong64.go | 1068 +-- .../libc/sys/stat/capi_illumos_amd64.go | 5 + .../libc/sys/stat/capi_linux_loong64.go | 2 +- .../libc/sys/stat/stat_illumos_amd64.go | 2941 +++++++ .../libc/sys/stat/stat_linux_loong64.go | 543 +- .../libc/sys/types/capi_illumos_amd64.go | 5 + .../libc/sys/types/capi_linux_loong64.go | 2 +- .../libc/sys/types/types_illumos_amd64.go | 2693 ++++++ .../libc/sys/types/types_linux_loong64.go | 667 +- .../libc/termios/capi_illumos_amd64.go | 5 + .../libc/termios/capi_linux_loong64.go | 2 +- .../libc/termios/termios_illumos_amd64.go | 2689 ++++++ .../libc/termios/termios_linux_loong64.go | 680 +- .../libc/time/capi_illumos_amd64.go | 5 + .../libc/time/capi_linux_loong64.go | 2 +- .../libc/time/time_illumos_amd64.go | 1468 ++++ .../modernc.org/libc/time/time_linux_amd64.go | 2 +- .../libc/time/time_linux_loong64.go | 261 +- .../libc/time/time_linux_mips64le.go | 2 +- .../libc/unistd/capi_illumos_amd64.go | 5 + .../libc/unistd/capi_linux_loong64.go | 2 +- .../libc/unistd/unistd_illumos_amd64.go | 3180 ++++++++ .../libc/unistd/unistd_linux_loong64.go | 617 +- .../libc/utime/capi_illumos_amd64.go | 5 + .../libc/utime/capi_linux_loong64.go | 2 +- .../libc/utime/utime_illumos_amd64.go | 2801 +++++++ .../libc/utime/utime_linux_loong64.go | 327 +- .../libc/uuid/uuid/capi_illumos_amd64.go | 5 + .../libc/uuid/uuid/uuid_illumos_amd64.go | 2967 +++++++ .../libc/wctype/capi_illumos_amd64.go | 5 + .../libc/wctype/capi_linux_loong64.go | 2 +- .../libc/wctype/wctype_illumos_amd64.go | 1763 ++++ .../libc/wctype/wctype_linux_loong64.go | 352 +- vendor/modules.txt | 23 +- 151 files changed, 84176 insertions(+), 5988 deletions(-) create mode 100644 vendor/github.com/klauspost/compress/internal/race/norace.go create mode 100644 vendor/github.com/klauspost/compress/internal/race/race.go create mode 100644 vendor/modernc.org/libc/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/errno/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/errno/errno_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/fcntl/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/fcntl/fcntl_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/fts/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/fts/fts_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/grp/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/grp/grp_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/ioutil_illumos.go create mode 100644 vendor/modernc.org/libc/langinfo/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/langinfo/langinfo_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/libc_illumos.go create mode 100644 vendor/modernc.org/libc/libc_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/libc_unix1.go create mode 100644 vendor/modernc.org/libc/libc_unix2.go create mode 100644 vendor/modernc.org/libc/limits/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/limits/limits_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/musl_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/netdb/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/netdb/netdb_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/netinet/in/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/netinet/in/in_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/poll/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/poll/poll_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/pthread/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/pthread/pthread_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/pwd/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/pwd/pwd_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/signal/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/signal/more_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/signal/signal_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/stdio/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/stdio/stdio_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/stdlib/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/stdlib/stdlib_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/sys/socket/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/sys/socket/socket_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/sys/stat/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/sys/stat/stat_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/sys/types/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/sys/types/types_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/termios/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/termios/termios_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/time/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/time/time_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/unistd/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/unistd/unistd_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/utime/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/utime/utime_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/uuid/uuid/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/uuid/uuid/uuid_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/wctype/capi_illumos_amd64.go create mode 100644 vendor/modernc.org/libc/wctype/wctype_illumos_amd64.go diff --git a/common/big.go b/common/big.go index 87cef0f34d..488d82c368 100644 --- a/common/big.go +++ b/common/big.go @@ -16,7 +16,10 @@ package common -import "math/big" +import ( + "github.com/holiman/uint256" + "math/big" +) // Common big integers often used var ( @@ -36,6 +39,7 @@ var ( Big256 = big.NewInt(256) Big257 = big.NewInt(257) MaxBig = String2Big("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff") + U2560 = uint256.NewInt(0) ) // Big pow diff --git a/go.mod b/go.mod index 14f613827e..a652fed654 100644 --- a/go.mod +++ b/go.mod @@ -6,18 +6,18 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1 github.com/CortexFoundation/inference v1.0.2-0.20230307032835-9197d586a4e8 github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66 - github.com/CortexFoundation/torrentfs v1.0.59-0.20240122113806-d1bfa0497926 + github.com/CortexFoundation/torrentfs v1.0.59-0.20240127141413-4bf19d565523 github.com/VictoriaMetrics/fastcache v1.12.2 github.com/arsham/figurine v1.3.0 github.com/aws/aws-sdk-go-v2 v1.24.1 - github.com/aws/aws-sdk-go-v2/config v1.26.5 + github.com/aws/aws-sdk-go-v2/config v1.26.6 github.com/aws/aws-sdk-go-v2/credentials v1.16.16 github.com/aws/aws-sdk-go-v2/service/route53 v1.37.0 github.com/btcsuite/btcd/btcec/v2 v2.3.2 github.com/cespare/cp v1.1.1 github.com/charmbracelet/bubbletea v0.25.0 github.com/cloudflare/cloudflare-go v0.86.0 - github.com/cockroachdb/pebble v0.0.0-20240119213229-5b092519dc3f + github.com/cockroachdb/pebble v0.0.0-20240123194302-5b280af78f31 github.com/consensys/gnark-crypto v0.12.1 github.com/crate-crypto/go-kzg-4844 v0.7.0 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc @@ -33,7 +33,7 @@ require ( github.com/gofrs/flock v0.8.1 github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb github.com/google/gofuzz v1.2.1-0.20210524182514-9eed411d8615 - github.com/google/uuid v1.5.0 + github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.2-0.20231113005423-6f5d2139f4b9 github.com/hashicorp/golang-lru v1.0.2 github.com/holiman/bloomfilter/v2 v2.0.3 @@ -83,7 +83,7 @@ require ( github.com/CortexFoundation/robot v1.0.7-0.20240101144533-02756bceae73 // indirect github.com/CortexFoundation/wormhole v0.0.2-0.20231221155549-5c938553b5fc // indirect github.com/DataDog/zstd v1.5.6-0.20230622172052-ea68dcab66c0 // indirect - github.com/RoaringBitmap/roaring v1.7.0 // indirect + github.com/RoaringBitmap/roaring v1.8.0 // indirect github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 // indirect github.com/alecthomas/atomic v0.1.0-alpha2 // indirect github.com/anacrolix/chansync v0.4.0 // indirect @@ -109,7 +109,7 @@ require ( github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.18.7 // indirect @@ -158,7 +158,7 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/flatbuffers v23.5.26+incompatible // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 // indirect + github.com/google/pprof v0.0.0-20240125082051-42cd04596328 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.5 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect @@ -166,7 +166,7 @@ require ( github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf // indirect github.com/jedib0t/go-pretty/v6 v6.5.3 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/klauspost/compress v1.17.4 // indirect + github.com/klauspost/compress v1.17.5 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -205,7 +205,7 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect - github.com/rivo/uniseg v0.4.4 // indirect + github.com/rivo/uniseg v0.4.5 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect @@ -217,7 +217,7 @@ require ( github.com/tklauser/numcpus v0.7.0 // indirect github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd // indirect github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb // indirect - github.com/ucwong/golang-kv v1.0.24-0.20240119222541-2287e2d1014e // indirect + github.com/ucwong/golang-kv v1.0.24-0.20240123222739-ef750e9bde39 // indirect github.com/ucwong/shard v1.0.1-0.20231225143310-3022d14f9c3e // indirect github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect github.com/xujiajun/mmap-go v1.0.1 // indirect @@ -233,7 +233,7 @@ require ( golang.org/x/net v0.20.0 // indirect golang.org/x/term v0.16.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - modernc.org/libc v1.40.6 // indirect + modernc.org/libc v1.40.7 // indirect modernc.org/mathutil v1.6.0 // indirect modernc.org/memory v1.7.2 // indirect modernc.org/sqlite v1.28.0 // indirect diff --git a/go.sum b/go.sum index 1f56d34734..1851327c45 100644 --- a/go.sum +++ b/go.sum @@ -68,8 +68,8 @@ github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66/go.mod h1: github.com/CortexFoundation/torrentfs v1.0.13-0.20200623060705-ce027f43f2f8/go.mod h1:Ma+tGhPPvz4CEZHaqEJQMOEGOfHeQBiAoNd1zyc/w3Q= github.com/CortexFoundation/torrentfs v1.0.14-0.20200703071639-3fcabcabf274/go.mod h1:qnb3YlIJmuetVBtC6Lsejr0Xru+1DNmDCdTqnwy7lhk= github.com/CortexFoundation/torrentfs v1.0.20-0.20200810031954-d36d26f82fcc/go.mod h1:N5BsicP5ynjXIi/Npl/SRzlJ630n1PJV2sRj0Z0t2HA= -github.com/CortexFoundation/torrentfs v1.0.59-0.20240122113806-d1bfa0497926 h1:GmknsrJrIaTrFMkWJp1ThMO66Fd837v11MGdf5JkGuE= -github.com/CortexFoundation/torrentfs v1.0.59-0.20240122113806-d1bfa0497926/go.mod h1:Um2smAm2+e9fuXZOsb7DFfM9zyZktPemAPMxMTIgrys= +github.com/CortexFoundation/torrentfs v1.0.59-0.20240127141413-4bf19d565523 h1:3Y3KgtEbSp5faqd7x85i6egyWnvZCoE+yft7qUVaZxQ= +github.com/CortexFoundation/torrentfs v1.0.59-0.20240127141413-4bf19d565523/go.mod h1:mIgOgma2+ZsDyew1fhZWHOcXJF5bvA5cy1KrzRLi+cA= github.com/CortexFoundation/wormhole v0.0.2-0.20231221155549-5c938553b5fc h1:LkbBJvvbfraAg/joFxPZtDvmdrjuTqPfbGhdnrEq7GM= github.com/CortexFoundation/wormhole v0.0.2-0.20231221155549-5c938553b5fc/go.mod h1:ipzmPabDgzYKUbXkGVe2gTkBEp+MsDx6pXGiuYzmP6s= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= @@ -84,8 +84,8 @@ github.com/RoaringBitmap/roaring v0.4.17/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrX github.com/RoaringBitmap/roaring v0.4.18/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrXIr8KVNvRsDi1NI= github.com/RoaringBitmap/roaring v0.4.21/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= -github.com/RoaringBitmap/roaring v1.7.0 h1:OZF303tJCER1Tj3x+aArx/S5X7hrT186ri6JjrGvG68= -github.com/RoaringBitmap/roaring v1.7.0/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= +github.com/RoaringBitmap/roaring v1.8.0 h1:h3Tbzc/4K7sW3sRMlBdOIW77x9rikkqvOgU/j+ofkn0= +github.com/RoaringBitmap/roaring v1.8.0/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.26.1/go.mod h1:NbSGBSSndYaIhRcBtY9V0U7AyH+x71bG668AuWys/yU= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -257,8 +257,8 @@ github.com/aws/aws-sdk-go v1.31.0/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.24.1 h1:xAojnj+ktS95YZlDf0zxWBkbFtymPeDP+rvUQIH3uAU= github.com/aws/aws-sdk-go-v2 v1.24.1/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4= -github.com/aws/aws-sdk-go-v2/config v1.26.5 h1:lodGSevz7d+kkFJodfauThRxK9mdJbyutUxGq1NNhvw= -github.com/aws/aws-sdk-go-v2/config v1.26.5/go.mod h1:DxHrz6diQJOc9EwDslVRh84VjjrE17g+pVZXUeSxaDU= +github.com/aws/aws-sdk-go-v2/config v1.26.6 h1:Z/7w9bUqlRI0FFQpetVuFYEsjzE3h7fpU6HuGmfPL/o= +github.com/aws/aws-sdk-go-v2/config v1.26.6/go.mod h1:uKU6cnDmYCvJ+pxO9S4cWDb2yWWIH5hra+32hVh1MI4= github.com/aws/aws-sdk-go-v2/credentials v1.16.16 h1:8q6Rliyv0aUFAVtzaldUEcS+T5gbadPbWdV1WcAddK8= github.com/aws/aws-sdk-go-v2/credentials v1.16.16/go.mod h1:UHVZrdUsv63hPXFo1H7c5fEneoVo9UXiz36QG1GEPi0= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 h1:c5I5iH+DZcH3xOIMlz3/tCKJDaHFwYEmxvlh2fAcFo8= @@ -267,8 +267,8 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 h1:vF+Zgd9s+H4vOXd5B github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10/go.mod h1:6BkRjejp/GR4411UGqkX8+wFMbFbqsUIimfK4XjOKR4= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 h1:nYPe006ktcqUji8S2mqXf9c/7NdiKriOwMvWQHgYztw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10/go.mod h1:6UV4SZkVvmODfXKql4LCbaZUpF7HO2BX38FgBf9ZOLw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 h1:GrSw8s0Gs/5zZ0SX+gX4zQjRnRsMJDJ2sLur1gRBhEM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 h1:n3GDfwqF2tzEkXlv5cuy4iy7LpKDtqDMcNLfZDu9rls= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4/go.mod h1:2aGXHFmbInwgP9ZfpmdIfOELL79zhdNYNmReK8qDfdQ= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 h1:DBYTXwIGQSGs9w4jKm60F5dmCQ3EEruxdc0MFh+3EY4= @@ -357,8 +357,8 @@ github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZe github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895 h1:XANOgPYtvELQ/h4IrmPAohXqe2pWA8Bwhejr3VQoZsA= github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895/go.mod h1:aPd7gM9ov9M8v32Yy5NJrDyOcD8z642dqs+F0CeNXfA= -github.com/cockroachdb/pebble v0.0.0-20240119213229-5b092519dc3f h1:Gcl5b42jU56MEC7ySPjlEEmwPn7JqB29svFBBEJKdME= -github.com/cockroachdb/pebble v0.0.0-20240119213229-5b092519dc3f/go.mod h1:BHuaMa/lK7fUe75BlsteiiTu8ptIG+qSAuDtGMArP18= +github.com/cockroachdb/pebble v0.0.0-20240123194302-5b280af78f31 h1:wtLGmUF5ww2DdU+r94i8XaZ6Hyf5KT3Fcvpfg0QxCJY= +github.com/cockroachdb/pebble v0.0.0-20240123194302-5b280af78f31/go.mod h1:BHuaMa/lK7fUe75BlsteiiTu8ptIG+qSAuDtGMArP18= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= @@ -621,16 +621,16 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= -github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 h1:WzfWbQz/Ze8v6l++GGbGNFZnUShVpP/0xffCPLL+ax8= -github.com/google/pprof v0.0.0-20240117000934-35fc243c5815/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240125082051-42cd04596328 h1:oI+lCI2DY1BsRrdzMJBhIMxBBdlZJl31YNQC11EiyvA= +github.com/google/pprof v0.0.0-20240125082051-42cd04596328/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -774,8 +774,8 @@ github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6 github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.8/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.1/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.5 h1:d4vBd+7CHydUqpFBgUEKkSdtSugf9YFmSkvUYPquI5E= +github.com/klauspost/compress v1.17.5/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= @@ -1096,8 +1096,8 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qq github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.5 h1:I1LlsYBcfG4ggKsNaL6bi8pL7Z8SizVPVBrh3Y8F/BA= +github.com/rivo/uniseg v0.4.5/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= @@ -1242,8 +1242,8 @@ github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd h1:gBtlvLAsgLk+ github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd/go.mod h1:ddwX+NCjMZPdpzcGh1fcEbNTUTCtKgt2hC2rqvmLKgA= github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb h1:dVZH3AH9f7zB3VBmsjn25B7lfcAyMP4QxdFYTrfj7tg= github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb/go.mod h1:3yswsBsVuwsOjDvFfC5Na9XSEf4HC7mj3W3g6jvSY/s= -github.com/ucwong/golang-kv v1.0.24-0.20240119222541-2287e2d1014e h1:wgrGRNjCVrfJrkARRg1R03uddTHiTr5oIoQXGd3Epq0= -github.com/ucwong/golang-kv v1.0.24-0.20240119222541-2287e2d1014e/go.mod h1:MXJ82fsE91tbsgqWqdv6z/DwpwabcNa31taWJqYCSwk= +github.com/ucwong/golang-kv v1.0.24-0.20240123222739-ef750e9bde39 h1:KPCSgOAv9BkbPFstvGthukhSPBoG01JDK/Vmk6zaETA= +github.com/ucwong/golang-kv v1.0.24-0.20240123222739-ef750e9bde39/go.mod h1:kjcnK5dlWnps58dYfjtz39jta0LuLTlmch/m6Lk6wQg= github.com/ucwong/golang-set v1.8.1-0.20200419153428-d7b0b1ac2d43/go.mod h1:xu0FaiQFGbBcFZj2o7udZ5rbA8jRTsv47hkPoG5qQNM= github.com/ucwong/goleveldb v1.0.3-0.20200508074755-578cba616f37/go.mod h1:dgJUTtDxq/ne6/JzZhHzF24OL/uqILz9IWk8HmT4V2g= github.com/ucwong/goleveldb v1.0.3-0.20200618184106-f1c6bc3a428b/go.mod h1:7Sq6w7AfEZuB/a6mrlvHCSXCSkqojCMMrM3Ei12QAT0= @@ -1784,8 +1784,8 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -modernc.org/libc v1.40.6 h1:141JHq3SjhOOCjECBgD4K8VgTFOy19CnHwroC08DAig= -modernc.org/libc v1.40.6/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE= +modernc.org/libc v1.40.7 h1:oeLS0G067ZqUu+v143Dqad0btMfKmNS7SuOsnkq0Ysg= +modernc.org/libc v1.40.7/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index 5243736788..31feb8b1c4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,8 @@ +# v1.26.6 (2024-01-22) + +* **Bug Fix**: Remove invalid escaping of shared config values. All values in the shared config file will now be interpreted literally, save for fully-quoted strings which are unwrapped for legacy reasons. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.26.5 (2024-01-18) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index 6fc8acb09b..51f6e33201 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.26.5" +const goModuleVersion = "1.26.6" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md index adbbf4adcf..9a0b5e0377 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.7.3 (2024-01-22) + +* **Bug Fix**: Remove invalid escaping of shared config values. All values in the shared config file will now be interpreted literally, save for fully-quoted strings which are unwrapped for legacy reasons. + # v1.7.2 (2023-12-08) * **Bug Fix**: Correct loading of [services *] sections into shared config. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go index f0673f3a02..1d68f8346d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go @@ -3,4 +3,4 @@ package ini // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.7.2" +const goModuleVersion = "1.7.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/strings.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/strings.go index 661588c227..ed77d08351 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/strings.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/strings.go @@ -67,12 +67,8 @@ func unquote(s string) string { // applies various legacy conversions to property values: // - remote wrapping single/doublequotes -// - expand escaped quote and newline sequences func legacyStrconv(s string) string { s = unquote(s) - s = strings.ReplaceAll(s, `\"`, `"`) - s = strings.ReplaceAll(s, `\'`, `'`) - s = strings.ReplaceAll(s, `\n`, "\n") return s } diff --git a/vendor/github.com/cockroachdb/pebble/ingest.go b/vendor/github.com/cockroachdb/pebble/ingest.go index 10513c07e1..05248d5158 100644 --- a/vendor/github.com/cockroachdb/pebble/ingest.go +++ b/vendor/github.com/cockroachdb/pebble/ingest.go @@ -99,7 +99,7 @@ func ingestValidateKey(opts *Options, key *InternalKey) error { // ingestSynthesizeShared constructs a fileMetadata for one shared sstable owned // or shared by another node. func ingestSynthesizeShared( - opts *Options, sm SharedSSTMeta, fileNum base.DiskFileNum, + opts *Options, sm SharedSSTMeta, fileNum base.FileNum, ) (*fileMetadata, error) { if sm.Size == 0 { // Disallow 0 file sizes @@ -108,14 +108,14 @@ func ingestSynthesizeShared( // Don't load table stats. Doing a round trip to shared storage, one SST // at a time is not worth it as it slows down ingestion. meta := &fileMetadata{ - // For simplicity, we use the same number for both the FileNum and the - // DiskFileNum (even though this is a virtual sstable). - FileNum: FileNum(fileNum), + FileNum: fileNum, CreationTime: time.Now().Unix(), Virtual: true, Size: sm.Size, } - meta.InitProviderBacking(fileNum) + // For simplicity, we use the same number for both the FileNum and the + // DiskFileNum (even though this is a virtual sstable). + meta.InitProviderBacking(base.DiskFileNum(fileNum)) // Set the underlying FileBacking's size to the same size as the virtualized // view of the sstable. This ensures that we don't over-prioritize this // sstable for compaction just yet, as we do not have a clear sense of what @@ -166,11 +166,7 @@ func ingestSynthesizeShared( // ingestLoad1External loads the fileMetadata for one external sstable. // Sequence number and target level calculation happens during prepare/apply. func ingestLoad1External( - opts *Options, - e ExternalFile, - fileNum base.DiskFileNum, - objProvider objstorage.Provider, - jobID int, + opts *Options, e ExternalFile, fileNum base.FileNum, objProvider objstorage.Provider, jobID int, ) (*fileMetadata, error) { if e.Size == 0 { // Disallow 0 file sizes @@ -182,36 +178,15 @@ func ingestLoad1External( // Don't load table stats. Doing a round trip to shared storage, one SST // at a time is not worth it as it slows down ingestion. meta := &fileMetadata{ - // For simplicity, we use the same number for both the FileNum and the - // DiskFileNum (even though this is a virtual sstable). - FileNum: FileNum(fileNum), + FileNum: fileNum, CreationTime: time.Now().Unix(), Virtual: true, Size: e.Size, } - meta.InitProviderBacking(fileNum) + // For simplicity, we use the same number for both the FileNum and the + // DiskFileNum (even though this is a virtual sstable). + meta.InitProviderBacking(base.DiskFileNum(fileNum)) - // Try to resolve a reference to the external file. - backing, err := objProvider.CreateExternalObjectBacking(e.Locator, e.ObjName) - if err != nil { - return nil, err - } - metas, err := objProvider.AttachRemoteObjects([]objstorage.RemoteObjectToAttach{{ - FileNum: fileNum, - FileType: fileTypeTable, - Backing: backing, - }}) - if err != nil { - return nil, err - } - if opts.EventListener.TableCreated != nil { - opts.EventListener.TableCreated(TableCreateInfo{ - JobID: jobID, - Reason: "ingesting", - Path: objProvider.Path(metas[0]), - FileNum: fileNum, - }) - } // In the name of keeping this ingestion as fast as possible, we avoid // *all* existence checks and synthesize a file metadata with smallest/largest // keys that overlap whatever the passed-in span was. @@ -220,12 +195,18 @@ func ingestLoad1External( largestCopy := make([]byte, len(e.LargestUserKey)) copy(largestCopy, e.LargestUserKey) if e.HasPointKey { - meta.ExtendPointKeyBounds(opts.Comparer.Compare, base.MakeInternalKey(smallestCopy, 0, InternalKeyKindMax), - base.MakeRangeDeleteSentinelKey(largestCopy)) + meta.ExtendPointKeyBounds( + opts.Comparer.Compare, + base.MakeInternalKey(smallestCopy, 0, InternalKeyKindMax), + base.MakeRangeDeleteSentinelKey(largestCopy), + ) } if e.HasRangeKey { - meta.ExtendRangeKeyBounds(opts.Comparer.Compare, base.MakeInternalKey(smallestCopy, 0, InternalKeyKindRangeKeySet), - base.MakeExclusiveSentinelKey(InternalKeyKindRangeKeyDelete, largestCopy)) + meta.ExtendRangeKeyBounds( + opts.Comparer.Compare, + base.MakeInternalKey(smallestCopy, 0, InternalKeyKindRangeKeyMax), + base.MakeExclusiveSentinelKey(InternalKeyKindRangeKeyMin, largestCopy), + ) } // Set the underlying FileBacking's size to the same size as the virtualized @@ -254,9 +235,9 @@ func ingestLoad1( fmv FormatMajorVersion, readable objstorage.Readable, cacheID uint64, - fileNum base.DiskFileNum, + fileNum base.FileNum, ) (*fileMetadata, error) { - cacheOpts := private.SSTableCacheOpts(cacheID, fileNum).(sstable.ReaderOption) + cacheOpts := private.SSTableCacheOpts(cacheID, base.PhysicalTableDiskFileNum(fileNum)).(sstable.ReaderOption) r, err := sstable.NewReader(readable, opts.MakeReaderOptions(), cacheOpts) if err != nil { return nil, err @@ -276,7 +257,7 @@ func ingestLoad1( } meta := &fileMetadata{} - meta.FileNum = base.PhysicalTableFileNum(fileNum) + meta.FileNum = fileNum meta.Size = uint64(readable.Size()) meta.CreationTime = time.Now().Unix() meta.InitPhysicalBacking() @@ -407,7 +388,7 @@ func ingestLoad( shared []SharedSSTMeta, external []ExternalFile, cacheID uint64, - pending []base.DiskFileNum, + pending []base.FileNum, objProvider objstorage.Provider, jobID int, ) (ingestLoadResult, error) { @@ -577,6 +558,7 @@ func ingestLink( objProvider objstorage.Provider, lr ingestLoadResult, shared []SharedSSTMeta, + external []ExternalFile, ) error { for i := range lr.localPaths { objMeta, err := objProvider.LinkOrCopyFromLocal( @@ -598,23 +580,37 @@ func ingestLink( }) } } - sharedObjs := make([]objstorage.RemoteObjectToAttach, 0, len(shared)) + remoteObjs := make([]objstorage.RemoteObjectToAttach, 0, len(shared)+len(external)) for i := range shared { backing, err := shared[i].Backing.Get() if err != nil { return err } - sharedObjs = append(sharedObjs, objstorage.RemoteObjectToAttach{ + remoteObjs = append(remoteObjs, objstorage.RemoteObjectToAttach{ FileNum: lr.sharedMeta[i].FileBacking.DiskFileNum, FileType: fileTypeTable, Backing: backing, }) } - sharedObjMetas, err := objProvider.AttachRemoteObjects(sharedObjs) + for i := range external { + // Try to resolve a reference to the external file. + backing, err := objProvider.CreateExternalObjectBacking(external[i].Locator, external[i].ObjName) + if err != nil { + return err + } + remoteObjs = append(remoteObjs, objstorage.RemoteObjectToAttach{ + FileNum: lr.externalMeta[i].FileBacking.DiskFileNum, + FileType: fileTypeTable, + Backing: backing, + }) + } + + remoteObjMetas, err := objProvider.AttachRemoteObjects(remoteObjs) if err != nil { return err } - for i := range sharedObjMetas { + + for i := range shared { // One corner case around file sizes we need to be mindful of, is that // if one of the shareObjs was initially created by us (and has boomeranged // back from another node), we'll need to update the FileBacking's size @@ -622,24 +618,25 @@ func ingestLink( // open the db again after a crash/restart (see checkConsistency in open.go), // plus it more accurately allows us to prioritize compactions of files // that were originally created by us. - if sharedObjMetas[i].IsShared() && !objProvider.IsSharedForeign(sharedObjMetas[i]) { - size, err := objProvider.Size(sharedObjMetas[i]) + if remoteObjMetas[i].IsShared() && !objProvider.IsSharedForeign(remoteObjMetas[i]) { + size, err := objProvider.Size(remoteObjMetas[i]) if err != nil { return err } lr.sharedMeta[i].FileBacking.Size = uint64(size) } - if opts.EventListener.TableCreated != nil { + } + + if opts.EventListener.TableCreated != nil { + for i := range remoteObjMetas { opts.EventListener.TableCreated(TableCreateInfo{ JobID: jobID, Reason: "ingesting", - Path: objProvider.Path(sharedObjMetas[i]), - FileNum: sharedObjMetas[i].DiskFileNum, + Path: objProvider.Path(remoteObjMetas[i]), + FileNum: remoteObjMetas[i].DiskFileNum, }) } } - // We do not need to do anything about lr.externalMetas. Those were already - // linked in ingestLoad. return nil } @@ -1326,9 +1323,9 @@ func (d *DB) ingest( // ordering. The sorting of L0 tables by sequence number avoids relying on // that (busted) invariant. d.mu.Lock() - pendingOutputs := make([]base.DiskFileNum, len(paths)+len(shared)+len(external)) + pendingOutputs := make([]base.FileNum, len(paths)+len(shared)+len(external)) for i := 0; i < len(paths)+len(shared)+len(external); i++ { - pendingOutputs[i] = d.mu.versions.getNextDiskFileNum() + pendingOutputs[i] = d.mu.versions.getNextFileNum() } jobID := d.mu.nextJobID @@ -1357,7 +1354,7 @@ func (d *DB) ingest( // (e.g. because the files reside on a different filesystem), ingestLink will // fall back to copying, and if that fails we undo our work and return an // error. - if err := ingestLink(jobID, d.opts, d.objProvider, loadResult, shared); err != nil { + if err := ingestLink(jobID, d.opts, d.objProvider, loadResult, shared, external); err != nil { return IngestOperationStats{}, err } diff --git a/vendor/github.com/cockroachdb/pebble/internal.go b/vendor/github.com/cockroachdb/pebble/internal.go index 61a4284dae..f60df91de8 100644 --- a/vendor/github.com/cockroachdb/pebble/internal.go +++ b/vendor/github.com/cockroachdb/pebble/internal.go @@ -22,6 +22,8 @@ const ( InternalKeyKindRangeKeySet = base.InternalKeyKindRangeKeySet InternalKeyKindRangeKeyUnset = base.InternalKeyKindRangeKeyUnset InternalKeyKindRangeKeyDelete = base.InternalKeyKindRangeKeyDelete + InternalKeyKindRangeKeyMin = base.InternalKeyKindRangeKeyMin + InternalKeyKindRangeKeyMax = base.InternalKeyKindRangeKeyMax InternalKeyKindIngestSST = base.InternalKeyKindIngestSST InternalKeyKindDeleteSized = base.InternalKeyKindDeleteSized InternalKeyKindInvalid = base.InternalKeyKindInvalid diff --git a/vendor/github.com/cockroachdb/pebble/internal/base/internal.go b/vendor/github.com/cockroachdb/pebble/internal/base/internal.go index 576832a0f3..68cc334d18 100644 --- a/vendor/github.com/cockroachdb/pebble/internal/base/internal.go +++ b/vendor/github.com/cockroachdb/pebble/internal/base/internal.go @@ -80,6 +80,9 @@ const ( InternalKeyKindRangeKeyUnset InternalKeyKind = 20 InternalKeyKindRangeKeySet InternalKeyKind = 21 + InternalKeyKindRangeKeyMin InternalKeyKind = InternalKeyKindRangeKeyDelete + InternalKeyKindRangeKeyMax InternalKeyKind = InternalKeyKindRangeKeySet + // InternalKeyKindIngestSST is used to distinguish a batch that corresponds to // the WAL entry for ingested sstables that are added to the flushable // queue. This InternalKeyKind cannot appear, amongst other key kinds in a diff --git a/vendor/github.com/cockroachdb/pebble/objstorage/objstorage.go b/vendor/github.com/cockroachdb/pebble/objstorage/objstorage.go index 9805fb144e..6728b1d46b 100644 --- a/vendor/github.com/cockroachdb/pebble/objstorage/objstorage.go +++ b/vendor/github.com/cockroachdb/pebble/objstorage/objstorage.go @@ -287,6 +287,9 @@ type Provider interface { CreateExternalObjectBacking(locator remote.Locator, objName string) (RemoteObjectBacking, error) // AttachRemoteObjects registers existing remote objects with this provider. + // + // The objects are not guaranteed to be durable (accessible in case of + // crashes) until Sync is called. AttachRemoteObjects(objs []RemoteObjectToAttach) ([]ObjectMetadata, error) Close() error diff --git a/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/provider.go b/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/provider.go index bd6f2038b7..bc42d85351 100644 --- a/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/provider.go +++ b/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/provider.go @@ -456,11 +456,15 @@ func (p *provider) Metrics() sharedcache.Metrics { } func (p *provider) addMetadata(meta objstorage.ObjectMetadata) { + p.mu.Lock() + defer p.mu.Unlock() + p.addMetadataLocked(meta) +} + +func (p *provider) addMetadataLocked(meta objstorage.ObjectMetadata) { if invariants.Enabled { meta.AssertValid() } - p.mu.Lock() - defer p.mu.Unlock() p.mu.knownObjects[meta.DiskFileNum] = meta if meta.IsRemote() { p.mu.remote.catalogBatch.AddObject(remoteobjcat.RemoteObjectMetadata{ diff --git a/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/remote.go b/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/remote.go index 70fdfc78ec..dd1c99c675 100644 --- a/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/remote.go +++ b/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/remote.go @@ -126,9 +126,9 @@ func (p *provider) sharedClose() error { if p.st.Remote.StorageFactory == nil { return nil } - var err error + err := p.sharedSync() if p.remote.cache != nil { - err = p.remote.cache.Close() + err = firstError(err, p.remote.cache.Close()) p.remote.cache = nil } if p.remote.catalog != nil { diff --git a/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/remote_backing.go b/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/remote_backing.go index 8e184acc00..964104784f 100644 --- a/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/remote_backing.go +++ b/vendor/github.com/cockroachdb/pebble/objstorage/objstorageprovider/remote_backing.go @@ -12,7 +12,6 @@ import ( "github.com/cockroachdb/errors" "github.com/cockroachdb/pebble/internal/base" "github.com/cockroachdb/pebble/objstorage" - "github.com/cockroachdb/pebble/objstorage/objstorageprovider/remoteobjcat" "github.com/cockroachdb/pebble/objstorage/remote" ) @@ -271,25 +270,6 @@ func (p *provider) AttachRemoteObjects( } } - func() { - p.mu.Lock() - defer p.mu.Unlock() - for _, d := range decoded { - p.mu.remote.catalogBatch.AddObject(remoteobjcat.RemoteObjectMetadata{ - FileNum: d.meta.DiskFileNum, - FileType: d.meta.FileType, - CreatorID: d.meta.Remote.CreatorID, - CreatorFileNum: d.meta.Remote.CreatorFileNum, - CleanupMethod: d.meta.Remote.CleanupMethod, - Locator: d.meta.Remote.Locator, - CustomObjectName: d.meta.Remote.CustomObjectName, - }) - } - }() - if err := p.sharedSync(); err != nil { - return nil, err - } - metas := make([]objstorage.ObjectMetadata, len(decoded)) for i, d := range decoded { metas[i] = d.meta @@ -297,8 +277,8 @@ func (p *provider) AttachRemoteObjects( p.mu.Lock() defer p.mu.Unlock() - for _, meta := range metas { - p.mu.knownObjects[meta.DiskFileNum] = meta + for i := range metas { + p.addMetadataLocked(metas[i]) } return metas, nil } diff --git a/vendor/github.com/cockroachdb/pebble/open.go b/vendor/github.com/cockroachdb/pebble/open.go index 43a3f195c2..19f025988b 100644 --- a/vendor/github.com/cockroachdb/pebble/open.go +++ b/vendor/github.com/cockroachdb/pebble/open.go @@ -929,7 +929,7 @@ func (d *DB) replayWAL( } } // NB: ingestLoad1 will close readable. - meta[i], err = ingestLoad1(d.opts, d.FormatMajorVersion(), readable, d.cacheID, n) + meta[i], err = ingestLoad1(d.opts, d.FormatMajorVersion(), readable, d.cacheID, base.PhysicalTableFileNum(n)) if err != nil { return nil, 0, errors.Wrap(err, "pebble: error when loading flushable ingest files") } diff --git a/vendor/github.com/google/uuid/CHANGELOG.md b/vendor/github.com/google/uuid/CHANGELOG.md index c9fb829dc6..7ec5ac7ea9 100644 --- a/vendor/github.com/google/uuid/CHANGELOG.md +++ b/vendor/github.com/google/uuid/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.6.0](https://github.com/google/uuid/compare/v1.5.0...v1.6.0) (2024-01-16) + + +### Features + +* add Max UUID constant ([#149](https://github.com/google/uuid/issues/149)) ([c58770e](https://github.com/google/uuid/commit/c58770eb495f55fe2ced6284f93c5158a62e53e3)) + + +### Bug Fixes + +* fix typo in version 7 uuid documentation ([#153](https://github.com/google/uuid/issues/153)) ([016b199](https://github.com/google/uuid/commit/016b199544692f745ffc8867b914129ecb47ef06)) +* Monotonicity in UUIDv7 ([#150](https://github.com/google/uuid/issues/150)) ([a2b2b32](https://github.com/google/uuid/commit/a2b2b32373ff0b1a312b7fdf6d38a977099698a6)) + ## [1.5.0](https://github.com/google/uuid/compare/v1.4.0...v1.5.0) (2023-12-12) diff --git a/vendor/github.com/google/uuid/hash.go b/vendor/github.com/google/uuid/hash.go index b404f4bec2..dc60082d3b 100644 --- a/vendor/github.com/google/uuid/hash.go +++ b/vendor/github.com/google/uuid/hash.go @@ -17,6 +17,12 @@ var ( NameSpaceOID = Must(Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8")) NameSpaceX500 = Must(Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8")) Nil UUID // empty UUID, all zeros + + // The Max UUID is special form of UUID that is specified to have all 128 bits set to 1. + Max = UUID{ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + } ) // NewHash returns a new UUID derived from the hash of space concatenated with diff --git a/vendor/github.com/google/uuid/version7.go b/vendor/github.com/google/uuid/version7.go index ba9dd5eb68..3167b643d4 100644 --- a/vendor/github.com/google/uuid/version7.go +++ b/vendor/github.com/google/uuid/version7.go @@ -44,7 +44,7 @@ func NewV7FromReader(r io.Reader) (UUID, error) { // makeV7 fill 48 bits time (uuid[0] - uuid[5]), set version b0111 (uuid[6]) // uuid[8] already has the right version number (Variant is 10) -// see function NewV7 and NewV7FromReader +// see function NewV7 and NewV7FromReader func makeV7(uuid []byte) { /* 0 1 2 3 @@ -52,7 +52,7 @@ func makeV7(uuid []byte) { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | unix_ts_ms | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - | unix_ts_ms | ver | rand_a | + | unix_ts_ms | ver | rand_a (12 bit seq) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |var| rand_b | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -61,7 +61,7 @@ func makeV7(uuid []byte) { */ _ = uuid[15] // bounds check - t := timeNow().UnixMilli() + t, s := getV7Time() uuid[0] = byte(t >> 40) uuid[1] = byte(t >> 32) @@ -70,6 +70,35 @@ func makeV7(uuid []byte) { uuid[4] = byte(t >> 8) uuid[5] = byte(t) - uuid[6] = 0x70 | (uuid[6] & 0x0F) - // uuid[8] has already has right version + uuid[6] = 0x70 | (0x0F & byte(s>>8)) + uuid[7] = byte(s) +} + +// lastV7time is the last time we returned stored as: +// +// 52 bits of time in milliseconds since epoch +// 12 bits of (fractional nanoseconds) >> 8 +var lastV7time int64 + +const nanoPerMilli = 1000000 + +// getV7Time returns the time in milliseconds and nanoseconds / 256. +// The returned (milli << 12 + seq) is guarenteed to be greater than +// (milli << 12 + seq) returned by any previous call to getV7Time. +func getV7Time() (milli, seq int64) { + timeMu.Lock() + defer timeMu.Unlock() + + nano := timeNow().UnixNano() + milli = nano / nanoPerMilli + // Sequence number is between 0 and 3906 (nanoPerMilli>>8) + seq = (nano - milli*nanoPerMilli) >> 8 + now := milli<<12 + seq + if now <= lastV7time { + now = lastV7time + 1 + milli = now >> 12 + seq = now & 0xfff + } + lastV7time = now + return milli, seq } diff --git a/vendor/github.com/klauspost/compress/README.md b/vendor/github.com/klauspost/compress/README.md index 7e83f583c0..c918f11d8b 100644 --- a/vendor/github.com/klauspost/compress/README.md +++ b/vendor/github.com/klauspost/compress/README.md @@ -16,6 +16,18 @@ This package provides various compression algorithms. # changelog +* Dec 1st, 2023 - [v1.17.4](https://github.com/klauspost/compress/releases/tag/v1.17.4) + * huff0: Speed up symbol counting by @greatroar in https://github.com/klauspost/compress/pull/887 + * huff0: Remove byteReader by @greatroar in https://github.com/klauspost/compress/pull/886 + * gzhttp: Allow overriding decompression on transport https://github.com/klauspost/compress/pull/892 + * gzhttp: Clamp compression level https://github.com/klauspost/compress/pull/890 + * gzip: Error out if reserved bits are set https://github.com/klauspost/compress/pull/891 + +* Nov 15th, 2023 - [v1.17.3](https://github.com/klauspost/compress/releases/tag/v1.17.3) + * fse: Fix max header size https://github.com/klauspost/compress/pull/881 + * zstd: Improve better/best compression https://github.com/klauspost/compress/pull/877 + * gzhttp: Fix missing content type on Close https://github.com/klauspost/compress/pull/883 + * Oct 22nd, 2023 - [v1.17.2](https://github.com/klauspost/compress/releases/tag/v1.17.2) * zstd: Fix rare *CORRUPTION* output in "best" mode. See https://github.com/klauspost/compress/pull/876 @@ -554,7 +566,7 @@ For direct deflate use, NewStatelessWriter and StatelessDeflate are available. S A `bufio.Writer` can of course be used to control write sizes. For example, to use a 4KB buffer: -``` +```go // replace 'ioutil.Discard' with your output. gzw, err := gzip.NewWriterLevel(ioutil.Discard, gzip.StatelessCompression) if err != nil { diff --git a/vendor/github.com/klauspost/compress/internal/race/norace.go b/vendor/github.com/klauspost/compress/internal/race/norace.go new file mode 100644 index 0000000000..affbbbb595 --- /dev/null +++ b/vendor/github.com/klauspost/compress/internal/race/norace.go @@ -0,0 +1,13 @@ +// Copyright 2015 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 file. + +//go:build !race + +package race + +func ReadSlice[T any](s []T) { +} + +func WriteSlice[T any](s []T) { +} diff --git a/vendor/github.com/klauspost/compress/internal/race/race.go b/vendor/github.com/klauspost/compress/internal/race/race.go new file mode 100644 index 0000000000..f5e240dcde --- /dev/null +++ b/vendor/github.com/klauspost/compress/internal/race/race.go @@ -0,0 +1,26 @@ +// Copyright 2015 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 file. + +//go:build race + +package race + +import ( + "runtime" + "unsafe" +) + +func ReadSlice[T any](s []T) { + if len(s) == 0 { + return + } + runtime.RaceReadRange(unsafe.Pointer(&s[0]), len(s)*int(unsafe.Sizeof(s[0]))) +} + +func WriteSlice[T any](s []T) { + if len(s) == 0 { + return + } + runtime.RaceWriteRange(unsafe.Pointer(&s[0]), len(s)*int(unsafe.Sizeof(s[0]))) +} diff --git a/vendor/github.com/klauspost/compress/s2/decode.go b/vendor/github.com/klauspost/compress/s2/decode.go index 6c7feafcc6..264ffd0a9b 100644 --- a/vendor/github.com/klauspost/compress/s2/decode.go +++ b/vendor/github.com/klauspost/compress/s2/decode.go @@ -10,6 +10,8 @@ import ( "errors" "fmt" "strconv" + + "github.com/klauspost/compress/internal/race" ) var ( @@ -63,6 +65,10 @@ func Decode(dst, src []byte) ([]byte, error) { } else { dst = make([]byte, dLen) } + + race.WriteSlice(dst) + race.ReadSlice(src[s:]) + if s2Decode(dst, src[s:]) != 0 { return nil, ErrCorrupt } diff --git a/vendor/github.com/klauspost/compress/s2/encode_amd64.go b/vendor/github.com/klauspost/compress/s2/encode_amd64.go index ebc332ad5f..4f45206a4e 100644 --- a/vendor/github.com/klauspost/compress/s2/encode_amd64.go +++ b/vendor/github.com/klauspost/compress/s2/encode_amd64.go @@ -3,6 +3,8 @@ package s2 +import "github.com/klauspost/compress/internal/race" + const hasAmd64Asm = true // encodeBlock encodes a non-empty src to a guaranteed-large-enough dst. It @@ -14,6 +16,9 @@ const hasAmd64Asm = true // len(dst) >= MaxEncodedLen(len(src)) && // minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize func encodeBlock(dst, src []byte) (d int) { + race.ReadSlice(src) + race.WriteSlice(dst) + const ( // Use 12 bit table when less than... limit12B = 16 << 10 @@ -50,6 +55,9 @@ func encodeBlock(dst, src []byte) (d int) { // len(dst) >= MaxEncodedLen(len(src)) && // minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize func encodeBlockBetter(dst, src []byte) (d int) { + race.ReadSlice(src) + race.WriteSlice(dst) + const ( // Use 12 bit table when less than... limit12B = 16 << 10 @@ -86,6 +94,9 @@ func encodeBlockBetter(dst, src []byte) (d int) { // len(dst) >= MaxEncodedLen(len(src)) && // minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize func encodeBlockSnappy(dst, src []byte) (d int) { + race.ReadSlice(src) + race.WriteSlice(dst) + const ( // Use 12 bit table when less than... limit12B = 16 << 10 @@ -121,6 +132,9 @@ func encodeBlockSnappy(dst, src []byte) (d int) { // len(dst) >= MaxEncodedLen(len(src)) && // minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize func encodeBlockBetterSnappy(dst, src []byte) (d int) { + race.ReadSlice(src) + race.WriteSlice(dst) + const ( // Use 12 bit table when less than... limit12B = 16 << 10 diff --git a/vendor/github.com/klauspost/compress/s2/reader.go b/vendor/github.com/klauspost/compress/s2/reader.go index 2f01a3987f..46ead58fe0 100644 --- a/vendor/github.com/klauspost/compress/s2/reader.go +++ b/vendor/github.com/klauspost/compress/s2/reader.go @@ -104,12 +104,14 @@ func ReaderIgnoreStreamIdentifier() ReaderOption { // For each chunk with the ID, the callback is called with the content. // Any returned non-nil error will abort decompression. // Only one callback per ID is supported, latest sent will be used. +// You can peek the stream, triggering the callback, by doing a Read with a 0 +// byte buffer. func ReaderSkippableCB(id uint8, fn func(r io.Reader) error) ReaderOption { return func(r *Reader) error { if id < 0x80 || id > 0xfd { return fmt.Errorf("ReaderSkippableCB: Invalid id provided, must be 0x80-0xfd (inclusive)") } - r.skippableCB[id] = fn + r.skippableCB[id-0x80] = fn return nil } } @@ -128,7 +130,7 @@ type Reader struct { err error decoded []byte buf []byte - skippableCB [0x80]func(r io.Reader) error + skippableCB [0xff - 0x80]func(r io.Reader) error blockStart int64 // Uncompressed offset at start of current. index *Index @@ -201,7 +203,7 @@ func (r *Reader) readFull(p []byte, allowEOF bool) (ok bool) { // The supplied slice does not need to be the size of the read. func (r *Reader) skippable(tmp []byte, n int, allowEOF bool, id uint8) (ok bool) { if id < 0x80 { - r.err = fmt.Errorf("interbal error: skippable id < 0x80") + r.err = fmt.Errorf("internal error: skippable id < 0x80") return false } if fn := r.skippableCB[id-0x80]; fn != nil { @@ -1048,15 +1050,17 @@ func (r *Reader) ReadByte() (byte, error) { } // SkippableCB will register a callback for chunks with the specified ID. -// ID must be a Reserved skippable chunks ID, 0x80-0xfe (inclusive). +// ID must be a Reserved skippable chunks ID, 0x80-0xfd (inclusive). // For each chunk with the ID, the callback is called with the content. // Any returned non-nil error will abort decompression. // Only one callback per ID is supported, latest sent will be used. // Sending a nil function will disable previous callbacks. +// You can peek the stream, triggering the callback, by doing a Read with a 0 +// byte buffer. func (r *Reader) SkippableCB(id uint8, fn func(r io.Reader) error) error { - if id < 0x80 || id > chunkTypePadding { + if id < 0x80 || id >= chunkTypePadding { return fmt.Errorf("ReaderSkippableCB: Invalid id provided, must be 0x80-0xfe (inclusive)") } - r.skippableCB[id] = fn + r.skippableCB[id-0x80] = fn return nil } diff --git a/vendor/github.com/klauspost/compress/s2/s2.go b/vendor/github.com/klauspost/compress/s2/s2.go index dae3f731fa..72bcb49453 100644 --- a/vendor/github.com/klauspost/compress/s2/s2.go +++ b/vendor/github.com/klauspost/compress/s2/s2.go @@ -37,6 +37,8 @@ package s2 import ( "bytes" "hash/crc32" + + "github.com/klauspost/compress/internal/race" ) /* @@ -112,6 +114,8 @@ var crcTable = crc32.MakeTable(crc32.Castagnoli) // crc implements the checksum specified in section 3 of // https://github.com/google/snappy/blob/master/framing_format.txt func crc(b []byte) uint32 { + race.ReadSlice(b) + c := crc32.Update(0, crcTable, b) return c>>15 | c<<17 + 0xa282ead8 } diff --git a/vendor/github.com/klauspost/compress/s2/writer.go b/vendor/github.com/klauspost/compress/s2/writer.go index 089cd36d8c..bba66a8766 100644 --- a/vendor/github.com/klauspost/compress/s2/writer.go +++ b/vendor/github.com/klauspost/compress/s2/writer.go @@ -13,6 +13,8 @@ import ( "io" "runtime" "sync" + + "github.com/klauspost/compress/internal/race" ) const ( @@ -271,7 +273,7 @@ func (w *Writer) AddSkippableBlock(id uint8, data []byte) (err error) { return fmt.Errorf("skippable block excessed maximum size") } var header [4]byte - chunkLen := 4 + len(data) + chunkLen := len(data) header[0] = id header[1] = uint8(chunkLen >> 0) header[2] = uint8(chunkLen >> 8) @@ -282,7 +284,7 @@ func (w *Writer) AddSkippableBlock(id uint8, data []byte) (err error) { if err = w.err(err); err != nil { return err } - if n != len(data) { + if n != len(b) { return w.err(io.ErrShortWrite) } w.written += int64(n) @@ -303,9 +305,7 @@ func (w *Writer) AddSkippableBlock(id uint8, data []byte) (err error) { if err := write(header[:]); err != nil { return err } - if err := write(data); err != nil { - return err - } + return write(data) } // Create output... @@ -385,6 +385,8 @@ func (w *Writer) EncodeBuffer(buf []byte) (err error) { buf = buf[len(uncompressed):] // Get an output buffer. obuf := w.buffers.Get().([]byte)[:len(uncompressed)+obufHeaderLen] + race.WriteSlice(obuf) + output := make(chan result) // Queue output now, so we keep order. w.output <- output @@ -393,6 +395,8 @@ func (w *Writer) EncodeBuffer(buf []byte) (err error) { } w.uncompWritten += int64(len(uncompressed)) go func() { + race.ReadSlice(uncompressed) + checksum := crc(uncompressed) // Set to uncompressed. diff --git a/vendor/github.com/klauspost/compress/s2sx.mod b/vendor/github.com/klauspost/compress/s2sx.mod index 2263853fca..5a4412f907 100644 --- a/vendor/github.com/klauspost/compress/s2sx.mod +++ b/vendor/github.com/klauspost/compress/s2sx.mod @@ -1,4 +1,4 @@ module github.com/klauspost/compress -go 1.16 +go 1.19 diff --git a/vendor/github.com/klauspost/compress/zstd/decodeheader.go b/vendor/github.com/klauspost/compress/zstd/decodeheader.go index f6a240970d..6a5a2988b6 100644 --- a/vendor/github.com/klauspost/compress/zstd/decodeheader.go +++ b/vendor/github.com/klauspost/compress/zstd/decodeheader.go @@ -95,42 +95,54 @@ type Header struct { // If there isn't enough input, io.ErrUnexpectedEOF is returned. // The FirstBlock.OK will indicate if enough information was available to decode the first block header. func (h *Header) Decode(in []byte) error { + _, err := h.DecodeAndStrip(in) + return err +} + +// DecodeAndStrip will decode the header from the beginning of the stream +// and on success return the remaining bytes. +// This will decode the frame header and the first block header if enough bytes are provided. +// It is recommended to provide at least HeaderMaxSize bytes. +// If the frame header cannot be read an error will be returned. +// If there isn't enough input, io.ErrUnexpectedEOF is returned. +// The FirstBlock.OK will indicate if enough information was available to decode the first block header. +func (h *Header) DecodeAndStrip(in []byte) (remain []byte, err error) { *h = Header{} if len(in) < 4 { - return io.ErrUnexpectedEOF + return nil, io.ErrUnexpectedEOF } h.HeaderSize += 4 b, in := in[:4], in[4:] if string(b) != frameMagic { if string(b[1:4]) != skippableFrameMagic || b[0]&0xf0 != 0x50 { - return ErrMagicMismatch + return nil, ErrMagicMismatch } if len(in) < 4 { - return io.ErrUnexpectedEOF + return nil, io.ErrUnexpectedEOF } h.HeaderSize += 4 h.Skippable = true h.SkippableID = int(b[0] & 0xf) h.SkippableSize = binary.LittleEndian.Uint32(in) - return nil + return in[4:], nil } // Read Window_Descriptor // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#window_descriptor if len(in) < 1 { - return io.ErrUnexpectedEOF + return nil, io.ErrUnexpectedEOF } fhd, in := in[0], in[1:] h.HeaderSize++ h.SingleSegment = fhd&(1<<5) != 0 h.HasCheckSum = fhd&(1<<2) != 0 if fhd&(1<<3) != 0 { - return errors.New("reserved bit set on frame header") + return nil, errors.New("reserved bit set on frame header") } if !h.SingleSegment { if len(in) < 1 { - return io.ErrUnexpectedEOF + return nil, io.ErrUnexpectedEOF } var wd byte wd, in = in[0], in[1:] @@ -148,7 +160,7 @@ func (h *Header) Decode(in []byte) error { size = 4 } if len(in) < int(size) { - return io.ErrUnexpectedEOF + return nil, io.ErrUnexpectedEOF } b, in = in[:size], in[size:] h.HeaderSize += int(size) @@ -178,7 +190,7 @@ func (h *Header) Decode(in []byte) error { if fcsSize > 0 { h.HasFCS = true if len(in) < fcsSize { - return io.ErrUnexpectedEOF + return nil, io.ErrUnexpectedEOF } b, in = in[:fcsSize], in[fcsSize:] h.HeaderSize += int(fcsSize) @@ -199,7 +211,7 @@ func (h *Header) Decode(in []byte) error { // Frame Header done, we will not fail from now on. if len(in) < 3 { - return nil + return in, nil } tmp := in[:3] bh := uint32(tmp[0]) | (uint32(tmp[1]) << 8) | (uint32(tmp[2]) << 16) @@ -209,7 +221,7 @@ func (h *Header) Decode(in []byte) error { cSize := int(bh >> 3) switch blockType { case blockTypeReserved: - return nil + return in, nil case blockTypeRLE: h.FirstBlock.Compressed = true h.FirstBlock.DecompressedSize = cSize @@ -225,5 +237,25 @@ func (h *Header) Decode(in []byte) error { } h.FirstBlock.OK = true - return nil + return in, nil +} + +// AppendTo will append the encoded header to the dst slice. +// There is no error checking performed on the header values. +func (h *Header) AppendTo(dst []byte) ([]byte, error) { + if h.Skippable { + magic := [4]byte{0x50, 0x2a, 0x4d, 0x18} + magic[0] |= byte(h.SkippableID & 0xf) + dst = append(dst, magic[:]...) + f := h.SkippableSize + return append(dst, uint8(f), uint8(f>>8), uint8(f>>16), uint8(f>>24)), nil + } + f := frameHeader{ + ContentSize: h.FrameContentSize, + WindowSize: uint32(h.WindowSize), + SingleSegment: h.SingleSegment, + Checksum: h.HasCheckSum, + DictID: h.DictionaryID, + } + return f.appendTo(dst), nil } diff --git a/vendor/github.com/klauspost/compress/zstd/encoder_options.go b/vendor/github.com/klauspost/compress/zstd/encoder_options.go index faaf81921c..20671dcb91 100644 --- a/vendor/github.com/klauspost/compress/zstd/encoder_options.go +++ b/vendor/github.com/klauspost/compress/zstd/encoder_options.go @@ -94,7 +94,7 @@ func WithEncoderConcurrency(n int) EOption { // The value must be a power of two between MinWindowSize and MaxWindowSize. // A larger value will enable better compression but allocate more memory and, // for above-default values, take considerably longer. -// The default value is determined by the compression level. +// The default value is determined by the compression level and max 8MB. func WithWindowSize(n int) EOption { return func(o *encoderOptions) error { switch { @@ -232,9 +232,9 @@ func WithEncoderLevel(l EncoderLevel) EOption { case SpeedDefault: o.windowSize = 8 << 20 case SpeedBetterCompression: - o.windowSize = 16 << 20 + o.windowSize = 8 << 20 case SpeedBestCompression: - o.windowSize = 32 << 20 + o.windowSize = 8 << 20 } } if !o.customALEntropy { diff --git a/vendor/github.com/klauspost/compress/zstd/frameenc.go b/vendor/github.com/klauspost/compress/zstd/frameenc.go index 2f5d5ed454..667ca06794 100644 --- a/vendor/github.com/klauspost/compress/zstd/frameenc.go +++ b/vendor/github.com/klauspost/compress/zstd/frameenc.go @@ -76,7 +76,7 @@ func (f frameHeader) appendTo(dst []byte) []byte { if f.SingleSegment { dst = append(dst, uint8(f.ContentSize)) } - // Unless SingleSegment is set, framessizes < 256 are nto stored. + // Unless SingleSegment is set, framessizes < 256 are not stored. case 1: f.ContentSize -= 256 dst = append(dst, uint8(f.ContentSize), uint8(f.ContentSize>>8)) diff --git a/vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.go b/vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.go index 332e51fe44..8adfebb029 100644 --- a/vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.go +++ b/vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.go @@ -20,10 +20,9 @@ func (s *fseDecoder) buildDtable() error { if v == -1 { s.dt[highThreshold].setAddBits(uint8(i)) highThreshold-- - symbolNext[i] = 1 - } else { - symbolNext[i] = uint16(v) + v = 1 } + symbolNext[i] = uint16(v) } } @@ -35,10 +34,12 @@ func (s *fseDecoder) buildDtable() error { for ss, v := range s.norm[:s.symbolLen] { for i := 0; i < int(v); i++ { s.dt[position].setAddBits(uint8(ss)) - position = (position + step) & tableMask - for position > highThreshold { + for { // lowprob area position = (position + step) & tableMask + if position <= highThreshold { + break + } } } } diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s index 974b99725f..5b06174b89 100644 --- a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s +++ b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s @@ -157,8 +157,7 @@ sequenceDecs_decode_amd64_ll_update_zero: // Update Literal Length State MOVBQZX DI, R14 - SHRQ $0x10, DI - MOVWQZX DI, DI + SHRL $0x10, DI LEAQ (BX)(R14*1), CX MOVQ DX, R15 MOVQ CX, BX @@ -177,8 +176,7 @@ sequenceDecs_decode_amd64_ll_update_zero: // Update Match Length State MOVBQZX R8, R14 - SHRQ $0x10, R8 - MOVWQZX R8, R8 + SHRL $0x10, R8 LEAQ (BX)(R14*1), CX MOVQ DX, R15 MOVQ CX, BX @@ -197,8 +195,7 @@ sequenceDecs_decode_amd64_ll_update_zero: // Update Offset State MOVBQZX R9, R14 - SHRQ $0x10, R9 - MOVWQZX R9, R9 + SHRL $0x10, R9 LEAQ (BX)(R14*1), CX MOVQ DX, R15 MOVQ CX, BX @@ -459,8 +456,7 @@ sequenceDecs_decode_56_amd64_ll_update_zero: // Update Literal Length State MOVBQZX DI, R14 - SHRQ $0x10, DI - MOVWQZX DI, DI + SHRL $0x10, DI LEAQ (BX)(R14*1), CX MOVQ DX, R15 MOVQ CX, BX @@ -479,8 +475,7 @@ sequenceDecs_decode_56_amd64_ll_update_zero: // Update Match Length State MOVBQZX R8, R14 - SHRQ $0x10, R8 - MOVWQZX R8, R8 + SHRL $0x10, R8 LEAQ (BX)(R14*1), CX MOVQ DX, R15 MOVQ CX, BX @@ -499,8 +494,7 @@ sequenceDecs_decode_56_amd64_ll_update_zero: // Update Offset State MOVBQZX R9, R14 - SHRQ $0x10, R9 - MOVWQZX R9, R9 + SHRL $0x10, R9 LEAQ (BX)(R14*1), CX MOVQ DX, R15 MOVQ CX, BX @@ -772,11 +766,10 @@ sequenceDecs_decode_bmi2_fill_2_end: BZHIQ R14, R15, R15 // Update Offset State - BZHIQ R8, R15, CX - SHRXQ R8, R15, R15 - MOVQ $0x00001010, R14 - BEXTRQ R14, R8, R8 - ADDQ CX, R8 + BZHIQ R8, R15, CX + SHRXQ R8, R15, R15 + SHRL $0x10, R8 + ADDQ CX, R8 // Load ctx.ofTable MOVQ ctx+16(FP), CX @@ -784,11 +777,10 @@ sequenceDecs_decode_bmi2_fill_2_end: MOVQ (CX)(R8*8), R8 // Update Match Length State - BZHIQ DI, R15, CX - SHRXQ DI, R15, R15 - MOVQ $0x00001010, R14 - BEXTRQ R14, DI, DI - ADDQ CX, DI + BZHIQ DI, R15, CX + SHRXQ DI, R15, R15 + SHRL $0x10, DI + ADDQ CX, DI // Load ctx.mlTable MOVQ ctx+16(FP), CX @@ -796,10 +788,9 @@ sequenceDecs_decode_bmi2_fill_2_end: MOVQ (CX)(DI*8), DI // Update Literal Length State - BZHIQ SI, R15, CX - MOVQ $0x00001010, R14 - BEXTRQ R14, SI, SI - ADDQ CX, SI + BZHIQ SI, R15, CX + SHRL $0x10, SI + ADDQ CX, SI // Load ctx.llTable MOVQ ctx+16(FP), CX @@ -1032,11 +1023,10 @@ sequenceDecs_decode_56_bmi2_fill_end: BZHIQ R14, R15, R15 // Update Offset State - BZHIQ R8, R15, CX - SHRXQ R8, R15, R15 - MOVQ $0x00001010, R14 - BEXTRQ R14, R8, R8 - ADDQ CX, R8 + BZHIQ R8, R15, CX + SHRXQ R8, R15, R15 + SHRL $0x10, R8 + ADDQ CX, R8 // Load ctx.ofTable MOVQ ctx+16(FP), CX @@ -1044,11 +1034,10 @@ sequenceDecs_decode_56_bmi2_fill_end: MOVQ (CX)(R8*8), R8 // Update Match Length State - BZHIQ DI, R15, CX - SHRXQ DI, R15, R15 - MOVQ $0x00001010, R14 - BEXTRQ R14, DI, DI - ADDQ CX, DI + BZHIQ DI, R15, CX + SHRXQ DI, R15, R15 + SHRL $0x10, DI + ADDQ CX, DI // Load ctx.mlTable MOVQ ctx+16(FP), CX @@ -1056,10 +1045,9 @@ sequenceDecs_decode_56_bmi2_fill_end: MOVQ (CX)(DI*8), DI // Update Literal Length State - BZHIQ SI, R15, CX - MOVQ $0x00001010, R14 - BEXTRQ R14, SI, SI - ADDQ CX, SI + BZHIQ SI, R15, CX + SHRL $0x10, SI + ADDQ CX, SI // Load ctx.llTable MOVQ ctx+16(FP), CX @@ -1967,8 +1955,7 @@ sequenceDecs_decodeSync_amd64_ll_update_zero: // Update Literal Length State MOVBQZX DI, R13 - SHRQ $0x10, DI - MOVWQZX DI, DI + SHRL $0x10, DI LEAQ (BX)(R13*1), CX MOVQ DX, R14 MOVQ CX, BX @@ -1987,8 +1974,7 @@ sequenceDecs_decodeSync_amd64_ll_update_zero: // Update Match Length State MOVBQZX R8, R13 - SHRQ $0x10, R8 - MOVWQZX R8, R8 + SHRL $0x10, R8 LEAQ (BX)(R13*1), CX MOVQ DX, R14 MOVQ CX, BX @@ -2007,8 +1993,7 @@ sequenceDecs_decodeSync_amd64_ll_update_zero: // Update Offset State MOVBQZX R9, R13 - SHRQ $0x10, R9 - MOVWQZX R9, R9 + SHRL $0x10, R9 LEAQ (BX)(R13*1), CX MOVQ DX, R14 MOVQ CX, BX @@ -2514,11 +2499,10 @@ sequenceDecs_decodeSync_bmi2_fill_2_end: BZHIQ R13, R14, R14 // Update Offset State - BZHIQ R8, R14, CX - SHRXQ R8, R14, R14 - MOVQ $0x00001010, R13 - BEXTRQ R13, R8, R8 - ADDQ CX, R8 + BZHIQ R8, R14, CX + SHRXQ R8, R14, R14 + SHRL $0x10, R8 + ADDQ CX, R8 // Load ctx.ofTable MOVQ ctx+16(FP), CX @@ -2526,11 +2510,10 @@ sequenceDecs_decodeSync_bmi2_fill_2_end: MOVQ (CX)(R8*8), R8 // Update Match Length State - BZHIQ DI, R14, CX - SHRXQ DI, R14, R14 - MOVQ $0x00001010, R13 - BEXTRQ R13, DI, DI - ADDQ CX, DI + BZHIQ DI, R14, CX + SHRXQ DI, R14, R14 + SHRL $0x10, DI + ADDQ CX, DI // Load ctx.mlTable MOVQ ctx+16(FP), CX @@ -2538,10 +2521,9 @@ sequenceDecs_decodeSync_bmi2_fill_2_end: MOVQ (CX)(DI*8), DI // Update Literal Length State - BZHIQ SI, R14, CX - MOVQ $0x00001010, R13 - BEXTRQ R13, SI, SI - ADDQ CX, SI + BZHIQ SI, R14, CX + SHRL $0x10, SI + ADDQ CX, SI // Load ctx.llTable MOVQ ctx+16(FP), CX @@ -3055,8 +3037,7 @@ sequenceDecs_decodeSync_safe_amd64_ll_update_zero: // Update Literal Length State MOVBQZX DI, R13 - SHRQ $0x10, DI - MOVWQZX DI, DI + SHRL $0x10, DI LEAQ (BX)(R13*1), CX MOVQ DX, R14 MOVQ CX, BX @@ -3075,8 +3056,7 @@ sequenceDecs_decodeSync_safe_amd64_ll_update_zero: // Update Match Length State MOVBQZX R8, R13 - SHRQ $0x10, R8 - MOVWQZX R8, R8 + SHRL $0x10, R8 LEAQ (BX)(R13*1), CX MOVQ DX, R14 MOVQ CX, BX @@ -3095,8 +3075,7 @@ sequenceDecs_decodeSync_safe_amd64_ll_update_zero: // Update Offset State MOVBQZX R9, R13 - SHRQ $0x10, R9 - MOVWQZX R9, R9 + SHRL $0x10, R9 LEAQ (BX)(R13*1), CX MOVQ DX, R14 MOVQ CX, BX @@ -3704,11 +3683,10 @@ sequenceDecs_decodeSync_safe_bmi2_fill_2_end: BZHIQ R13, R14, R14 // Update Offset State - BZHIQ R8, R14, CX - SHRXQ R8, R14, R14 - MOVQ $0x00001010, R13 - BEXTRQ R13, R8, R8 - ADDQ CX, R8 + BZHIQ R8, R14, CX + SHRXQ R8, R14, R14 + SHRL $0x10, R8 + ADDQ CX, R8 // Load ctx.ofTable MOVQ ctx+16(FP), CX @@ -3716,11 +3694,10 @@ sequenceDecs_decodeSync_safe_bmi2_fill_2_end: MOVQ (CX)(R8*8), R8 // Update Match Length State - BZHIQ DI, R14, CX - SHRXQ DI, R14, R14 - MOVQ $0x00001010, R13 - BEXTRQ R13, DI, DI - ADDQ CX, DI + BZHIQ DI, R14, CX + SHRXQ DI, R14, R14 + SHRL $0x10, DI + ADDQ CX, DI // Load ctx.mlTable MOVQ ctx+16(FP), CX @@ -3728,10 +3705,9 @@ sequenceDecs_decodeSync_safe_bmi2_fill_2_end: MOVQ (CX)(DI*8), DI // Update Literal Length State - BZHIQ SI, R14, CX - MOVQ $0x00001010, R13 - BEXTRQ R13, SI, SI - ADDQ CX, SI + BZHIQ SI, R14, CX + SHRL $0x10, SI + ADDQ CX, SI // Load ctx.llTable MOVQ ctx+16(FP), CX diff --git a/vendor/github.com/rivo/uniseg/README.md b/vendor/github.com/rivo/uniseg/README.md index 25e9346874..250b2a1f57 100644 --- a/vendor/github.com/rivo/uniseg/README.md +++ b/vendor/github.com/rivo/uniseg/README.md @@ -3,7 +3,7 @@ [![Go Reference](https://pkg.go.dev/badge/github.com/rivo/uniseg.svg)](https://pkg.go.dev/github.com/rivo/uniseg) [![Go Report](https://img.shields.io/badge/go%20report-A%2B-brightgreen.svg)](https://goreportcard.com/report/github.com/rivo/uniseg) -This Go package implements Unicode Text Segmentation according to [Unicode Standard Annex #29](https://unicode.org/reports/tr29/), Unicode Line Breaking according to [Unicode Standard Annex #14](https://unicode.org/reports/tr14/) (Unicode version 14.0.0), and monospace font string width calculation similar to [wcwidth](https://man7.org/linux/man-pages/man3/wcwidth.3.html). +This Go package implements Unicode Text Segmentation according to [Unicode Standard Annex #29](https://unicode.org/reports/tr29/), Unicode Line Breaking according to [Unicode Standard Annex #14](https://unicode.org/reports/tr14/) (Unicode version 15.0.0), and monospace font string width calculation similar to [wcwidth](https://man7.org/linux/man-pages/man3/wcwidth.3.html). ## Background diff --git a/vendor/github.com/rivo/uniseg/eastasianwidth.go b/vendor/github.com/rivo/uniseg/eastasianwidth.go index 661934ac2d..5fc54d9915 100644 --- a/vendor/github.com/rivo/uniseg/eastasianwidth.go +++ b/vendor/github.com/rivo/uniseg/eastasianwidth.go @@ -1,13 +1,13 @@ -package uniseg - // Code generated via go generate from gen_properties.go. DO NOT EDIT. +package uniseg + // eastAsianWidth are taken from -// https://www.unicode.org/Public/14.0.0/ucd/EastAsianWidth.txt +// https://www.unicode.org/Public/15.0.0/ucd/EastAsianWidth.txt // and -// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt +// https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) -// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode +// on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var eastAsianWidth = [][3]int{ {0x0000, 0x001F, prN}, // Cc [32] .. @@ -504,6 +504,7 @@ var eastAsianWidth = [][3]int{ {0x0CE2, 0x0CE3, prN}, // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL {0x0CE6, 0x0CEF, prN}, // Nd [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE {0x0CF1, 0x0CF2, prN}, // Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA + {0x0CF3, 0x0CF3, prN}, // Mc KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT {0x0D00, 0x0D01, prN}, // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU {0x0D02, 0x0D03, prN}, // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA {0x0D04, 0x0D0C, prN}, // Lo [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L @@ -565,7 +566,7 @@ var eastAsianWidth = [][3]int{ {0x0EBD, 0x0EBD, prN}, // Lo LAO SEMIVOWEL SIGN NYO {0x0EC0, 0x0EC4, prN}, // Lo [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI {0x0EC6, 0x0EC6, prN}, // Lm LAO KO LA - {0x0EC8, 0x0ECD, prN}, // Mn [6] LAO TONE MAI EK..LAO NIGGAHITA + {0x0EC8, 0x0ECE, prN}, // Mn [7] LAO TONE MAI EK..LAO YAMAKKAN {0x0ED0, 0x0ED9, prN}, // Nd [10] LAO DIGIT ZERO..LAO DIGIT NINE {0x0EDC, 0x0EDF, prN}, // Lo [4] LAO HO NO..LAO LETTER KHMU NYO {0x0F00, 0x0F00, prN}, // Lo TIBETAN SYLLABLE OM @@ -1916,6 +1917,7 @@ var eastAsianWidth = [][3]int{ {0x10EAB, 0x10EAC, prN}, // Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK {0x10EAD, 0x10EAD, prN}, // Pd YEZIDI HYPHENATION MARK {0x10EB0, 0x10EB1, prN}, // Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE + {0x10EFD, 0x10EFF, prN}, // Mn [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA {0x10F00, 0x10F1C, prN}, // Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL {0x10F1D, 0x10F26, prN}, // No [10] OLD SOGDIAN NUMBER ONE..OLD SOGDIAN FRACTION ONE HALF {0x10F27, 0x10F27, prN}, // Lo OLD SOGDIAN LIGATURE AYIN-DALETH @@ -1998,6 +2000,8 @@ var eastAsianWidth = [][3]int{ {0x11236, 0x11237, prN}, // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA {0x11238, 0x1123D, prN}, // Po [6] KHOJKI DANDA..KHOJKI ABBREVIATION SIGN {0x1123E, 0x1123E, prN}, // Mn KHOJKI SIGN SUKUN + {0x1123F, 0x11240, prN}, // Lo [2] KHOJKI LETTER QA..KHOJKI LETTER SHORT I + {0x11241, 0x11241, prN}, // Mn KHOJKI VOWEL SIGN VOCALIC R {0x11280, 0x11286, prN}, // Lo [7] MULTANI LETTER A..MULTANI LETTER GA {0x11288, 0x11288, prN}, // Lo MULTANI LETTER GHA {0x1128A, 0x1128D, prN}, // Lo [4] MULTANI LETTER CA..MULTANI LETTER JJA @@ -2160,6 +2164,7 @@ var eastAsianWidth = [][3]int{ {0x11A9E, 0x11AA2, prN}, // Po [5] SOYOMBO HEAD MARK WITH MOON AND SUN AND TRIPLE FLAME..SOYOMBO TERMINAL MARK-2 {0x11AB0, 0x11ABF, prN}, // Lo [16] CANADIAN SYLLABICS NATTILIK HI..CANADIAN SYLLABICS SPA {0x11AC0, 0x11AF8, prN}, // Lo [57] PAU CIN HAU LETTER PA..PAU CIN HAU GLOTTAL STOP FINAL + {0x11B00, 0x11B09, prN}, // Po [10] DEVANAGARI HEAD MARK..DEVANAGARI SIGN MINDU {0x11C00, 0x11C08, prN}, // Lo [9] BHAIKSUKI LETTER A..BHAIKSUKI LETTER VOCALIC L {0x11C0A, 0x11C2E, prN}, // Lo [37] BHAIKSUKI LETTER E..BHAIKSUKI LETTER HA {0x11C2F, 0x11C2F, prN}, // Mc BHAIKSUKI VOWEL SIGN AA @@ -2205,6 +2210,19 @@ var eastAsianWidth = [][3]int{ {0x11EF3, 0x11EF4, prN}, // Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U {0x11EF5, 0x11EF6, prN}, // Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O {0x11EF7, 0x11EF8, prN}, // Po [2] MAKASAR PASSIMBANG..MAKASAR END OF SECTION + {0x11F00, 0x11F01, prN}, // Mn [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA + {0x11F02, 0x11F02, prN}, // Lo KAWI SIGN REPHA + {0x11F03, 0x11F03, prN}, // Mc KAWI SIGN VISARGA + {0x11F04, 0x11F10, prN}, // Lo [13] KAWI LETTER A..KAWI LETTER O + {0x11F12, 0x11F33, prN}, // Lo [34] KAWI LETTER KA..KAWI LETTER JNYA + {0x11F34, 0x11F35, prN}, // Mc [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA + {0x11F36, 0x11F3A, prN}, // Mn [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R + {0x11F3E, 0x11F3F, prN}, // Mc [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI + {0x11F40, 0x11F40, prN}, // Mn KAWI VOWEL SIGN EU + {0x11F41, 0x11F41, prN}, // Mc KAWI SIGN KILLER + {0x11F42, 0x11F42, prN}, // Mn KAWI CONJOINER + {0x11F43, 0x11F4F, prN}, // Po [13] KAWI DANDA..KAWI PUNCTUATION CLOSING SPIRAL + {0x11F50, 0x11F59, prN}, // Nd [10] KAWI DIGIT ZERO..KAWI DIGIT NINE {0x11FB0, 0x11FB0, prN}, // Lo LISU LETTER YHA {0x11FC0, 0x11FD4, prN}, // No [21] TAMIL FRACTION ONE THREE-HUNDRED-AND-TWENTIETH..TAMIL FRACTION DOWNSCALING FACTOR KIIZH {0x11FD5, 0x11FDC, prN}, // So [8] TAMIL SIGN NEL..TAMIL SIGN MUKKURUNI @@ -2217,8 +2235,11 @@ var eastAsianWidth = [][3]int{ {0x12480, 0x12543, prN}, // Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU {0x12F90, 0x12FF0, prN}, // Lo [97] CYPRO-MINOAN SIGN CM001..CYPRO-MINOAN SIGN CM114 {0x12FF1, 0x12FF2, prN}, // Po [2] CYPRO-MINOAN SIGN CM301..CYPRO-MINOAN SIGN CM302 - {0x13000, 0x1342E, prN}, // Lo [1071] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH AA032 - {0x13430, 0x13438, prN}, // Cf [9] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END SEGMENT + {0x13000, 0x1342F, prN}, // Lo [1072] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH V011D + {0x13430, 0x1343F, prN}, // Cf [16] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE + {0x13440, 0x13440, prN}, // Mn EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY + {0x13441, 0x13446, prN}, // Lo [6] EGYPTIAN HIEROGLYPH FULL BLANK..EGYPTIAN HIEROGLYPH WIDE LOST SIGN + {0x13447, 0x13455, prN}, // Mn [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED {0x14400, 0x14646, prN}, // Lo [583] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530 {0x16800, 0x16A38, prN}, // Lo [569] BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ {0x16A40, 0x16A5E, prN}, // Lo [31] MRO LETTER TA..MRO LETTER TEK @@ -2263,7 +2284,9 @@ var eastAsianWidth = [][3]int{ {0x1AFFD, 0x1AFFE, prW}, // Lm [2] KATAKANA LETTER MINNAN NASALIZED TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-8 {0x1B000, 0x1B0FF, prW}, // Lo [256] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER RE-2 {0x1B100, 0x1B122, prW}, // Lo [35] HENTAIGANA LETTER RE-3..KATAKANA LETTER ARCHAIC WU + {0x1B132, 0x1B132, prW}, // Lo HIRAGANA LETTER SMALL KO {0x1B150, 0x1B152, prW}, // Lo [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO + {0x1B155, 0x1B155, prW}, // Lo KATAKANA LETTER SMALL KO {0x1B164, 0x1B167, prW}, // Lo [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N {0x1B170, 0x1B2FB, prW}, // Lo [396] NUSHU CHARACTER-1B170..NUSHU CHARACTER-1B2FB {0x1BC00, 0x1BC6A, prN}, // Lo [107] DUPLOYAN LETTER H..DUPLOYAN LETTER VOCALIC M @@ -2294,6 +2317,7 @@ var eastAsianWidth = [][3]int{ {0x1D200, 0x1D241, prN}, // So [66] GREEK VOCAL NOTATION SYMBOL-1..GREEK INSTRUMENTAL NOTATION SYMBOL-54 {0x1D242, 0x1D244, prN}, // Mn [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME {0x1D245, 0x1D245, prN}, // So GREEK MUSICAL LEIMMA + {0x1D2C0, 0x1D2D3, prN}, // No [20] KAKTOVIK NUMERAL ZERO..KAKTOVIK NUMERAL NINETEEN {0x1D2E0, 0x1D2F3, prN}, // No [20] MAYAN NUMERAL ZERO..MAYAN NUMERAL NINETEEN {0x1D300, 0x1D356, prN}, // So [87] MONOGRAM FOR EARTH..TETRAGRAM FOR FOSTERING {0x1D360, 0x1D378, prN}, // No [25] COUNTING ROD UNIT DIGIT ONE..TALLY MARK FIVE @@ -2353,11 +2377,14 @@ var eastAsianWidth = [][3]int{ {0x1DF00, 0x1DF09, prN}, // Ll [10] LATIN SMALL LETTER FENG DIGRAPH WITH TRILL..LATIN SMALL LETTER T WITH HOOK AND RETROFLEX HOOK {0x1DF0A, 0x1DF0A, prN}, // Lo LATIN LETTER RETROFLEX CLICK WITH RETROFLEX HOOK {0x1DF0B, 0x1DF1E, prN}, // Ll [20] LATIN SMALL LETTER ESH WITH DOUBLE BAR..LATIN SMALL LETTER S WITH CURL + {0x1DF25, 0x1DF2A, prN}, // Ll [6] LATIN SMALL LETTER D WITH MID-HEIGHT LEFT HOOK..LATIN SMALL LETTER T WITH MID-HEIGHT LEFT HOOK {0x1E000, 0x1E006, prN}, // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE {0x1E008, 0x1E018, prN}, // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU {0x1E01B, 0x1E021, prN}, // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI {0x1E023, 0x1E024, prN}, // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS {0x1E026, 0x1E02A, prN}, // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA + {0x1E030, 0x1E06D, prN}, // Lm [62] MODIFIER LETTER CYRILLIC SMALL A..MODIFIER LETTER CYRILLIC SMALL STRAIGHT U WITH STROKE + {0x1E08F, 0x1E08F, prN}, // Mn COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I {0x1E100, 0x1E12C, prN}, // Lo [45] NYIAKENG PUACHUE HMONG LETTER MA..NYIAKENG PUACHUE HMONG LETTER W {0x1E130, 0x1E136, prN}, // Mn [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D {0x1E137, 0x1E13D, prN}, // Lm [7] NYIAKENG PUACHUE HMONG SIGN FOR PERSON..NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER @@ -2370,6 +2397,10 @@ var eastAsianWidth = [][3]int{ {0x1E2EC, 0x1E2EF, prN}, // Mn [4] WANCHO TONE TUP..WANCHO TONE KOINI {0x1E2F0, 0x1E2F9, prN}, // Nd [10] WANCHO DIGIT ZERO..WANCHO DIGIT NINE {0x1E2FF, 0x1E2FF, prN}, // Sc WANCHO NGUN SIGN + {0x1E4D0, 0x1E4EA, prN}, // Lo [27] NAG MUNDARI LETTER O..NAG MUNDARI LETTER ELL + {0x1E4EB, 0x1E4EB, prN}, // Lm NAG MUNDARI SIGN OJOD + {0x1E4EC, 0x1E4EF, prN}, // Mn [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH + {0x1E4F0, 0x1E4F9, prN}, // Nd [10] NAG MUNDARI DIGIT ZERO..NAG MUNDARI DIGIT NINE {0x1E7E0, 0x1E7E6, prN}, // Lo [7] ETHIOPIC SYLLABLE HHYA..ETHIOPIC SYLLABLE HHYO {0x1E7E8, 0x1E7EB, prN}, // Lo [4] ETHIOPIC SYLLABLE GURAGE HHWA..ETHIOPIC SYLLABLE HHWE {0x1E7ED, 0x1E7EE, prN}, // Lo [2] ETHIOPIC SYLLABLE GURAGE MWI..ETHIOPIC SYLLABLE GURAGE MWEE @@ -2498,13 +2529,14 @@ var eastAsianWidth = [][3]int{ {0x1F6D0, 0x1F6D2, prW}, // So [3] PLACE OF WORSHIP..SHOPPING TROLLEY {0x1F6D3, 0x1F6D4, prN}, // So [2] STUPA..PAGODA {0x1F6D5, 0x1F6D7, prW}, // So [3] HINDU TEMPLE..ELEVATOR - {0x1F6DD, 0x1F6DF, prW}, // So [3] PLAYGROUND SLIDE..RING BUOY + {0x1F6DC, 0x1F6DF, prW}, // So [4] WIRELESS..RING BUOY {0x1F6E0, 0x1F6EA, prN}, // So [11] HAMMER AND WRENCH..NORTHEAST-POINTING AIRPLANE {0x1F6EB, 0x1F6EC, prW}, // So [2] AIRPLANE DEPARTURE..AIRPLANE ARRIVING {0x1F6F0, 0x1F6F3, prN}, // So [4] SATELLITE..PASSENGER SHIP {0x1F6F4, 0x1F6FC, prW}, // So [9] SCOOTER..ROLLER SKATE - {0x1F700, 0x1F773, prN}, // So [116] ALCHEMICAL SYMBOL FOR QUINTESSENCE..ALCHEMICAL SYMBOL FOR HALF OUNCE - {0x1F780, 0x1F7D8, prN}, // So [89] BLACK LEFT-POINTING ISOSCELES RIGHT TRIANGLE..NEGATIVE CIRCLED SQUARE + {0x1F700, 0x1F776, prN}, // So [119] ALCHEMICAL SYMBOL FOR QUINTESSENCE..LUNAR ECLIPSE + {0x1F77B, 0x1F77F, prN}, // So [5] HAUMEA..ORCUS + {0x1F780, 0x1F7D9, prN}, // So [90] BLACK LEFT-POINTING ISOSCELES RIGHT TRIANGLE..NINE POINTED WHITE STAR {0x1F7E0, 0x1F7EB, prW}, // So [12] LARGE ORANGE CIRCLE..LARGE BROWN SQUARE {0x1F7F0, 0x1F7F0, prW}, // So HEAVY EQUALS SIGN {0x1F800, 0x1F80B, prN}, // So [12] LEFTWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD..DOWNWARDS ARROW WITH LARGE TRIANGLE ARROWHEAD @@ -2521,22 +2553,20 @@ var eastAsianWidth = [][3]int{ {0x1F947, 0x1F9FF, prW}, // So [185] FIRST PLACE MEDAL..NAZAR AMULET {0x1FA00, 0x1FA53, prN}, // So [84] NEUTRAL CHESS KING..BLACK CHESS KNIGHT-BISHOP {0x1FA60, 0x1FA6D, prN}, // So [14] XIANGQI RED GENERAL..XIANGQI BLACK SOLDIER - {0x1FA70, 0x1FA74, prW}, // So [5] BALLET SHOES..THONG SANDAL - {0x1FA78, 0x1FA7C, prW}, // So [5] DROP OF BLOOD..CRUTCH - {0x1FA80, 0x1FA86, prW}, // So [7] YO-YO..NESTING DOLLS - {0x1FA90, 0x1FAAC, prW}, // So [29] RINGED PLANET..HAMSA - {0x1FAB0, 0x1FABA, prW}, // So [11] FLY..NEST WITH EGGS - {0x1FAC0, 0x1FAC5, prW}, // So [6] ANATOMICAL HEART..PERSON WITH CROWN - {0x1FAD0, 0x1FAD9, prW}, // So [10] BLUEBERRIES..JAR - {0x1FAE0, 0x1FAE7, prW}, // So [8] MELTING FACE..BUBBLES - {0x1FAF0, 0x1FAF6, prW}, // So [7] HAND WITH INDEX FINGER AND THUMB CROSSED..HEART HANDS + {0x1FA70, 0x1FA7C, prW}, // So [13] BALLET SHOES..CRUTCH + {0x1FA80, 0x1FA88, prW}, // So [9] YO-YO..FLUTE + {0x1FA90, 0x1FABD, prW}, // So [46] RINGED PLANET..WING + {0x1FABF, 0x1FAC5, prW}, // So [7] GOOSE..PERSON WITH CROWN + {0x1FACE, 0x1FADB, prW}, // So [14] MOOSE..PEA POD + {0x1FAE0, 0x1FAE8, prW}, // So [9] MELTING FACE..SHAKING FACE + {0x1FAF0, 0x1FAF8, prW}, // So [9] HAND WITH INDEX FINGER AND THUMB CROSSED..RIGHTWARDS PUSHING HAND {0x1FB00, 0x1FB92, prN}, // So [147] BLOCK SEXTANT-1..UPPER HALF INVERSE MEDIUM SHADE AND LOWER HALF BLOCK {0x1FB94, 0x1FBCA, prN}, // So [55] LEFT HALF INVERSE MEDIUM SHADE AND RIGHT HALF BLOCK..WHITE UP-POINTING CHEVRON {0x1FBF0, 0x1FBF9, prN}, // Nd [10] SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE {0x20000, 0x2A6DF, prW}, // Lo [42720] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DF {0x2A6E0, 0x2A6FF, prW}, // Cn [32] .. - {0x2A700, 0x2B738, prW}, // Lo [4153] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B738 - {0x2B739, 0x2B73F, prW}, // Cn [7] .. + {0x2A700, 0x2B739, prW}, // Lo [4154] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B739 + {0x2B73A, 0x2B73F, prW}, // Cn [6] .. {0x2B740, 0x2B81D, prW}, // Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D {0x2B81E, 0x2B81F, prW}, // Cn [2] .. {0x2B820, 0x2CEA1, prW}, // Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 @@ -2547,7 +2577,9 @@ var eastAsianWidth = [][3]int{ {0x2FA1E, 0x2FA1F, prW}, // Cn [2] .. {0x2FA20, 0x2FFFD, prW}, // Cn [1502] .. {0x30000, 0x3134A, prW}, // Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A - {0x3134B, 0x3FFFD, prW}, // Cn [60595] .. + {0x3134B, 0x3134F, prW}, // Cn [5] .. + {0x31350, 0x323AF, prW}, // Lo [4192] CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF + {0x323B0, 0x3FFFD, prW}, // Cn [56398] .. {0xE0001, 0xE0001, prN}, // Cf LANGUAGE TAG {0xE0020, 0xE007F, prN}, // Cf [96] TAG SPACE..CANCEL TAG {0xE0100, 0xE01EF, prA}, // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 diff --git a/vendor/github.com/rivo/uniseg/emojipresentation.go b/vendor/github.com/rivo/uniseg/emojipresentation.go index fd0f7451af..9b5f499c4a 100644 --- a/vendor/github.com/rivo/uniseg/emojipresentation.go +++ b/vendor/github.com/rivo/uniseg/emojipresentation.go @@ -1,13 +1,13 @@ -package uniseg - // Code generated via go generate from gen_properties.go. DO NOT EDIT. +package uniseg + // emojiPresentation are taken from // // and -// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt +// https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) -// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode +// on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var emojiPresentation = [][3]int{ {0x231A, 0x231B, prEmojiPresentation}, // E0.6 [2] (⌚..⌛) watch..hourglass done @@ -211,6 +211,7 @@ var emojiPresentation = [][3]int{ {0x1F6D1, 0x1F6D2, prEmojiPresentation}, // E3.0 [2] (🛑..🛒) stop sign..shopping cart {0x1F6D5, 0x1F6D5, prEmojiPresentation}, // E12.0 [1] (🛕) hindu temple {0x1F6D6, 0x1F6D7, prEmojiPresentation}, // E13.0 [2] (🛖..🛗) hut..elevator + {0x1F6DC, 0x1F6DC, prEmojiPresentation}, // E15.0 [1] (🛜) wireless {0x1F6DD, 0x1F6DF, prEmojiPresentation}, // E14.0 [3] (🛝..🛟) playground slide..ring buoy {0x1F6EB, 0x1F6EC, prEmojiPresentation}, // E1.0 [2] (🛫..🛬) airplane departure..airplane arrival {0x1F6F4, 0x1F6F6, prEmojiPresentation}, // E3.0 [3] (🛴..🛶) kick scooter..canoe @@ -267,19 +268,28 @@ var emojiPresentation = [][3]int{ {0x1F9E7, 0x1F9FF, prEmojiPresentation}, // E11.0 [25] (🧧..🧿) red envelope..nazar amulet {0x1FA70, 0x1FA73, prEmojiPresentation}, // E12.0 [4] (🩰..🩳) ballet shoes..shorts {0x1FA74, 0x1FA74, prEmojiPresentation}, // E13.0 [1] (🩴) thong sandal + {0x1FA75, 0x1FA77, prEmojiPresentation}, // E15.0 [3] (🩵..🩷) light blue heart..pink heart {0x1FA78, 0x1FA7A, prEmojiPresentation}, // E12.0 [3] (🩸..🩺) drop of blood..stethoscope {0x1FA7B, 0x1FA7C, prEmojiPresentation}, // E14.0 [2] (🩻..🩼) x-ray..crutch {0x1FA80, 0x1FA82, prEmojiPresentation}, // E12.0 [3] (🪀..🪂) yo-yo..parachute {0x1FA83, 0x1FA86, prEmojiPresentation}, // E13.0 [4] (🪃..🪆) boomerang..nesting dolls + {0x1FA87, 0x1FA88, prEmojiPresentation}, // E15.0 [2] (🪇..🪈) maracas..flute {0x1FA90, 0x1FA95, prEmojiPresentation}, // E12.0 [6] (🪐..🪕) ringed planet..banjo {0x1FA96, 0x1FAA8, prEmojiPresentation}, // E13.0 [19] (🪖..🪨) military helmet..rock {0x1FAA9, 0x1FAAC, prEmojiPresentation}, // E14.0 [4] (🪩..🪬) mirror ball..hamsa + {0x1FAAD, 0x1FAAF, prEmojiPresentation}, // E15.0 [3] (🪭..🪯) folding hand fan..khanda {0x1FAB0, 0x1FAB6, prEmojiPresentation}, // E13.0 [7] (🪰..🪶) fly..feather {0x1FAB7, 0x1FABA, prEmojiPresentation}, // E14.0 [4] (🪷..🪺) lotus..nest with eggs + {0x1FABB, 0x1FABD, prEmojiPresentation}, // E15.0 [3] (🪻..🪽) hyacinth..wing + {0x1FABF, 0x1FABF, prEmojiPresentation}, // E15.0 [1] (🪿) goose {0x1FAC0, 0x1FAC2, prEmojiPresentation}, // E13.0 [3] (🫀..🫂) anatomical heart..people hugging {0x1FAC3, 0x1FAC5, prEmojiPresentation}, // E14.0 [3] (🫃..🫅) pregnant man..person with crown + {0x1FACE, 0x1FACF, prEmojiPresentation}, // E15.0 [2] (🫎..🫏) moose..donkey {0x1FAD0, 0x1FAD6, prEmojiPresentation}, // E13.0 [7] (🫐..🫖) blueberries..teapot {0x1FAD7, 0x1FAD9, prEmojiPresentation}, // E14.0 [3] (🫗..🫙) pouring liquid..jar + {0x1FADA, 0x1FADB, prEmojiPresentation}, // E15.0 [2] (🫚..🫛) ginger root..pea pod {0x1FAE0, 0x1FAE7, prEmojiPresentation}, // E14.0 [8] (🫠..🫧) melting face..bubbles + {0x1FAE8, 0x1FAE8, prEmojiPresentation}, // E15.0 [1] (🫨) shaking face {0x1FAF0, 0x1FAF6, prEmojiPresentation}, // E14.0 [7] (🫰..🫶) hand with index finger and thumb crossed..heart hands + {0x1FAF7, 0x1FAF8, prEmojiPresentation}, // E15.0 [2] (🫷..🫸) leftwards pushing hand..rightwards pushing hand } diff --git a/vendor/github.com/rivo/uniseg/gen_breaktest.go b/vendor/github.com/rivo/uniseg/gen_breaktest.go index e613c4cd00..6bfbeb5e7f 100644 --- a/vendor/github.com/rivo/uniseg/gen_breaktest.go +++ b/vendor/github.com/rivo/uniseg/gen_breaktest.go @@ -32,7 +32,7 @@ import ( // We want to test against a specific version rather than the latest. When the // package is upgraded to a new version, change these to generate new tests. const ( - testCaseURL = `https://www.unicode.org/Public/14.0.0/ucd/auxiliary/%s.txt` + testCaseURL = `https://www.unicode.org/Public/15.0.0/ucd/auxiliary/%s.txt` ) func main() { @@ -76,9 +76,9 @@ func parse(url string) ([]byte, error) { buf := new(bytes.Buffer) buf.Grow(120 << 10) - buf.WriteString(`package uniseg + buf.WriteString(`// Code generated via go generate from gen_breaktest.go. DO NOT EDIT. -// Code generated via go generate from gen_breaktest.go. DO NOT EDIT. +package uniseg // ` + os.Args[3] + ` are Grapheme testcases taken from // ` + url + ` @@ -136,7 +136,9 @@ var ( // // E.g. for the input b="÷ 0020 × 0308 ÷ 1F1E6 ÷" // it will append -// "\u0020\u0308\U0001F1E6" +// +// "\u0020\u0308\U0001F1E6" +// // and "[][]rune{{0x0020,0x0308},{0x1F1E6},}" // to orig and exp respectively. // diff --git a/vendor/github.com/rivo/uniseg/gen_properties.go b/vendor/github.com/rivo/uniseg/gen_properties.go index 999d5efddf..8992d2c5f8 100644 --- a/vendor/github.com/rivo/uniseg/gen_properties.go +++ b/vendor/github.com/rivo/uniseg/gen_properties.go @@ -41,8 +41,8 @@ import ( // We want to test against a specific version rather than the latest. When the // package is upgraded to a new version, change these to generate new tests. const ( - propertyURL = `https://www.unicode.org/Public/14.0.0/ucd/%s.txt` - emojiURL = `https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt` + propertyURL = `https://www.unicode.org/Public/15.0.0/ucd/%s.txt` + emojiURL = `https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt` ) // The regular expression for a line containing a code point range property. @@ -178,6 +178,11 @@ func parse(propertyURL, emojiProperty string, includeGeneralCategory bool) (stri } } + // Avoid overflow during binary search. + if len(properties) >= 1<<31 { + return "", errors.New("too many properties") + } + // Sort properties. sort.Slice(properties, func(i, j int) bool { left, _ := strconv.ParseUint(properties[i][0], 16, 64) @@ -200,9 +205,9 @@ func parse(propertyURL, emojiProperty string, includeGeneralCategory bool) (stri // ` + emojiURL + ` // ("Extended_Pictographic" only)` } - buf.WriteString(`package uniseg + buf.WriteString(`// Code generated via go generate from gen_properties.go. DO NOT EDIT. -// Code generated via go generate from gen_properties.go. DO NOT EDIT. +package uniseg // ` + os.Args[3] + ` are taken from // ` + propertyURL + emojiComment + ` diff --git a/vendor/github.com/rivo/uniseg/graphemeproperties.go b/vendor/github.com/rivo/uniseg/graphemeproperties.go index a87d140bf2..0aff4a619a 100644 --- a/vendor/github.com/rivo/uniseg/graphemeproperties.go +++ b/vendor/github.com/rivo/uniseg/graphemeproperties.go @@ -1,13 +1,13 @@ -package uniseg - // Code generated via go generate from gen_properties.go. DO NOT EDIT. +package uniseg + // graphemeCodePoints are taken from -// https://www.unicode.org/Public/14.0.0/ucd/auxiliary/GraphemeBreakProperty.txt +// https://www.unicode.org/Public/15.0.0/ucd/auxiliary/GraphemeBreakProperty.txt // and -// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt +// https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) -// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode +// on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var graphemeCodePoints = [][3]int{ {0x0000, 0x0009, prControl}, // Cc [10] .. @@ -143,6 +143,7 @@ var graphemeCodePoints = [][3]int{ {0x0CCC, 0x0CCD, prExtend}, // Mn [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA {0x0CD5, 0x0CD6, prExtend}, // Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK {0x0CE2, 0x0CE3, prExtend}, // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL + {0x0CF3, 0x0CF3, prSpacingMark}, // Mc KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT {0x0D00, 0x0D01, prExtend}, // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU {0x0D02, 0x0D03, prSpacingMark}, // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA {0x0D3B, 0x0D3C, prExtend}, // Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA @@ -172,7 +173,7 @@ var graphemeCodePoints = [][3]int{ {0x0EB1, 0x0EB1, prExtend}, // Mn LAO VOWEL SIGN MAI KAN {0x0EB3, 0x0EB3, prSpacingMark}, // Lo LAO VOWEL SIGN AM {0x0EB4, 0x0EBC, prExtend}, // Mn [9] LAO VOWEL SIGN I..LAO SEMIVOWEL SIGN LO - {0x0EC8, 0x0ECD, prExtend}, // Mn [6] LAO TONE MAI EK..LAO NIGGAHITA + {0x0EC8, 0x0ECE, prExtend}, // Mn [7] LAO TONE MAI EK..LAO YAMAKKAN {0x0F18, 0x0F19, prExtend}, // Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS {0x0F35, 0x0F35, prExtend}, // Mn TIBETAN MARK NGAS BZUNG NYI ZLA {0x0F37, 0x0F37, prExtend}, // Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS @@ -1336,6 +1337,7 @@ var graphemeCodePoints = [][3]int{ {0x10AE5, 0x10AE6, prExtend}, // Mn [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW {0x10D24, 0x10D27, prExtend}, // Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI {0x10EAB, 0x10EAC, prExtend}, // Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK + {0x10EFD, 0x10EFF, prExtend}, // Mn [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA {0x10F46, 0x10F50, prExtend}, // Mn [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW {0x10F82, 0x10F85, prExtend}, // Mn [4] OLD UYGHUR COMBINING DOT ABOVE..OLD UYGHUR COMBINING TWO DOTS BELOW {0x11000, 0x11000, prSpacingMark}, // Mc BRAHMI SIGN CANDRABINDU @@ -1375,6 +1377,7 @@ var graphemeCodePoints = [][3]int{ {0x11235, 0x11235, prSpacingMark}, // Mc KHOJKI SIGN VIRAMA {0x11236, 0x11237, prExtend}, // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA {0x1123E, 0x1123E, prExtend}, // Mn KHOJKI SIGN SUKUN + {0x11241, 0x11241, prExtend}, // Mn KHOJKI VOWEL SIGN VOCALIC R {0x112DF, 0x112DF, prExtend}, // Mn KHUDAWADI SIGN ANUSVARA {0x112E0, 0x112E2, prSpacingMark}, // Mc [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II {0x112E3, 0x112EA, prExtend}, // Mn [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA @@ -1494,7 +1497,18 @@ var graphemeCodePoints = [][3]int{ {0x11D97, 0x11D97, prExtend}, // Mn GUNJALA GONDI VIRAMA {0x11EF3, 0x11EF4, prExtend}, // Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U {0x11EF5, 0x11EF6, prSpacingMark}, // Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O - {0x13430, 0x13438, prControl}, // Cf [9] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END SEGMENT + {0x11F00, 0x11F01, prExtend}, // Mn [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA + {0x11F02, 0x11F02, prPrepend}, // Lo KAWI SIGN REPHA + {0x11F03, 0x11F03, prSpacingMark}, // Mc KAWI SIGN VISARGA + {0x11F34, 0x11F35, prSpacingMark}, // Mc [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA + {0x11F36, 0x11F3A, prExtend}, // Mn [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R + {0x11F3E, 0x11F3F, prSpacingMark}, // Mc [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI + {0x11F40, 0x11F40, prExtend}, // Mn KAWI VOWEL SIGN EU + {0x11F41, 0x11F41, prSpacingMark}, // Mc KAWI SIGN KILLER + {0x11F42, 0x11F42, prExtend}, // Mn KAWI CONJOINER + {0x13430, 0x1343F, prControl}, // Cf [16] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE + {0x13440, 0x13440, prExtend}, // Mn EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY + {0x13447, 0x13455, prExtend}, // Mn [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED {0x16AF0, 0x16AF4, prExtend}, // Mn [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE {0x16B30, 0x16B36, prExtend}, // Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM {0x16F4F, 0x16F4F, prExtend}, // Mn MIAO SIGN CONSONANT MODIFIER BAR @@ -1527,9 +1541,11 @@ var graphemeCodePoints = [][3]int{ {0x1E01B, 0x1E021, prExtend}, // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI {0x1E023, 0x1E024, prExtend}, // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS {0x1E026, 0x1E02A, prExtend}, // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA + {0x1E08F, 0x1E08F, prExtend}, // Mn COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I {0x1E130, 0x1E136, prExtend}, // Mn [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D {0x1E2AE, 0x1E2AE, prExtend}, // Mn TOTO SIGN RISING TONE {0x1E2EC, 0x1E2EF, prExtend}, // Mn [4] WANCHO TONE TUP..WANCHO TONE KOINI + {0x1E4EC, 0x1E4EF, prExtend}, // Mn [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH {0x1E8D0, 0x1E8D6, prExtend}, // Mn [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS {0x1E944, 0x1E94A, prExtend}, // Mn [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA {0x1F000, 0x1F003, prExtendedPictographic}, // E0.0 [4] (🀀..🀃) MAHJONG TILE EAST WIND..MAHJONG TILE NORTH WIND @@ -1780,7 +1796,8 @@ var graphemeCodePoints = [][3]int{ {0x1F6D3, 0x1F6D4, prExtendedPictographic}, // E0.0 [2] (🛓..🛔) STUPA..PAGODA {0x1F6D5, 0x1F6D5, prExtendedPictographic}, // E12.0 [1] (🛕) hindu temple {0x1F6D6, 0x1F6D7, prExtendedPictographic}, // E13.0 [2] (🛖..🛗) hut..elevator - {0x1F6D8, 0x1F6DC, prExtendedPictographic}, // E0.0 [5] (🛘..🛜) .. + {0x1F6D8, 0x1F6DB, prExtendedPictographic}, // E0.0 [4] (🛘..🛛) .. + {0x1F6DC, 0x1F6DC, prExtendedPictographic}, // E15.0 [1] (🛜) wireless {0x1F6DD, 0x1F6DF, prExtendedPictographic}, // E14.0 [3] (🛝..🛟) playground slide..ring buoy {0x1F6E0, 0x1F6E5, prExtendedPictographic}, // E0.7 [6] (🛠️..🛥️) hammer and wrench..motor boat {0x1F6E6, 0x1F6E8, prExtendedPictographic}, // E0.0 [3] (🛦..🛨) UP-POINTING MILITARY AIRPLANE..UP-POINTING SMALL AIRPLANE @@ -1797,7 +1814,7 @@ var graphemeCodePoints = [][3]int{ {0x1F6FA, 0x1F6FA, prExtendedPictographic}, // E12.0 [1] (🛺) auto rickshaw {0x1F6FB, 0x1F6FC, prExtendedPictographic}, // E13.0 [2] (🛻..🛼) pickup truck..roller skate {0x1F6FD, 0x1F6FF, prExtendedPictographic}, // E0.0 [3] (🛽..🛿) .. - {0x1F774, 0x1F77F, prExtendedPictographic}, // E0.0 [12] (🝴..🝿) .. + {0x1F774, 0x1F77F, prExtendedPictographic}, // E0.0 [12] (🝴..🝿) LOT OF FORTUNE..ORCUS {0x1F7D5, 0x1F7DF, prExtendedPictographic}, // E0.0 [11] (🟕..🟟) CIRCLED TRIANGLE.. {0x1F7E0, 0x1F7EB, prExtendedPictographic}, // E12.0 [12] (🟠..🟫) orange circle..brown square {0x1F7EC, 0x1F7EF, prExtendedPictographic}, // E0.0 [4] (🟬..🟯) .. @@ -1856,30 +1873,37 @@ var graphemeCodePoints = [][3]int{ {0x1FA00, 0x1FA6F, prExtendedPictographic}, // E0.0 [112] (🨀..🩯) NEUTRAL CHESS KING.. {0x1FA70, 0x1FA73, prExtendedPictographic}, // E12.0 [4] (🩰..🩳) ballet shoes..shorts {0x1FA74, 0x1FA74, prExtendedPictographic}, // E13.0 [1] (🩴) thong sandal - {0x1FA75, 0x1FA77, prExtendedPictographic}, // E0.0 [3] (🩵..🩷) .. + {0x1FA75, 0x1FA77, prExtendedPictographic}, // E15.0 [3] (🩵..🩷) light blue heart..pink heart {0x1FA78, 0x1FA7A, prExtendedPictographic}, // E12.0 [3] (🩸..🩺) drop of blood..stethoscope {0x1FA7B, 0x1FA7C, prExtendedPictographic}, // E14.0 [2] (🩻..🩼) x-ray..crutch {0x1FA7D, 0x1FA7F, prExtendedPictographic}, // E0.0 [3] (🩽..🩿) .. {0x1FA80, 0x1FA82, prExtendedPictographic}, // E12.0 [3] (🪀..🪂) yo-yo..parachute {0x1FA83, 0x1FA86, prExtendedPictographic}, // E13.0 [4] (🪃..🪆) boomerang..nesting dolls - {0x1FA87, 0x1FA8F, prExtendedPictographic}, // E0.0 [9] (🪇..🪏) .. + {0x1FA87, 0x1FA88, prExtendedPictographic}, // E15.0 [2] (🪇..🪈) maracas..flute + {0x1FA89, 0x1FA8F, prExtendedPictographic}, // E0.0 [7] (🪉..🪏) .. {0x1FA90, 0x1FA95, prExtendedPictographic}, // E12.0 [6] (🪐..🪕) ringed planet..banjo {0x1FA96, 0x1FAA8, prExtendedPictographic}, // E13.0 [19] (🪖..🪨) military helmet..rock {0x1FAA9, 0x1FAAC, prExtendedPictographic}, // E14.0 [4] (🪩..🪬) mirror ball..hamsa - {0x1FAAD, 0x1FAAF, prExtendedPictographic}, // E0.0 [3] (🪭..🪯) .. + {0x1FAAD, 0x1FAAF, prExtendedPictographic}, // E15.0 [3] (🪭..🪯) folding hand fan..khanda {0x1FAB0, 0x1FAB6, prExtendedPictographic}, // E13.0 [7] (🪰..🪶) fly..feather {0x1FAB7, 0x1FABA, prExtendedPictographic}, // E14.0 [4] (🪷..🪺) lotus..nest with eggs - {0x1FABB, 0x1FABF, prExtendedPictographic}, // E0.0 [5] (🪻..🪿) .. + {0x1FABB, 0x1FABD, prExtendedPictographic}, // E15.0 [3] (🪻..🪽) hyacinth..wing + {0x1FABE, 0x1FABE, prExtendedPictographic}, // E0.0 [1] (🪾) + {0x1FABF, 0x1FABF, prExtendedPictographic}, // E15.0 [1] (🪿) goose {0x1FAC0, 0x1FAC2, prExtendedPictographic}, // E13.0 [3] (🫀..🫂) anatomical heart..people hugging {0x1FAC3, 0x1FAC5, prExtendedPictographic}, // E14.0 [3] (🫃..🫅) pregnant man..person with crown - {0x1FAC6, 0x1FACF, prExtendedPictographic}, // E0.0 [10] (🫆..🫏) .. + {0x1FAC6, 0x1FACD, prExtendedPictographic}, // E0.0 [8] (🫆..🫍) .. + {0x1FACE, 0x1FACF, prExtendedPictographic}, // E15.0 [2] (🫎..🫏) moose..donkey {0x1FAD0, 0x1FAD6, prExtendedPictographic}, // E13.0 [7] (🫐..🫖) blueberries..teapot {0x1FAD7, 0x1FAD9, prExtendedPictographic}, // E14.0 [3] (🫗..🫙) pouring liquid..jar - {0x1FADA, 0x1FADF, prExtendedPictographic}, // E0.0 [6] (🫚..🫟) .. + {0x1FADA, 0x1FADB, prExtendedPictographic}, // E15.0 [2] (🫚..🫛) ginger root..pea pod + {0x1FADC, 0x1FADF, prExtendedPictographic}, // E0.0 [4] (🫜..🫟) .. {0x1FAE0, 0x1FAE7, prExtendedPictographic}, // E14.0 [8] (🫠..🫧) melting face..bubbles - {0x1FAE8, 0x1FAEF, prExtendedPictographic}, // E0.0 [8] (🫨..🫯) .. + {0x1FAE8, 0x1FAE8, prExtendedPictographic}, // E15.0 [1] (🫨) shaking face + {0x1FAE9, 0x1FAEF, prExtendedPictographic}, // E0.0 [7] (🫩..🫯) .. {0x1FAF0, 0x1FAF6, prExtendedPictographic}, // E14.0 [7] (🫰..🫶) hand with index finger and thumb crossed..heart hands - {0x1FAF7, 0x1FAFF, prExtendedPictographic}, // E0.0 [9] (🫷..🫿) .. + {0x1FAF7, 0x1FAF8, prExtendedPictographic}, // E15.0 [2] (🫷..🫸) leftwards pushing hand..rightwards pushing hand + {0x1FAF9, 0x1FAFF, prExtendedPictographic}, // E0.0 [7] (🫹..🫿) .. {0x1FC00, 0x1FFFD, prExtendedPictographic}, // E0.0[1022] (🰀..🿽) .. {0xE0000, 0xE0000, prControl}, // Cn {0xE0001, 0xE0001, prControl}, // Cf LANGUAGE TAG diff --git a/vendor/github.com/rivo/uniseg/graphemerules.go b/vendor/github.com/rivo/uniseg/graphemerules.go index 9f46b575bb..bb4a42073c 100644 --- a/vendor/github.com/rivo/uniseg/graphemerules.go +++ b/vendor/github.com/rivo/uniseg/graphemerules.go @@ -36,7 +36,7 @@ const ( // are equal. Stop. // 6. Assume grAny and grBoundary. // -// Unicode version 14.0.0. +// Unicode version 15.0.0. var grTransitions = map[[2]int][3]int{ // GB5 {grAny, prCR}: {grCR, grBoundary, 50}, diff --git a/vendor/github.com/rivo/uniseg/line.go b/vendor/github.com/rivo/uniseg/line.go index 87f28503f4..e46be37a29 100644 --- a/vendor/github.com/rivo/uniseg/line.go +++ b/vendor/github.com/rivo/uniseg/line.go @@ -80,7 +80,7 @@ func FirstLineSegment(b []byte, state int) (segment, rest []byte, mustBreak bool } } -// FirstLineSegmentInString is like FirstLineSegment() but its input and outputs +// FirstLineSegmentInString is like [FirstLineSegment] but its input and outputs // are strings. func FirstLineSegmentInString(str string, state int) (segment, rest string, mustBreak bool, newState int) { // An empty byte slice returns nothing. @@ -123,12 +123,12 @@ func FirstLineSegmentInString(str string, state int) (segment, rest string, must func HasTrailingLineBreak(b []byte) bool { r, _ := utf8.DecodeLastRune(b) property, _ := propertyWithGenCat(lineBreakCodePoints, r) - return property == lbBK || property == lbCR || property == lbLF || property == lbNL + return property == prBK || property == prCR || property == prLF || property == prNL } // HasTrailingLineBreakInString is like [HasTrailingLineBreak] but for a string. func HasTrailingLineBreakInString(str string) bool { r, _ := utf8.DecodeLastRuneInString(str) property, _ := propertyWithGenCat(lineBreakCodePoints, r) - return property == lbBK || property == lbCR || property == lbLF || property == lbNL + return property == prBK || property == prCR || property == prLF || property == prNL } diff --git a/vendor/github.com/rivo/uniseg/lineproperties.go b/vendor/github.com/rivo/uniseg/lineproperties.go index 32169306e8..ac7fac4c05 100644 --- a/vendor/github.com/rivo/uniseg/lineproperties.go +++ b/vendor/github.com/rivo/uniseg/lineproperties.go @@ -1,13 +1,13 @@ -package uniseg - // Code generated via go generate from gen_properties.go. DO NOT EDIT. +package uniseg + // lineBreakCodePoints are taken from -// https://www.unicode.org/Public/14.0.0/ucd/LineBreak.txt +// https://www.unicode.org/Public/15.0.0/ucd/LineBreak.txt // and -// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt +// https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) -// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode +// on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var lineBreakCodePoints = [][4]int{ {0x0000, 0x0008, prCM, gcCc}, // [9] .. @@ -439,6 +439,7 @@ var lineBreakCodePoints = [][4]int{ {0x0CE2, 0x0CE3, prCM, gcMn}, // [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL {0x0CE6, 0x0CEF, prNU, gcNd}, // [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE {0x0CF1, 0x0CF2, prAL, gcLo}, // [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA + {0x0CF3, 0x0CF3, prCM, gcMc}, // KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT {0x0D00, 0x0D01, prCM, gcMn}, // [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU {0x0D02, 0x0D03, prCM, gcMc}, // [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA {0x0D04, 0x0D0C, prAL, gcLo}, // [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L @@ -500,7 +501,7 @@ var lineBreakCodePoints = [][4]int{ {0x0EBD, 0x0EBD, prSA, gcLo}, // LAO SEMIVOWEL SIGN NYO {0x0EC0, 0x0EC4, prSA, gcLo}, // [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI {0x0EC6, 0x0EC6, prSA, gcLm}, // LAO KO LA - {0x0EC8, 0x0ECD, prSA, gcMn}, // [6] LAO TONE MAI EK..LAO NIGGAHITA + {0x0EC8, 0x0ECE, prSA, gcMn}, // [7] LAO TONE MAI EK..LAO YAMAKKAN {0x0ED0, 0x0ED9, prNU, gcNd}, // [10] LAO DIGIT ZERO..LAO DIGIT NINE {0x0EDC, 0x0EDF, prSA, gcLo}, // [4] LAO HO NO..LAO LETTER KHMU NYO {0x0F00, 0x0F00, prAL, gcLo}, // TIBETAN SYLLABLE OM @@ -813,7 +814,11 @@ var lineBreakCodePoints = [][4]int{ {0x1D79, 0x1D7F, prAL, gcLl}, // [7] LATIN SMALL LETTER INSULAR G..LATIN SMALL LETTER UPSILON WITH STROKE {0x1D80, 0x1D9A, prAL, gcLl}, // [27] LATIN SMALL LETTER B WITH PALATAL HOOK..LATIN SMALL LETTER EZH WITH RETROFLEX HOOK {0x1D9B, 0x1DBF, prAL, gcLm}, // [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA - {0x1DC0, 0x1DFF, prCM, gcMn}, // [64] COMBINING DOTTED GRAVE ACCENT..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW + {0x1DC0, 0x1DCC, prCM, gcMn}, // [13] COMBINING DOTTED GRAVE ACCENT..COMBINING MACRON-BREVE + {0x1DCD, 0x1DCD, prGL, gcMn}, // COMBINING DOUBLE CIRCUMFLEX ABOVE + {0x1DCE, 0x1DFB, prCM, gcMn}, // [46] COMBINING OGONEK ABOVE..COMBINING DELETION MARK + {0x1DFC, 0x1DFC, prGL, gcMn}, // COMBINING DOUBLE INVERTED BREVE BELOW + {0x1DFD, 0x1DFF, prCM, gcMn}, // [3] COMBINING ALMOST EQUAL TO BELOW..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW {0x1E00, 0x1EFF, prAL, gcLC}, // [256] LATIN CAPITAL LETTER A WITH RING BELOW..LATIN SMALL LETTER Y WITH LOOP {0x1F00, 0x1F15, prAL, gcLC}, // [22] GREEK SMALL LETTER ALPHA WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA {0x1F18, 0x1F1D, prAL, gcLu}, // [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA @@ -889,7 +894,7 @@ var lineBreakCodePoints = [][4]int{ {0x2054, 0x2054, prAL, gcPc}, // INVERTED UNDERTIE {0x2055, 0x2055, prAL, gcPo}, // FLOWER PUNCTUATION MARK {0x2056, 0x2056, prBA, gcPo}, // THREE DOT PUNCTUATION - {0x2057, 0x2057, prAL, gcPo}, // QUADRUPLE PRIME + {0x2057, 0x2057, prPO, gcPo}, // QUADRUPLE PRIME {0x2058, 0x205B, prBA, gcPo}, // [4] FOUR DOT PUNCTUATION..FOUR DOT MARK {0x205C, 0x205C, prAL, gcPo}, // DOTTED CROSS {0x205D, 0x205E, prBA, gcPo}, // [2] TRICOLON..VERTICAL FOUR DOTS @@ -2751,6 +2756,7 @@ var lineBreakCodePoints = [][4]int{ {0x10EAB, 0x10EAC, prCM, gcMn}, // [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK {0x10EAD, 0x10EAD, prBA, gcPd}, // YEZIDI HYPHENATION MARK {0x10EB0, 0x10EB1, prAL, gcLo}, // [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE + {0x10EFD, 0x10EFF, prCM, gcMn}, // [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA {0x10F00, 0x10F1C, prAL, gcLo}, // [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL {0x10F1D, 0x10F26, prAL, gcNo}, // [10] OLD SOGDIAN NUMBER ONE..OLD SOGDIAN FRACTION ONE HALF {0x10F27, 0x10F27, prAL, gcLo}, // OLD SOGDIAN LIGATURE AYIN-DALETH @@ -2840,6 +2846,8 @@ var lineBreakCodePoints = [][4]int{ {0x1123B, 0x1123C, prBA, gcPo}, // [2] KHOJKI SECTION MARK..KHOJKI DOUBLE SECTION MARK {0x1123D, 0x1123D, prAL, gcPo}, // KHOJKI ABBREVIATION SIGN {0x1123E, 0x1123E, prCM, gcMn}, // KHOJKI SIGN SUKUN + {0x1123F, 0x11240, prAL, gcLo}, // [2] KHOJKI LETTER QA..KHOJKI LETTER SHORT I + {0x11241, 0x11241, prCM, gcMn}, // KHOJKI VOWEL SIGN VOCALIC R {0x11280, 0x11286, prAL, gcLo}, // [7] MULTANI LETTER A..MULTANI LETTER GA {0x11288, 0x11288, prAL, gcLo}, // MULTANI LETTER GHA {0x1128A, 0x1128D, prAL, gcLo}, // [4] MULTANI LETTER CA..MULTANI LETTER JJA @@ -3013,6 +3021,7 @@ var lineBreakCodePoints = [][4]int{ {0x11AA1, 0x11AA2, prBA, gcPo}, // [2] SOYOMBO TERMINAL MARK-1..SOYOMBO TERMINAL MARK-2 {0x11AB0, 0x11ABF, prAL, gcLo}, // [16] CANADIAN SYLLABICS NATTILIK HI..CANADIAN SYLLABICS SPA {0x11AC0, 0x11AF8, prAL, gcLo}, // [57] PAU CIN HAU LETTER PA..PAU CIN HAU GLOTTAL STOP FINAL + {0x11B00, 0x11B09, prBB, gcPo}, // [10] DEVANAGARI HEAD MARK..DEVANAGARI SIGN MINDU {0x11C00, 0x11C08, prAL, gcLo}, // [9] BHAIKSUKI LETTER A..BHAIKSUKI LETTER VOCALIC L {0x11C0A, 0x11C2E, prAL, gcLo}, // [37] BHAIKSUKI LETTER E..BHAIKSUKI LETTER HA {0x11C2F, 0x11C2F, prCM, gcMc}, // BHAIKSUKI VOWEL SIGN AA @@ -3059,6 +3068,20 @@ var lineBreakCodePoints = [][4]int{ {0x11EF3, 0x11EF4, prCM, gcMn}, // [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U {0x11EF5, 0x11EF6, prCM, gcMc}, // [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O {0x11EF7, 0x11EF8, prAL, gcPo}, // [2] MAKASAR PASSIMBANG..MAKASAR END OF SECTION + {0x11F00, 0x11F01, prCM, gcMn}, // [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA + {0x11F02, 0x11F02, prAL, gcLo}, // KAWI SIGN REPHA + {0x11F03, 0x11F03, prCM, gcMc}, // KAWI SIGN VISARGA + {0x11F04, 0x11F10, prAL, gcLo}, // [13] KAWI LETTER A..KAWI LETTER O + {0x11F12, 0x11F33, prAL, gcLo}, // [34] KAWI LETTER KA..KAWI LETTER JNYA + {0x11F34, 0x11F35, prCM, gcMc}, // [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA + {0x11F36, 0x11F3A, prCM, gcMn}, // [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R + {0x11F3E, 0x11F3F, prCM, gcMc}, // [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI + {0x11F40, 0x11F40, prCM, gcMn}, // KAWI VOWEL SIGN EU + {0x11F41, 0x11F41, prCM, gcMc}, // KAWI SIGN KILLER + {0x11F42, 0x11F42, prCM, gcMn}, // KAWI CONJOINER + {0x11F43, 0x11F44, prBA, gcPo}, // [2] KAWI DANDA..KAWI DOUBLE DANDA + {0x11F45, 0x11F4F, prID, gcPo}, // [11] KAWI PUNCTUATION SECTION MARKER..KAWI PUNCTUATION CLOSING SPIRAL + {0x11F50, 0x11F59, prNU, gcNd}, // [10] KAWI DIGIT ZERO..KAWI DIGIT NINE {0x11FB0, 0x11FB0, prAL, gcLo}, // LISU LETTER YHA {0x11FC0, 0x11FD4, prAL, gcNo}, // [21] TAMIL FRACTION ONE THREE-HUNDRED-AND-TWENTIETH..TAMIL FRACTION DOWNSCALING FACTOR KIIZH {0x11FD5, 0x11FDC, prAL, gcSo}, // [8] TAMIL SIGN NEL..TAMIL SIGN MUKKURUNI @@ -3084,10 +3107,18 @@ var lineBreakCodePoints = [][4]int{ {0x1328A, 0x13378, prAL, gcLo}, // [239] EGYPTIAN HIEROGLYPH O037..EGYPTIAN HIEROGLYPH V011 {0x13379, 0x13379, prOP, gcLo}, // EGYPTIAN HIEROGLYPH V011A {0x1337A, 0x1337B, prCL, gcLo}, // [2] EGYPTIAN HIEROGLYPH V011B..EGYPTIAN HIEROGLYPH V011C - {0x1337C, 0x1342E, prAL, gcLo}, // [179] EGYPTIAN HIEROGLYPH V012..EGYPTIAN HIEROGLYPH AA032 + {0x1337C, 0x1342F, prAL, gcLo}, // [180] EGYPTIAN HIEROGLYPH V012..EGYPTIAN HIEROGLYPH V011D {0x13430, 0x13436, prGL, gcCf}, // [7] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH OVERLAY MIDDLE {0x13437, 0x13437, prOP, gcCf}, // EGYPTIAN HIEROGLYPH BEGIN SEGMENT {0x13438, 0x13438, prCL, gcCf}, // EGYPTIAN HIEROGLYPH END SEGMENT + {0x13439, 0x1343B, prGL, gcCf}, // [3] EGYPTIAN HIEROGLYPH INSERT AT MIDDLE..EGYPTIAN HIEROGLYPH INSERT AT BOTTOM + {0x1343C, 0x1343C, prOP, gcCf}, // EGYPTIAN HIEROGLYPH BEGIN ENCLOSURE + {0x1343D, 0x1343D, prCL, gcCf}, // EGYPTIAN HIEROGLYPH END ENCLOSURE + {0x1343E, 0x1343E, prOP, gcCf}, // EGYPTIAN HIEROGLYPH BEGIN WALLED ENCLOSURE + {0x1343F, 0x1343F, prCL, gcCf}, // EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE + {0x13440, 0x13440, prCM, gcMn}, // EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY + {0x13441, 0x13446, prAL, gcLo}, // [6] EGYPTIAN HIEROGLYPH FULL BLANK..EGYPTIAN HIEROGLYPH WIDE LOST SIGN + {0x13447, 0x13455, prCM, gcMn}, // [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED {0x14400, 0x145CD, prAL, gcLo}, // [462] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A409 {0x145CE, 0x145CE, prOP, gcLo}, // ANATOLIAN HIEROGLYPH A410 BEGIN LOGOGRAM MARK {0x145CF, 0x145CF, prCL, gcLo}, // ANATOLIAN HIEROGLYPH A410A END LOGOGRAM MARK @@ -3137,7 +3168,9 @@ var lineBreakCodePoints = [][4]int{ {0x1AFFD, 0x1AFFE, prAL, gcLm}, // [2] KATAKANA LETTER MINNAN NASALIZED TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-8 {0x1B000, 0x1B0FF, prID, gcLo}, // [256] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER RE-2 {0x1B100, 0x1B122, prID, gcLo}, // [35] HENTAIGANA LETTER RE-3..KATAKANA LETTER ARCHAIC WU + {0x1B132, 0x1B132, prCJ, gcLo}, // HIRAGANA LETTER SMALL KO {0x1B150, 0x1B152, prCJ, gcLo}, // [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO + {0x1B155, 0x1B155, prCJ, gcLo}, // KATAKANA LETTER SMALL KO {0x1B164, 0x1B167, prCJ, gcLo}, // [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N {0x1B170, 0x1B2FB, prID, gcLo}, // [396] NUSHU CHARACTER-1B170..NUSHU CHARACTER-1B2FB {0x1BC00, 0x1BC6A, prAL, gcLo}, // [107] DUPLOYAN LETTER H..DUPLOYAN LETTER VOCALIC M @@ -3168,6 +3201,7 @@ var lineBreakCodePoints = [][4]int{ {0x1D200, 0x1D241, prAL, gcSo}, // [66] GREEK VOCAL NOTATION SYMBOL-1..GREEK INSTRUMENTAL NOTATION SYMBOL-54 {0x1D242, 0x1D244, prCM, gcMn}, // [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME {0x1D245, 0x1D245, prAL, gcSo}, // GREEK MUSICAL LEIMMA + {0x1D2C0, 0x1D2D3, prAL, gcNo}, // [20] KAKTOVIK NUMERAL ZERO..KAKTOVIK NUMERAL NINETEEN {0x1D2E0, 0x1D2F3, prAL, gcNo}, // [20] MAYAN NUMERAL ZERO..MAYAN NUMERAL NINETEEN {0x1D300, 0x1D356, prAL, gcSo}, // [87] MONOGRAM FOR EARTH..TETRAGRAM FOR FOSTERING {0x1D360, 0x1D378, prAL, gcNo}, // [25] COUNTING ROD UNIT DIGIT ONE..TALLY MARK FIVE @@ -3228,11 +3262,14 @@ var lineBreakCodePoints = [][4]int{ {0x1DF00, 0x1DF09, prAL, gcLl}, // [10] LATIN SMALL LETTER FENG DIGRAPH WITH TRILL..LATIN SMALL LETTER T WITH HOOK AND RETROFLEX HOOK {0x1DF0A, 0x1DF0A, prAL, gcLo}, // LATIN LETTER RETROFLEX CLICK WITH RETROFLEX HOOK {0x1DF0B, 0x1DF1E, prAL, gcLl}, // [20] LATIN SMALL LETTER ESH WITH DOUBLE BAR..LATIN SMALL LETTER S WITH CURL + {0x1DF25, 0x1DF2A, prAL, gcLl}, // [6] LATIN SMALL LETTER D WITH MID-HEIGHT LEFT HOOK..LATIN SMALL LETTER T WITH MID-HEIGHT LEFT HOOK {0x1E000, 0x1E006, prCM, gcMn}, // [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE {0x1E008, 0x1E018, prCM, gcMn}, // [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU {0x1E01B, 0x1E021, prCM, gcMn}, // [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI {0x1E023, 0x1E024, prCM, gcMn}, // [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS {0x1E026, 0x1E02A, prCM, gcMn}, // [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA + {0x1E030, 0x1E06D, prAL, gcLm}, // [62] MODIFIER LETTER CYRILLIC SMALL A..MODIFIER LETTER CYRILLIC SMALL STRAIGHT U WITH STROKE + {0x1E08F, 0x1E08F, prCM, gcMn}, // COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I {0x1E100, 0x1E12C, prAL, gcLo}, // [45] NYIAKENG PUACHUE HMONG LETTER MA..NYIAKENG PUACHUE HMONG LETTER W {0x1E130, 0x1E136, prCM, gcMn}, // [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D {0x1E137, 0x1E13D, prAL, gcLm}, // [7] NYIAKENG PUACHUE HMONG SIGN FOR PERSON..NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER @@ -3245,6 +3282,10 @@ var lineBreakCodePoints = [][4]int{ {0x1E2EC, 0x1E2EF, prCM, gcMn}, // [4] WANCHO TONE TUP..WANCHO TONE KOINI {0x1E2F0, 0x1E2F9, prNU, gcNd}, // [10] WANCHO DIGIT ZERO..WANCHO DIGIT NINE {0x1E2FF, 0x1E2FF, prPR, gcSc}, // WANCHO NGUN SIGN + {0x1E4D0, 0x1E4EA, prAL, gcLo}, // [27] NAG MUNDARI LETTER O..NAG MUNDARI LETTER ELL + {0x1E4EB, 0x1E4EB, prAL, gcLm}, // NAG MUNDARI SIGN OJOD + {0x1E4EC, 0x1E4EF, prCM, gcMn}, // [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH + {0x1E4F0, 0x1E4F9, prNU, gcNd}, // [10] NAG MUNDARI DIGIT ZERO..NAG MUNDARI DIGIT NINE {0x1E7E0, 0x1E7E6, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE HHYA..ETHIOPIC SYLLABLE HHYO {0x1E7E8, 0x1E7EB, prAL, gcLo}, // [4] ETHIOPIC SYLLABLE GURAGE HHWA..ETHIOPIC SYLLABLE HHWE {0x1E7ED, 0x1E7EE, prAL, gcLo}, // [2] ETHIOPIC SYLLABLE GURAGE MWI..ETHIOPIC SYLLABLE GURAGE MWEE @@ -3412,16 +3453,18 @@ var lineBreakCodePoints = [][4]int{ {0x1F6C1, 0x1F6CB, prID, gcSo}, // [11] BATHTUB..COUCH AND LAMP {0x1F6CC, 0x1F6CC, prEB, gcSo}, // SLEEPING ACCOMMODATION {0x1F6CD, 0x1F6D7, prID, gcSo}, // [11] SHOPPING BAGS..ELEVATOR - {0x1F6D8, 0x1F6DC, prID, gcCn}, // [5] .. - {0x1F6DD, 0x1F6EC, prID, gcSo}, // [16] PLAYGROUND SLIDE..AIRPLANE ARRIVING + {0x1F6D8, 0x1F6DB, prID, gcCn}, // [4] .. + {0x1F6DC, 0x1F6EC, prID, gcSo}, // [17] WIRELESS..AIRPLANE ARRIVING {0x1F6ED, 0x1F6EF, prID, gcCn}, // [3] .. {0x1F6F0, 0x1F6FC, prID, gcSo}, // [13] SATELLITE..ROLLER SKATE {0x1F6FD, 0x1F6FF, prID, gcCn}, // [3] .. {0x1F700, 0x1F773, prAL, gcSo}, // [116] ALCHEMICAL SYMBOL FOR QUINTESSENCE..ALCHEMICAL SYMBOL FOR HALF OUNCE - {0x1F774, 0x1F77F, prID, gcCn}, // [12] .. + {0x1F774, 0x1F776, prID, gcSo}, // [3] LOT OF FORTUNE..LUNAR ECLIPSE + {0x1F777, 0x1F77A, prID, gcCn}, // [4] .. + {0x1F77B, 0x1F77F, prID, gcSo}, // [5] HAUMEA..ORCUS {0x1F780, 0x1F7D4, prAL, gcSo}, // [85] BLACK LEFT-POINTING ISOSCELES RIGHT TRIANGLE..HEAVY TWELVE POINTED PINWHEEL STAR - {0x1F7D5, 0x1F7D8, prID, gcSo}, // [4] CIRCLED TRIANGLE..NEGATIVE CIRCLED SQUARE - {0x1F7D9, 0x1F7DF, prID, gcCn}, // [7] .. + {0x1F7D5, 0x1F7D9, prID, gcSo}, // [5] CIRCLED TRIANGLE..NINE POINTED WHITE STAR + {0x1F7DA, 0x1F7DF, prID, gcCn}, // [6] .. {0x1F7E0, 0x1F7EB, prID, gcSo}, // [12] LARGE ORANGE CIRCLE..LARGE BROWN SQUARE {0x1F7EC, 0x1F7EF, prID, gcCn}, // [4] .. {0x1F7F0, 0x1F7F0, prID, gcSo}, // HEAVY EQUALS SIGN @@ -3467,33 +3510,29 @@ var lineBreakCodePoints = [][4]int{ {0x1FA54, 0x1FA5F, prID, gcCn}, // [12] .. {0x1FA60, 0x1FA6D, prID, gcSo}, // [14] XIANGQI RED GENERAL..XIANGQI BLACK SOLDIER {0x1FA6E, 0x1FA6F, prID, gcCn}, // [2] .. - {0x1FA70, 0x1FA74, prID, gcSo}, // [5] BALLET SHOES..THONG SANDAL - {0x1FA75, 0x1FA77, prID, gcCn}, // [3] .. - {0x1FA78, 0x1FA7C, prID, gcSo}, // [5] DROP OF BLOOD..CRUTCH + {0x1FA70, 0x1FA7C, prID, gcSo}, // [13] BALLET SHOES..CRUTCH {0x1FA7D, 0x1FA7F, prID, gcCn}, // [3] .. - {0x1FA80, 0x1FA86, prID, gcSo}, // [7] YO-YO..NESTING DOLLS - {0x1FA87, 0x1FA8F, prID, gcCn}, // [9] .. - {0x1FA90, 0x1FAAC, prID, gcSo}, // [29] RINGED PLANET..HAMSA - {0x1FAAD, 0x1FAAF, prID, gcCn}, // [3] .. - {0x1FAB0, 0x1FABA, prID, gcSo}, // [11] FLY..NEST WITH EGGS - {0x1FABB, 0x1FABF, prID, gcCn}, // [5] .. - {0x1FAC0, 0x1FAC2, prID, gcSo}, // [3] ANATOMICAL HEART..PEOPLE HUGGING + {0x1FA80, 0x1FA88, prID, gcSo}, // [9] YO-YO..FLUTE + {0x1FA89, 0x1FA8F, prID, gcCn}, // [7] .. + {0x1FA90, 0x1FABD, prID, gcSo}, // [46] RINGED PLANET..WING + {0x1FABE, 0x1FABE, prID, gcCn}, // + {0x1FABF, 0x1FAC2, prID, gcSo}, // [4] GOOSE..PEOPLE HUGGING {0x1FAC3, 0x1FAC5, prEB, gcSo}, // [3] PREGNANT MAN..PERSON WITH CROWN - {0x1FAC6, 0x1FACF, prID, gcCn}, // [10] .. - {0x1FAD0, 0x1FAD9, prID, gcSo}, // [10] BLUEBERRIES..JAR - {0x1FADA, 0x1FADF, prID, gcCn}, // [6] .. - {0x1FAE0, 0x1FAE7, prID, gcSo}, // [8] MELTING FACE..BUBBLES - {0x1FAE8, 0x1FAEF, prID, gcCn}, // [8] .. - {0x1FAF0, 0x1FAF6, prEB, gcSo}, // [7] HAND WITH INDEX FINGER AND THUMB CROSSED..HEART HANDS - {0x1FAF7, 0x1FAFF, prID, gcCn}, // [9] .. + {0x1FAC6, 0x1FACD, prID, gcCn}, // [8] .. + {0x1FACE, 0x1FADB, prID, gcSo}, // [14] MOOSE..PEA POD + {0x1FADC, 0x1FADF, prID, gcCn}, // [4] .. + {0x1FAE0, 0x1FAE8, prID, gcSo}, // [9] MELTING FACE..SHAKING FACE + {0x1FAE9, 0x1FAEF, prID, gcCn}, // [7] .. + {0x1FAF0, 0x1FAF8, prEB, gcSo}, // [9] HAND WITH INDEX FINGER AND THUMB CROSSED..RIGHTWARDS PUSHING HAND + {0x1FAF9, 0x1FAFF, prID, gcCn}, // [7] .. {0x1FB00, 0x1FB92, prAL, gcSo}, // [147] BLOCK SEXTANT-1..UPPER HALF INVERSE MEDIUM SHADE AND LOWER HALF BLOCK {0x1FB94, 0x1FBCA, prAL, gcSo}, // [55] LEFT HALF INVERSE MEDIUM SHADE AND RIGHT HALF BLOCK..WHITE UP-POINTING CHEVRON {0x1FBF0, 0x1FBF9, prNU, gcNd}, // [10] SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE {0x1FC00, 0x1FFFD, prID, gcCn}, // [1022] .. {0x20000, 0x2A6DF, prID, gcLo}, // [42720] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DF {0x2A6E0, 0x2A6FF, prID, gcCn}, // [32] .. - {0x2A700, 0x2B738, prID, gcLo}, // [4153] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B738 - {0x2B739, 0x2B73F, prID, gcCn}, // [7] .. + {0x2A700, 0x2B739, prID, gcLo}, // [4154] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B739 + {0x2B73A, 0x2B73F, prID, gcCn}, // [6] .. {0x2B740, 0x2B81D, prID, gcLo}, // [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D {0x2B81E, 0x2B81F, prID, gcCn}, // [2] .. {0x2B820, 0x2CEA1, prID, gcLo}, // [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 @@ -3504,7 +3543,9 @@ var lineBreakCodePoints = [][4]int{ {0x2FA1E, 0x2FA1F, prID, gcCn}, // [2] .. {0x2FA20, 0x2FFFD, prID, gcCn}, // [1502] .. {0x30000, 0x3134A, prID, gcLo}, // [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A - {0x3134B, 0x3FFFD, prID, gcCn}, // [60595] .. + {0x3134B, 0x3134F, prID, gcCn}, // [5] .. + {0x31350, 0x323AF, prID, gcLo}, // [4192] CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF + {0x323B0, 0x3FFFD, prID, gcCn}, // [56398] .. {0xE0001, 0xE0001, prCM, gcCf}, // LANGUAGE TAG {0xE0020, 0xE007F, prCM, gcCf}, // [96] TAG SPACE..CANCEL TAG {0xE0100, 0xE01EF, prCM, gcMn}, // [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 diff --git a/vendor/github.com/rivo/uniseg/linerules.go b/vendor/github.com/rivo/uniseg/linerules.go index d2ad51680e..acde9a1118 100644 --- a/vendor/github.com/rivo/uniseg/linerules.go +++ b/vendor/github.com/rivo/uniseg/linerules.go @@ -65,7 +65,7 @@ const ( ) // The line break parser's state transitions. It's anologous to grTransitions, -// see comments there for details. Unicode version 14.0.0. +// see comments there for details. Unicode version 15.0.0. var lbTransitions = map[[2]int][3]int{ // LB4. {lbAny, prBK}: {lbBK, LineCanBreak, 310}, diff --git a/vendor/github.com/rivo/uniseg/sentenceproperties.go b/vendor/github.com/rivo/uniseg/sentenceproperties.go index ba0cf2de11..67717ec1f3 100644 --- a/vendor/github.com/rivo/uniseg/sentenceproperties.go +++ b/vendor/github.com/rivo/uniseg/sentenceproperties.go @@ -1,13 +1,13 @@ -package uniseg - // Code generated via go generate from gen_properties.go. DO NOT EDIT. +package uniseg + // sentenceBreakCodePoints are taken from -// https://www.unicode.org/Public/14.0.0/ucd/auxiliary/SentenceBreakProperty.txt +// https://www.unicode.org/Public/15.0.0/ucd/auxiliary/SentenceBreakProperty.txt // and -// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt +// https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) -// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode +// on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var sentenceBreakCodePoints = [][3]int{ {0x0009, 0x0009, prSp}, // Cc @@ -843,6 +843,7 @@ var sentenceBreakCodePoints = [][3]int{ {0x0CE2, 0x0CE3, prExtend}, // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL {0x0CE6, 0x0CEF, prNumeric}, // Nd [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE {0x0CF1, 0x0CF2, prOLetter}, // Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA + {0x0CF3, 0x0CF3, prExtend}, // Mc KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT {0x0D00, 0x0D01, prExtend}, // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU {0x0D02, 0x0D03, prExtend}, // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA {0x0D04, 0x0D0C, prOLetter}, // Lo [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L @@ -896,7 +897,7 @@ var sentenceBreakCodePoints = [][3]int{ {0x0EBD, 0x0EBD, prOLetter}, // Lo LAO SEMIVOWEL SIGN NYO {0x0EC0, 0x0EC4, prOLetter}, // Lo [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI {0x0EC6, 0x0EC6, prOLetter}, // Lm LAO KO LA - {0x0EC8, 0x0ECD, prExtend}, // Mn [6] LAO TONE MAI EK..LAO NIGGAHITA + {0x0EC8, 0x0ECE, prExtend}, // Mn [7] LAO TONE MAI EK..LAO YAMAKKAN {0x0ED0, 0x0ED9, prNumeric}, // Nd [10] LAO DIGIT ZERO..LAO DIGIT NINE {0x0EDC, 0x0EDF, prOLetter}, // Lo [4] LAO HO NO..LAO LETTER KHMU NYO {0x0F00, 0x0F00, prOLetter}, // Lo TIBETAN SYLLABLE OM @@ -958,7 +959,7 @@ var sentenceBreakCodePoints = [][3]int{ {0x10C7, 0x10C7, prUpper}, // L& GEORGIAN CAPITAL LETTER YN {0x10CD, 0x10CD, prUpper}, // L& GEORGIAN CAPITAL LETTER AEN {0x10D0, 0x10FA, prOLetter}, // L& [43] GEORGIAN LETTER AN..GEORGIAN LETTER AIN - {0x10FC, 0x10FC, prOLetter}, // Lm MODIFIER LETTER GEORGIAN NAR + {0x10FC, 0x10FC, prLower}, // Lm MODIFIER LETTER GEORGIAN NAR {0x10FD, 0x10FF, prOLetter}, // L& [3] GEORGIAN LETTER AEN..GEORGIAN LETTER LABIAL SIGN {0x1100, 0x1248, prOLetter}, // Lo [329] HANGUL CHOSEONG KIYEOK..ETHIOPIC SYLLABLE QWA {0x124A, 0x124D, prOLetter}, // Lo [4] ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE @@ -2034,7 +2035,7 @@ var sentenceBreakCodePoints = [][3]int{ {0xA7D7, 0xA7D7, prLower}, // L& LATIN SMALL LETTER MIDDLE SCOTS S {0xA7D8, 0xA7D8, prUpper}, // L& LATIN CAPITAL LETTER SIGMOID S {0xA7D9, 0xA7D9, prLower}, // L& LATIN SMALL LETTER SIGMOID S - {0xA7F2, 0xA7F4, prOLetter}, // Lm [3] MODIFIER LETTER CAPITAL C..MODIFIER LETTER CAPITAL Q + {0xA7F2, 0xA7F4, prLower}, // Lm [3] MODIFIER LETTER CAPITAL C..MODIFIER LETTER CAPITAL Q {0xA7F5, 0xA7F5, prUpper}, // L& LATIN CAPITAL LETTER REVERSED HALF H {0xA7F6, 0xA7F6, prLower}, // L& LATIN SMALL LETTER REVERSED HALF H {0xA7F7, 0xA7F7, prOLetter}, // Lo LATIN EPIGRAPHIC LETTER SIDEWAYS I @@ -2140,7 +2141,7 @@ var sentenceBreakCodePoints = [][3]int{ {0xAB30, 0xAB5A, prLower}, // L& [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG {0xAB5C, 0xAB5F, prLower}, // Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK {0xAB60, 0xAB68, prLower}, // L& [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE - {0xAB69, 0xAB69, prOLetter}, // Lm MODIFIER LETTER SMALL TURNED W + {0xAB69, 0xAB69, prLower}, // Lm MODIFIER LETTER SMALL TURNED W {0xAB70, 0xABBF, prLower}, // L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA {0xABC0, 0xABE2, prOLetter}, // Lo [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM {0xABE3, 0xABE4, prExtend}, // Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP @@ -2334,6 +2335,7 @@ var sentenceBreakCodePoints = [][3]int{ {0x10E80, 0x10EA9, prOLetter}, // Lo [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET {0x10EAB, 0x10EAC, prExtend}, // Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK {0x10EB0, 0x10EB1, prOLetter}, // Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE + {0x10EFD, 0x10EFF, prExtend}, // Mn [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA {0x10F00, 0x10F1C, prOLetter}, // Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL {0x10F27, 0x10F27, prOLetter}, // Lo OLD SOGDIAN LIGATURE AYIN-DALETH {0x10F30, 0x10F45, prOLetter}, // Lo [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN @@ -2408,6 +2410,8 @@ var sentenceBreakCodePoints = [][3]int{ {0x11238, 0x11239, prSTerm}, // Po [2] KHOJKI DANDA..KHOJKI DOUBLE DANDA {0x1123B, 0x1123C, prSTerm}, // Po [2] KHOJKI SECTION MARK..KHOJKI DOUBLE SECTION MARK {0x1123E, 0x1123E, prExtend}, // Mn KHOJKI SIGN SUKUN + {0x1123F, 0x11240, prOLetter}, // Lo [2] KHOJKI LETTER QA..KHOJKI LETTER SHORT I + {0x11241, 0x11241, prExtend}, // Mn KHOJKI VOWEL SIGN VOCALIC R {0x11280, 0x11286, prOLetter}, // Lo [7] MULTANI LETTER A..MULTANI LETTER GA {0x11288, 0x11288, prOLetter}, // Lo MULTANI LETTER GHA {0x1128A, 0x1128D, prOLetter}, // Lo [4] MULTANI LETTER CA..MULTANI LETTER JJA @@ -2603,13 +2607,29 @@ var sentenceBreakCodePoints = [][3]int{ {0x11EF3, 0x11EF4, prExtend}, // Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U {0x11EF5, 0x11EF6, prExtend}, // Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O {0x11EF7, 0x11EF8, prSTerm}, // Po [2] MAKASAR PASSIMBANG..MAKASAR END OF SECTION + {0x11F00, 0x11F01, prExtend}, // Mn [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA + {0x11F02, 0x11F02, prOLetter}, // Lo KAWI SIGN REPHA + {0x11F03, 0x11F03, prExtend}, // Mc KAWI SIGN VISARGA + {0x11F04, 0x11F10, prOLetter}, // Lo [13] KAWI LETTER A..KAWI LETTER O + {0x11F12, 0x11F33, prOLetter}, // Lo [34] KAWI LETTER KA..KAWI LETTER JNYA + {0x11F34, 0x11F35, prExtend}, // Mc [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA + {0x11F36, 0x11F3A, prExtend}, // Mn [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R + {0x11F3E, 0x11F3F, prExtend}, // Mc [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI + {0x11F40, 0x11F40, prExtend}, // Mn KAWI VOWEL SIGN EU + {0x11F41, 0x11F41, prExtend}, // Mc KAWI SIGN KILLER + {0x11F42, 0x11F42, prExtend}, // Mn KAWI CONJOINER + {0x11F43, 0x11F44, prSTerm}, // Po [2] KAWI DANDA..KAWI DOUBLE DANDA + {0x11F50, 0x11F59, prNumeric}, // Nd [10] KAWI DIGIT ZERO..KAWI DIGIT NINE {0x11FB0, 0x11FB0, prOLetter}, // Lo LISU LETTER YHA {0x12000, 0x12399, prOLetter}, // Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U {0x12400, 0x1246E, prOLetter}, // Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM {0x12480, 0x12543, prOLetter}, // Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU {0x12F90, 0x12FF0, prOLetter}, // Lo [97] CYPRO-MINOAN SIGN CM001..CYPRO-MINOAN SIGN CM114 - {0x13000, 0x1342E, prOLetter}, // Lo [1071] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH AA032 - {0x13430, 0x13438, prFormat}, // Cf [9] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END SEGMENT + {0x13000, 0x1342F, prOLetter}, // Lo [1072] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH V011D + {0x13430, 0x1343F, prFormat}, // Cf [16] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE + {0x13440, 0x13440, prExtend}, // Mn EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY + {0x13441, 0x13446, prOLetter}, // Lo [6] EGYPTIAN HIEROGLYPH FULL BLANK..EGYPTIAN HIEROGLYPH WIDE LOST SIGN + {0x13447, 0x13455, prExtend}, // Mn [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED {0x14400, 0x14646, prOLetter}, // Lo [583] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530 {0x16800, 0x16A38, prOLetter}, // Lo [569] BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ {0x16A40, 0x16A5E, prOLetter}, // Lo [31] MRO LETTER TA..MRO LETTER TEK @@ -2648,7 +2668,9 @@ var sentenceBreakCodePoints = [][3]int{ {0x1AFF5, 0x1AFFB, prOLetter}, // Lm [7] KATAKANA LETTER MINNAN TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-5 {0x1AFFD, 0x1AFFE, prOLetter}, // Lm [2] KATAKANA LETTER MINNAN NASALIZED TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-8 {0x1B000, 0x1B122, prOLetter}, // Lo [291] KATAKANA LETTER ARCHAIC E..KATAKANA LETTER ARCHAIC WU + {0x1B132, 0x1B132, prOLetter}, // Lo HIRAGANA LETTER SMALL KO {0x1B150, 0x1B152, prOLetter}, // Lo [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO + {0x1B155, 0x1B155, prOLetter}, // Lo KATAKANA LETTER SMALL KO {0x1B164, 0x1B167, prOLetter}, // Lo [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N {0x1B170, 0x1B2FB, prOLetter}, // Lo [396] NUSHU CHARACTER-1B170..NUSHU CHARACTER-1B2FB {0x1BC00, 0x1BC6A, prOLetter}, // Lo [107] DUPLOYAN LETTER H..DUPLOYAN LETTER VOCALIC M @@ -2738,11 +2760,14 @@ var sentenceBreakCodePoints = [][3]int{ {0x1DF00, 0x1DF09, prLower}, // L& [10] LATIN SMALL LETTER FENG DIGRAPH WITH TRILL..LATIN SMALL LETTER T WITH HOOK AND RETROFLEX HOOK {0x1DF0A, 0x1DF0A, prOLetter}, // Lo LATIN LETTER RETROFLEX CLICK WITH RETROFLEX HOOK {0x1DF0B, 0x1DF1E, prLower}, // L& [20] LATIN SMALL LETTER ESH WITH DOUBLE BAR..LATIN SMALL LETTER S WITH CURL + {0x1DF25, 0x1DF2A, prLower}, // L& [6] LATIN SMALL LETTER D WITH MID-HEIGHT LEFT HOOK..LATIN SMALL LETTER T WITH MID-HEIGHT LEFT HOOK {0x1E000, 0x1E006, prExtend}, // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE {0x1E008, 0x1E018, prExtend}, // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU {0x1E01B, 0x1E021, prExtend}, // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI {0x1E023, 0x1E024, prExtend}, // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS {0x1E026, 0x1E02A, prExtend}, // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA + {0x1E030, 0x1E06D, prLower}, // Lm [62] MODIFIER LETTER CYRILLIC SMALL A..MODIFIER LETTER CYRILLIC SMALL STRAIGHT U WITH STROKE + {0x1E08F, 0x1E08F, prExtend}, // Mn COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I {0x1E100, 0x1E12C, prOLetter}, // Lo [45] NYIAKENG PUACHUE HMONG LETTER MA..NYIAKENG PUACHUE HMONG LETTER W {0x1E130, 0x1E136, prExtend}, // Mn [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D {0x1E137, 0x1E13D, prOLetter}, // Lm [7] NYIAKENG PUACHUE HMONG SIGN FOR PERSON..NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER @@ -2753,6 +2778,10 @@ var sentenceBreakCodePoints = [][3]int{ {0x1E2C0, 0x1E2EB, prOLetter}, // Lo [44] WANCHO LETTER AA..WANCHO LETTER YIH {0x1E2EC, 0x1E2EF, prExtend}, // Mn [4] WANCHO TONE TUP..WANCHO TONE KOINI {0x1E2F0, 0x1E2F9, prNumeric}, // Nd [10] WANCHO DIGIT ZERO..WANCHO DIGIT NINE + {0x1E4D0, 0x1E4EA, prOLetter}, // Lo [27] NAG MUNDARI LETTER O..NAG MUNDARI LETTER ELL + {0x1E4EB, 0x1E4EB, prOLetter}, // Lm NAG MUNDARI SIGN OJOD + {0x1E4EC, 0x1E4EF, prExtend}, // Mn [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH + {0x1E4F0, 0x1E4F9, prNumeric}, // Nd [10] NAG MUNDARI DIGIT ZERO..NAG MUNDARI DIGIT NINE {0x1E7E0, 0x1E7E6, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE HHYA..ETHIOPIC SYLLABLE HHYO {0x1E7E8, 0x1E7EB, prOLetter}, // Lo [4] ETHIOPIC SYLLABLE GURAGE HHWA..ETHIOPIC SYLLABLE HHWE {0x1E7ED, 0x1E7EE, prOLetter}, // Lo [2] ETHIOPIC SYLLABLE GURAGE MWI..ETHIOPIC SYLLABLE GURAGE MWEE @@ -2803,12 +2832,13 @@ var sentenceBreakCodePoints = [][3]int{ {0x1F676, 0x1F678, prClose}, // So [3] SANS-SERIF HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT..SANS-SERIF HEAVY LOW DOUBLE COMMA QUOTATION MARK ORNAMENT {0x1FBF0, 0x1FBF9, prNumeric}, // Nd [10] SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE {0x20000, 0x2A6DF, prOLetter}, // Lo [42720] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DF - {0x2A700, 0x2B738, prOLetter}, // Lo [4153] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B738 + {0x2A700, 0x2B739, prOLetter}, // Lo [4154] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B739 {0x2B740, 0x2B81D, prOLetter}, // Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D {0x2B820, 0x2CEA1, prOLetter}, // Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 {0x2CEB0, 0x2EBE0, prOLetter}, // Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 {0x2F800, 0x2FA1D, prOLetter}, // Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D {0x30000, 0x3134A, prOLetter}, // Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A + {0x31350, 0x323AF, prOLetter}, // Lo [4192] CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF {0xE0001, 0xE0001, prFormat}, // Cf LANGUAGE TAG {0xE0020, 0xE007F, prExtend}, // Cf [96] TAG SPACE..CANCEL TAG {0xE0100, 0xE01EF, prExtend}, // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 diff --git a/vendor/github.com/rivo/uniseg/width.go b/vendor/github.com/rivo/uniseg/width.go index 12a57cc2e3..96ee16e760 100644 --- a/vendor/github.com/rivo/uniseg/width.go +++ b/vendor/github.com/rivo/uniseg/width.go @@ -1,5 +1,10 @@ package uniseg +// EastAsianAmbiguousWidth specifies the monospace width for East Asian +// characters classified as Ambiguous. The default is 1 but some rare fonts +// render them with a width of 2. +var EastAsianAmbiguousWidth = 1 + // runeWidth returns the monospace width for the given rune. The provided // grapheme property is a value mapped by the [graphemeCodePoints] table. // @@ -36,6 +41,8 @@ func runeWidth(r rune, graphemeProperty int) int { switch property(eastAsianWidth, r) { case prW, prF: return 2 + case prA: + return EastAsianAmbiguousWidth } return 1 diff --git a/vendor/github.com/rivo/uniseg/wordproperties.go b/vendor/github.com/rivo/uniseg/wordproperties.go index 805cc536cb..277ca10068 100644 --- a/vendor/github.com/rivo/uniseg/wordproperties.go +++ b/vendor/github.com/rivo/uniseg/wordproperties.go @@ -1,13 +1,13 @@ -package uniseg - // Code generated via go generate from gen_properties.go. DO NOT EDIT. +package uniseg + // workBreakCodePoints are taken from -// https://www.unicode.org/Public/14.0.0/ucd/auxiliary/WordBreakProperty.txt +// https://www.unicode.org/Public/15.0.0/ucd/auxiliary/WordBreakProperty.txt // and -// https://unicode.org/Public/14.0.0/ucd/emoji/emoji-data.txt +// https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) -// on September 10, 2022. See https://www.unicode.org/license.html for the Unicode +// on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var workBreakCodePoints = [][3]int{ {0x000A, 0x000A, prLF}, // Cc @@ -318,6 +318,7 @@ var workBreakCodePoints = [][3]int{ {0x0CE2, 0x0CE3, prExtend}, // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL {0x0CE6, 0x0CEF, prNumeric}, // Nd [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE {0x0CF1, 0x0CF2, prALetter}, // Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA + {0x0CF3, 0x0CF3, prExtend}, // Mc KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT {0x0D00, 0x0D01, prExtend}, // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU {0x0D02, 0x0D03, prExtend}, // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA {0x0D04, 0x0D0C, prALetter}, // Lo [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L @@ -357,7 +358,7 @@ var workBreakCodePoints = [][3]int{ {0x0E50, 0x0E59, prNumeric}, // Nd [10] THAI DIGIT ZERO..THAI DIGIT NINE {0x0EB1, 0x0EB1, prExtend}, // Mn LAO VOWEL SIGN MAI KAN {0x0EB4, 0x0EBC, prExtend}, // Mn [9] LAO VOWEL SIGN I..LAO SEMIVOWEL SIGN LO - {0x0EC8, 0x0ECD, prExtend}, // Mn [6] LAO TONE MAI EK..LAO NIGGAHITA + {0x0EC8, 0x0ECE, prExtend}, // Mn [7] LAO TONE MAI EK..LAO YAMAKKAN {0x0ED0, 0x0ED9, prNumeric}, // Nd [10] LAO DIGIT ZERO..LAO DIGIT NINE {0x0F00, 0x0F00, prALetter}, // Lo TIBETAN SYLLABLE OM {0x0F18, 0x0F19, prExtend}, // Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS @@ -1093,6 +1094,7 @@ var workBreakCodePoints = [][3]int{ {0x10E80, 0x10EA9, prALetter}, // Lo [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET {0x10EAB, 0x10EAC, prExtend}, // Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK {0x10EB0, 0x10EB1, prALetter}, // Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE + {0x10EFD, 0x10EFF, prExtend}, // Mn [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA {0x10F00, 0x10F1C, prALetter}, // Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL {0x10F27, 0x10F27, prALetter}, // Lo OLD SOGDIAN LIGATURE AYIN-DALETH {0x10F30, 0x10F45, prALetter}, // Lo [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN @@ -1157,6 +1159,8 @@ var workBreakCodePoints = [][3]int{ {0x11235, 0x11235, prExtend}, // Mc KHOJKI SIGN VIRAMA {0x11236, 0x11237, prExtend}, // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA {0x1123E, 0x1123E, prExtend}, // Mn KHOJKI SIGN SUKUN + {0x1123F, 0x11240, prALetter}, // Lo [2] KHOJKI LETTER QA..KHOJKI LETTER SHORT I + {0x11241, 0x11241, prExtend}, // Mn KHOJKI VOWEL SIGN VOCALIC R {0x11280, 0x11286, prALetter}, // Lo [7] MULTANI LETTER A..MULTANI LETTER GA {0x11288, 0x11288, prALetter}, // Lo MULTANI LETTER GHA {0x1128A, 0x1128D, prALetter}, // Lo [4] MULTANI LETTER CA..MULTANI LETTER JJA @@ -1337,13 +1341,28 @@ var workBreakCodePoints = [][3]int{ {0x11EE0, 0x11EF2, prALetter}, // Lo [19] MAKASAR LETTER KA..MAKASAR ANGKA {0x11EF3, 0x11EF4, prExtend}, // Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U {0x11EF5, 0x11EF6, prExtend}, // Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O + {0x11F00, 0x11F01, prExtend}, // Mn [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA + {0x11F02, 0x11F02, prALetter}, // Lo KAWI SIGN REPHA + {0x11F03, 0x11F03, prExtend}, // Mc KAWI SIGN VISARGA + {0x11F04, 0x11F10, prALetter}, // Lo [13] KAWI LETTER A..KAWI LETTER O + {0x11F12, 0x11F33, prALetter}, // Lo [34] KAWI LETTER KA..KAWI LETTER JNYA + {0x11F34, 0x11F35, prExtend}, // Mc [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA + {0x11F36, 0x11F3A, prExtend}, // Mn [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R + {0x11F3E, 0x11F3F, prExtend}, // Mc [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI + {0x11F40, 0x11F40, prExtend}, // Mn KAWI VOWEL SIGN EU + {0x11F41, 0x11F41, prExtend}, // Mc KAWI SIGN KILLER + {0x11F42, 0x11F42, prExtend}, // Mn KAWI CONJOINER + {0x11F50, 0x11F59, prNumeric}, // Nd [10] KAWI DIGIT ZERO..KAWI DIGIT NINE {0x11FB0, 0x11FB0, prALetter}, // Lo LISU LETTER YHA {0x12000, 0x12399, prALetter}, // Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U {0x12400, 0x1246E, prALetter}, // Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM {0x12480, 0x12543, prALetter}, // Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU {0x12F90, 0x12FF0, prALetter}, // Lo [97] CYPRO-MINOAN SIGN CM001..CYPRO-MINOAN SIGN CM114 - {0x13000, 0x1342E, prALetter}, // Lo [1071] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH AA032 - {0x13430, 0x13438, prFormat}, // Cf [9] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END SEGMENT + {0x13000, 0x1342F, prALetter}, // Lo [1072] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH V011D + {0x13430, 0x1343F, prFormat}, // Cf [16] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE + {0x13440, 0x13440, prExtend}, // Mn EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY + {0x13441, 0x13446, prALetter}, // Lo [6] EGYPTIAN HIEROGLYPH FULL BLANK..EGYPTIAN HIEROGLYPH WIDE LOST SIGN + {0x13447, 0x13455, prExtend}, // Mn [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED {0x14400, 0x14646, prALetter}, // Lo [583] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530 {0x16800, 0x16A38, prALetter}, // Lo [569] BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ {0x16A40, 0x16A5E, prALetter}, // Lo [31] MRO LETTER TA..MRO LETTER TEK @@ -1374,6 +1393,7 @@ var workBreakCodePoints = [][3]int{ {0x1AFFD, 0x1AFFE, prKatakana}, // Lm [2] KATAKANA LETTER MINNAN NASALIZED TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-8 {0x1B000, 0x1B000, prKatakana}, // Lo KATAKANA LETTER ARCHAIC E {0x1B120, 0x1B122, prKatakana}, // Lo [3] KATAKANA LETTER ARCHAIC YI..KATAKANA LETTER ARCHAIC WU + {0x1B155, 0x1B155, prKatakana}, // Lo KATAKANA LETTER SMALL KO {0x1B164, 0x1B167, prKatakana}, // Lo [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N {0x1BC00, 0x1BC6A, prALetter}, // Lo [107] DUPLOYAN LETTER H..DUPLOYAN LETTER VOCALIC M {0x1BC70, 0x1BC7C, prALetter}, // Lo [13] DUPLOYAN AFFIX LEFT HORIZONTAL SECANT..DUPLOYAN AFFIX ATTACHED TANGENT HOOK @@ -1431,11 +1451,14 @@ var workBreakCodePoints = [][3]int{ {0x1DF00, 0x1DF09, prALetter}, // L& [10] LATIN SMALL LETTER FENG DIGRAPH WITH TRILL..LATIN SMALL LETTER T WITH HOOK AND RETROFLEX HOOK {0x1DF0A, 0x1DF0A, prALetter}, // Lo LATIN LETTER RETROFLEX CLICK WITH RETROFLEX HOOK {0x1DF0B, 0x1DF1E, prALetter}, // L& [20] LATIN SMALL LETTER ESH WITH DOUBLE BAR..LATIN SMALL LETTER S WITH CURL + {0x1DF25, 0x1DF2A, prALetter}, // L& [6] LATIN SMALL LETTER D WITH MID-HEIGHT LEFT HOOK..LATIN SMALL LETTER T WITH MID-HEIGHT LEFT HOOK {0x1E000, 0x1E006, prExtend}, // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE {0x1E008, 0x1E018, prExtend}, // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU {0x1E01B, 0x1E021, prExtend}, // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI {0x1E023, 0x1E024, prExtend}, // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS {0x1E026, 0x1E02A, prExtend}, // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA + {0x1E030, 0x1E06D, prALetter}, // Lm [62] MODIFIER LETTER CYRILLIC SMALL A..MODIFIER LETTER CYRILLIC SMALL STRAIGHT U WITH STROKE + {0x1E08F, 0x1E08F, prExtend}, // Mn COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I {0x1E100, 0x1E12C, prALetter}, // Lo [45] NYIAKENG PUACHUE HMONG LETTER MA..NYIAKENG PUACHUE HMONG LETTER W {0x1E130, 0x1E136, prExtend}, // Mn [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D {0x1E137, 0x1E13D, prALetter}, // Lm [7] NYIAKENG PUACHUE HMONG SIGN FOR PERSON..NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER @@ -1446,6 +1469,10 @@ var workBreakCodePoints = [][3]int{ {0x1E2C0, 0x1E2EB, prALetter}, // Lo [44] WANCHO LETTER AA..WANCHO LETTER YIH {0x1E2EC, 0x1E2EF, prExtend}, // Mn [4] WANCHO TONE TUP..WANCHO TONE KOINI {0x1E2F0, 0x1E2F9, prNumeric}, // Nd [10] WANCHO DIGIT ZERO..WANCHO DIGIT NINE + {0x1E4D0, 0x1E4EA, prALetter}, // Lo [27] NAG MUNDARI LETTER O..NAG MUNDARI LETTER ELL + {0x1E4EB, 0x1E4EB, prALetter}, // Lm NAG MUNDARI SIGN OJOD + {0x1E4EC, 0x1E4EF, prExtend}, // Mn [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH + {0x1E4F0, 0x1E4F9, prNumeric}, // Nd [10] NAG MUNDARI DIGIT ZERO..NAG MUNDARI DIGIT NINE {0x1E7E0, 0x1E7E6, prALetter}, // Lo [7] ETHIOPIC SYLLABLE HHYA..ETHIOPIC SYLLABLE HHYO {0x1E7E8, 0x1E7EB, prALetter}, // Lo [4] ETHIOPIC SYLLABLE GURAGE HHWA..ETHIOPIC SYLLABLE HHWE {0x1E7ED, 0x1E7EE, prALetter}, // Lo [2] ETHIOPIC SYLLABLE GURAGE MWI..ETHIOPIC SYLLABLE GURAGE MWEE @@ -1740,7 +1767,8 @@ var workBreakCodePoints = [][3]int{ {0x1F6D3, 0x1F6D4, prExtendedPictographic}, // E0.0 [2] (🛓..🛔) STUPA..PAGODA {0x1F6D5, 0x1F6D5, prExtendedPictographic}, // E12.0 [1] (🛕) hindu temple {0x1F6D6, 0x1F6D7, prExtendedPictographic}, // E13.0 [2] (🛖..🛗) hut..elevator - {0x1F6D8, 0x1F6DC, prExtendedPictographic}, // E0.0 [5] (🛘..🛜) .. + {0x1F6D8, 0x1F6DB, prExtendedPictographic}, // E0.0 [4] (🛘..🛛) .. + {0x1F6DC, 0x1F6DC, prExtendedPictographic}, // E15.0 [1] (🛜) wireless {0x1F6DD, 0x1F6DF, prExtendedPictographic}, // E14.0 [3] (🛝..🛟) playground slide..ring buoy {0x1F6E0, 0x1F6E5, prExtendedPictographic}, // E0.7 [6] (🛠️..🛥️) hammer and wrench..motor boat {0x1F6E6, 0x1F6E8, prExtendedPictographic}, // E0.0 [3] (🛦..🛨) UP-POINTING MILITARY AIRPLANE..UP-POINTING SMALL AIRPLANE @@ -1757,7 +1785,7 @@ var workBreakCodePoints = [][3]int{ {0x1F6FA, 0x1F6FA, prExtendedPictographic}, // E12.0 [1] (🛺) auto rickshaw {0x1F6FB, 0x1F6FC, prExtendedPictographic}, // E13.0 [2] (🛻..🛼) pickup truck..roller skate {0x1F6FD, 0x1F6FF, prExtendedPictographic}, // E0.0 [3] (🛽..🛿) .. - {0x1F774, 0x1F77F, prExtendedPictographic}, // E0.0 [12] (🝴..🝿) .. + {0x1F774, 0x1F77F, prExtendedPictographic}, // E0.0 [12] (🝴..🝿) LOT OF FORTUNE..ORCUS {0x1F7D5, 0x1F7DF, prExtendedPictographic}, // E0.0 [11] (🟕..🟟) CIRCLED TRIANGLE.. {0x1F7E0, 0x1F7EB, prExtendedPictographic}, // E12.0 [12] (🟠..🟫) orange circle..brown square {0x1F7EC, 0x1F7EF, prExtendedPictographic}, // E0.0 [4] (🟬..🟯) .. @@ -1816,30 +1844,37 @@ var workBreakCodePoints = [][3]int{ {0x1FA00, 0x1FA6F, prExtendedPictographic}, // E0.0 [112] (🨀..🩯) NEUTRAL CHESS KING.. {0x1FA70, 0x1FA73, prExtendedPictographic}, // E12.0 [4] (🩰..🩳) ballet shoes..shorts {0x1FA74, 0x1FA74, prExtendedPictographic}, // E13.0 [1] (🩴) thong sandal - {0x1FA75, 0x1FA77, prExtendedPictographic}, // E0.0 [3] (🩵..🩷) .. + {0x1FA75, 0x1FA77, prExtendedPictographic}, // E15.0 [3] (🩵..🩷) light blue heart..pink heart {0x1FA78, 0x1FA7A, prExtendedPictographic}, // E12.0 [3] (🩸..🩺) drop of blood..stethoscope {0x1FA7B, 0x1FA7C, prExtendedPictographic}, // E14.0 [2] (🩻..🩼) x-ray..crutch {0x1FA7D, 0x1FA7F, prExtendedPictographic}, // E0.0 [3] (🩽..🩿) .. {0x1FA80, 0x1FA82, prExtendedPictographic}, // E12.0 [3] (🪀..🪂) yo-yo..parachute {0x1FA83, 0x1FA86, prExtendedPictographic}, // E13.0 [4] (🪃..🪆) boomerang..nesting dolls - {0x1FA87, 0x1FA8F, prExtendedPictographic}, // E0.0 [9] (🪇..🪏) .. + {0x1FA87, 0x1FA88, prExtendedPictographic}, // E15.0 [2] (🪇..🪈) maracas..flute + {0x1FA89, 0x1FA8F, prExtendedPictographic}, // E0.0 [7] (🪉..🪏) .. {0x1FA90, 0x1FA95, prExtendedPictographic}, // E12.0 [6] (🪐..🪕) ringed planet..banjo {0x1FA96, 0x1FAA8, prExtendedPictographic}, // E13.0 [19] (🪖..🪨) military helmet..rock {0x1FAA9, 0x1FAAC, prExtendedPictographic}, // E14.0 [4] (🪩..🪬) mirror ball..hamsa - {0x1FAAD, 0x1FAAF, prExtendedPictographic}, // E0.0 [3] (🪭..🪯) .. + {0x1FAAD, 0x1FAAF, prExtendedPictographic}, // E15.0 [3] (🪭..🪯) folding hand fan..khanda {0x1FAB0, 0x1FAB6, prExtendedPictographic}, // E13.0 [7] (🪰..🪶) fly..feather {0x1FAB7, 0x1FABA, prExtendedPictographic}, // E14.0 [4] (🪷..🪺) lotus..nest with eggs - {0x1FABB, 0x1FABF, prExtendedPictographic}, // E0.0 [5] (🪻..🪿) .. + {0x1FABB, 0x1FABD, prExtendedPictographic}, // E15.0 [3] (🪻..🪽) hyacinth..wing + {0x1FABE, 0x1FABE, prExtendedPictographic}, // E0.0 [1] (🪾) + {0x1FABF, 0x1FABF, prExtendedPictographic}, // E15.0 [1] (🪿) goose {0x1FAC0, 0x1FAC2, prExtendedPictographic}, // E13.0 [3] (🫀..🫂) anatomical heart..people hugging {0x1FAC3, 0x1FAC5, prExtendedPictographic}, // E14.0 [3] (🫃..🫅) pregnant man..person with crown - {0x1FAC6, 0x1FACF, prExtendedPictographic}, // E0.0 [10] (🫆..🫏) .. + {0x1FAC6, 0x1FACD, prExtendedPictographic}, // E0.0 [8] (🫆..🫍) .. + {0x1FACE, 0x1FACF, prExtendedPictographic}, // E15.0 [2] (🫎..🫏) moose..donkey {0x1FAD0, 0x1FAD6, prExtendedPictographic}, // E13.0 [7] (🫐..🫖) blueberries..teapot {0x1FAD7, 0x1FAD9, prExtendedPictographic}, // E14.0 [3] (🫗..🫙) pouring liquid..jar - {0x1FADA, 0x1FADF, prExtendedPictographic}, // E0.0 [6] (🫚..🫟) .. + {0x1FADA, 0x1FADB, prExtendedPictographic}, // E15.0 [2] (🫚..🫛) ginger root..pea pod + {0x1FADC, 0x1FADF, prExtendedPictographic}, // E0.0 [4] (🫜..🫟) .. {0x1FAE0, 0x1FAE7, prExtendedPictographic}, // E14.0 [8] (🫠..🫧) melting face..bubbles - {0x1FAE8, 0x1FAEF, prExtendedPictographic}, // E0.0 [8] (🫨..🫯) .. + {0x1FAE8, 0x1FAE8, prExtendedPictographic}, // E15.0 [1] (🫨) shaking face + {0x1FAE9, 0x1FAEF, prExtendedPictographic}, // E0.0 [7] (🫩..🫯) .. {0x1FAF0, 0x1FAF6, prExtendedPictographic}, // E14.0 [7] (🫰..🫶) hand with index finger and thumb crossed..heart hands - {0x1FAF7, 0x1FAFF, prExtendedPictographic}, // E0.0 [9] (🫷..🫿) .. + {0x1FAF7, 0x1FAF8, prExtendedPictographic}, // E15.0 [2] (🫷..🫸) leftwards pushing hand..rightwards pushing hand + {0x1FAF9, 0x1FAFF, prExtendedPictographic}, // E0.0 [7] (🫹..🫿) .. {0x1FBF0, 0x1FBF9, prNumeric}, // Nd [10] SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE {0x1FC00, 0x1FFFD, prExtendedPictographic}, // E0.0[1022] (🰀..🿽) .. {0xE0001, 0xE0001, prFormat}, // Cf LANGUAGE TAG diff --git a/vendor/github.com/rivo/uniseg/wordrules.go b/vendor/github.com/rivo/uniseg/wordrules.go index 325407e40b..2b62e12228 100644 --- a/vendor/github.com/rivo/uniseg/wordrules.go +++ b/vendor/github.com/rivo/uniseg/wordrules.go @@ -29,7 +29,7 @@ const ( ) // The word break parser's state transitions. It's anologous to grTransitions, -// see comments there for details. Unicode version 14.0.0. +// see comments there for details. Unicode version 15.0.0. var wbTransitions = map[[2]int][3]int{ // WB3b. {wbAny, prNewline}: {wbNewline, wbBreak, 32}, @@ -97,7 +97,7 @@ var wbTransitions = map[[2]int][3]int{ {wbExtendNumLet, prALetter}: {wbALetter, wbDontBreak, 132}, {wbExtendNumLet, prHebrewLetter}: {wbHebrewLetter, wbDontBreak, 132}, {wbExtendNumLet, prNumeric}: {wbNumeric, wbDontBreak, 132}, - {wbExtendNumLet, prKatakana}: {prKatakana, wbDontBreak, 132}, + {wbExtendNumLet, prKatakana}: {wbKatakana, wbDontBreak, 132}, } // transitionWordBreakState determines the new state of the word break parser 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 0000000000..c1ae9d0261 --- /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/errno/capi_illumos_amd64.go b/vendor/modernc.org/libc/errno/capi_illumos_amd64.go new file mode 100644 index 0000000000..4fe785afa9 --- /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 75a92265f4..6193b2b0e0 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/errno_illumos_amd64.go b/vendor/modernc.org/libc/errno/errno_illumos_amd64.go new file mode 100644 index 0000000000..18c5356871 --- /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 // :25:1: + X_LP64 = 1 // :286:1: + X_SYS_ERRNO_H = 0 // errno.h:41:1: + Sun = 1 // :172:1: + Unix = 1 // :175:1: +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 000cb720c9..4410e8ee23 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 // :25:1: - X_LP64 = 1 // :284:1: - X_POSIX_C_SOURCE = 200809 // features.h:281:1: - X_POSIX_SOURCE = 1 // features.h:279:1: - X_STDC_PREDEF_H = 1 // :162:1: - X_SYS_CDEFS_H = 1 // cdefs.h:19:1: - Linux = 1 // :231:1: - Unix = 1 // :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 // :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 // :25:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :372:1: + X_POSIX_C_SOURCE = 200809 // features.h:292:1: + X_POSIX_SOURCE = 1 // features.h:290:1: + X_STDC_PREDEF_H = 1 // :223:1: + X_SYS_CDEFS_H = 1 // cdefs.h:20:1: + Linux = 1 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ 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 0000000000..4e7d96df7c --- /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 9db297f1a3..b62370d48d 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/fcntl_illumos_amd64.go b/vendor/modernc.org/libc/fcntl/fcntl_illumos_amd64.go new file mode 100644 index 0000000000..3028e2a75b --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 +// 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 +// 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 8de6ac32fb..9bf229d62b 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 // :25:1: - X_LP64 = 1 // :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 // :162:1: - X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: - X_SYS_CDEFS_H = 1 // cdefs.h:19:1: - Linux = 1 // :231:1: - Unix = 1 // :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 // :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 // :25:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :223:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:20:1: + Linux = 1 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -156,7 +164,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // POSIX Standard: 6.5 File Control Operations -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -356,9 +427,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 +// . + +// 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 // . -// 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 should also be available. // NB: Include guard matches what 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 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 +// . + +// Never include this file directly; use 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 // . -// 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 +// . -// 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 +// . + +// 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 +// . 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/fts/capi_illumos_amd64.go b/vendor/modernc.org/libc/fts/capi_illumos_amd64.go new file mode 100644 index 0000000000..d83fad1598 --- /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 5dc389ba02..d782e0c348 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/fts_illumos_amd64.go b/vendor/modernc.org/libc/fts/fts_illumos_amd64.go new file mode 100644 index 0000000000..a36cc52c3e --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 +// 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 +// 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 includes a +// definition for timestruc_t needed by the stat structure. However, +// including either , which includes , or +// including 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 and +// . The header 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 e12eb02cbd..6e7ba205da 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 // :25:1: - X_FTS_H = 1 // fts.h:51:1: - X_GCC_SIZE_T = 0 // stddef.h:195:1: - X_LP64 = 1 // :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 // :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 // :231:1: - Unix = 1 // :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 // :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 // :25:1: + X_FTS_H = 1 // fts.h:51:1: + X_GCC_SIZE_T = 0 // stddef.h:200:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -156,7 +163,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // POSIX Standard: 2.6 Primitive System Data Types -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -356,9 +426,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 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 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 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 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 */ // . // 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 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 -// 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 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 // . -// 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 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 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 -// . - -// 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. +// 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 // . -// 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 // . -// 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 -// . - -// 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 // . +// 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 +// . + +// 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 // . +// 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 -// 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 { // . // 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 // . -// 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 +// . + +// 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 +// . -// 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 +// . 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 // . -// 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 // . -// 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/grp/capi_illumos_amd64.go b/vendor/modernc.org/libc/grp/capi_illumos_amd64.go new file mode 100644 index 0000000000..66a4532860 --- /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 39c1b899e0..9809861599 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/grp_illumos_amd64.go b/vendor/modernc.org/libc/grp/grp_illumos_amd64.go new file mode 100644 index 0000000000..54fb890136 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 +// 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 +// 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 +// 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 . + +// 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 +// 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 +// +// 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 , , , and +// . 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 or the preferred . Doing so will +// pull in the appropriate compiler protocols defined in +// which is in turn is included by and . See comments +// in 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 , 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 2a52cae7ff..2f0c0b39a8 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 // :25:1: - X_GCC_SIZE_T = 0 // stddef.h:195:1: - X_GRP_H = 1 // grp.h:23:1: - X_LP64 = 1 // :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 // :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 // :231:1: - Unix = 1 // :177:1: + NSS_BUFLEN_GROUP = 1024 // grp.h:114:1: + X_ABILP64 = 3 // :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 // :25:1: + X_GCC_SIZE_T = 0 // stddef.h:200:1: + X_GRP_H = 1 // grp.h:23:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -63,7 +74,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // POSIX Standard: 9.2.1 Group Database Access -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -263,9 +337,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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/ioutil_illumos.go b/vendor/modernc.org/libc/ioutil_illumos.go new file mode 100644 index 0000000000..fa15664276 --- /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 0000000000..177dc783e9 --- /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 f9c787ba33..babac02a1d 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/langinfo_illumos_amd64.go b/vendor/modernc.org/libc/langinfo/langinfo_illumos_amd64.go new file mode 100644 index 0000000000..ba20b8f2d9 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :175:1: +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// +// 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 +// 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= 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 .) +// +// 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 +// +// 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 dee83b910b..35dd252614 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 // :25:1: - X_LANGINFO_H = 1 // langinfo.h:20:1: - X_LP64 = 1 // :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 // :162:1: - X_SYS_CDEFS_H = 1 // cdefs.h:19:1: - Linux = 1 // :231:1: - Unix = 1 // :177:1: + NL_CAT_LOCALE = 1 // nl_types.h:27:1: + NL_SETD = 1 // nl_types.h:24:1: + X_ABILP64 = 3 // :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 // :25:1: + X_LANGINFO_H = 1 // langinfo.h:20:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :223:1: + X_SYS_CDEFS_H = 1 // cdefs.h:20:1: + Linux = 1 // :308:1: + Unix = 1 // :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 /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // . // 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -749,9 +823,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 */ // . // 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 , 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/libc_illumos.go b/vendor/modernc.org/libc/libc_illumos.go new file mode 100644 index 0000000000..66704a5194 --- /dev/null +++ b/vendor/modernc.org/libc/libc_illumos.go @@ -0,0 +1,2104 @@ +// 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 +} + +// 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("")) +} + +// 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 0000000000..ae67a9342c --- /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_loong64.go b/vendor/modernc.org/libc/libc_linux_loong64.go index 0c1d9f4a1e..efb5b48b06 100644 --- a/vendor/modernc.org/libc/libc_linux_loong64.go +++ b/vendor/modernc.org/libc/libc_linux_loong64.go @@ -8,17 +8,17 @@ import ( "os" "strings" "syscall" + gotime "time" "unicode" "unsafe" - gotime "time" - "modernc.org/libc/stdio" - "modernc.org/libc/time" "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" ) diff --git a/vendor/modernc.org/libc/libc_unix.go b/vendor/modernc.org/libc/libc_unix.go index 348e94a92a..722e68f217 100644 --- a/vendor/modernc.org/libc/libc_unix.go +++ b/vendor/modernc.org/libc/libc_unix.go @@ -219,20 +219,6 @@ 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 { - 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) -} - // struct cmsghdr *CMSG_NXTHDR(struct msghdr *msgh, struct cmsghdr *cmsg); func X__cmsg_nxthdr(t *TLS, msgh, cmsg uintptr) uintptr { if __ccgo_strace { diff --git a/vendor/modernc.org/libc/libc_unix1.go b/vendor/modernc.org/libc/libc_unix1.go new file mode 100644 index 0000000000..f6acf93ac7 --- /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 0000000000..4150bf58a8 --- /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 81f0a7c4ae..0790d60935 100644 --- a/vendor/modernc.org/libc/libc_windows.go +++ b/vendor/modernc.org/libc/libc_windows.go @@ -212,8 +212,8 @@ var ( userenvapi = syscall.NewLazyDLL("userenv.dll") procGetProfilesDirectoryW = userenvapi.NewProc("GetProfilesDirectoryW") - modcrt = syscall.NewLazyDLL("msvcrt.dll") - procAccess = modcrt.NewProc("_access") + modcrt = syscall.NewLazyDLL("msvcrt.dll") + procAccess = modcrt.NewProc("_access") procStat64i32 = modcrt.NewProc("_stat64i32") ) 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 0000000000..b82ba4653c --- /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 dbe66d824d..820acc5fd0 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/limits_illumos_amd64.go b/vendor/modernc.org/libc/limits/limits_illumos_amd64.go new file mode 100644 index 0000000000..6d83302fab --- /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 // :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 // :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 // :172:1: + Unix = 1 // :175:1: +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// . + +// 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 +// 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= 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 .) +// +// 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 . + +// 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// 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) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 . +// +// 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 + +// Maximum value of a "size_t". SIZE_MAX was previously defined +// in , however, the standards specify it be defined +// in . The headers includes this header as +// does . The value of SIZE_MAX should not deviate +// from the value of ULONG_MAX defined . + +// Maximum limit of sig_atomic_t defined in + +// Maximum limit of wchar_t. The WCHAR_* macros are also +// defined in , 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 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 + +// Minimum limit of sig_atomic_t defined in + +// Minimum limit of wchar_t. The WCHAR_* macros are also +// defined in , 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 +// 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 +// . + +// 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 a9e1bafdef..a5e9f1442b 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 // :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 // :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 // :284:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :162:1: - X_SYS_CDEFS_H = 1 // cdefs.h:19:1: - Linux = 1 // :231:1: - Unix = 1 // :177:1: + X_STDC_PREDEF_H = 1 // :223:1: + X_SYS_CDEFS_H = 1 // cdefs.h:20:1: + Linux = 1 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -143,7 +154,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :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 /* :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 /* :47:21 */ // ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types // 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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -404,9 +478,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :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 /* :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 before GCC +// 11, or if _GNU_SOURCE is defined rather than enabling C2x support +// with -std. + // POSIX adds things to . -// 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 /* :47:21 */ // // Never include this file directly; use 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 +// . // These are the standard-mandated minimum values. @@ -770,13 +949,13 @@ type X__float128 = float64 /* :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 /* :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 +// . + +// 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 +// . + +// 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 /* :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 /* :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/musl_illumos_amd64.go b/vendor/modernc.org/libc/musl_illumos_amd64.go new file mode 100644 index 0000000000..6a70aeb304 --- /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 /* :3:26 */ + +type size_t = uint64 /* :9:23 */ + +type wchar_t = int32 /* :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 + 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) { + goto __31 + } + y = y<= 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= 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/netdb/capi_illumos_amd64.go b/vendor/modernc.org/libc/netdb/capi_illumos_amd64.go new file mode 100644 index 0000000000..4f12690b56 --- /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 8be6cacf0e..ed2b04ac04 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/netdb_illumos_amd64.go b/vendor/modernc.org/libc/netdb/netdb_illumos_amd64.go new file mode 100644 index 0000000000..b1108972e9 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :47:21 */ + +// Copyright 2014 Garrett D'Amore +// +// 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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// 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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 +// 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 . +// 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 , (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 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 +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// 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 " and _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::::, 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 . (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::::, 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 . (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 + +// The following option values are reserved by +// +// 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 +// +// 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 +// 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 +// +// 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 +// 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 +// 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 +// +// 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 +// +// 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 +// +// 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 +// 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 a995ad8d03..3fbd764048 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 // :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 // :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 // :284:1: + X_LINUX_STDDEF_H = 0 // stddef.h:3:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :162:1: + X_STDC_PREDEF_H = 1 // :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 // :231:1: - Unix = 1 // :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 // :308:1: + Unix = 1 // :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 // // . -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 /* :46:14 */ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -867,9 +962,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 /* :47:21 */ // . // 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 /* :47: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 @@ -1180,7 +1345,7 @@ type X__float128 = float64 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 // . -// 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 -// 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 { // . // 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 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 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 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 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 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 */ // . // 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 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 -// 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 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 // . -// 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 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 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 -// . - -// 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. +// 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 // . -// 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 // . -// 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 -// . - -// 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 // . +// 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 +// . + +// 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 // . +// 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 @@ -2548,29 +2741,15 @@ type X__kernel_sighandler_t = uintptr /* posix_types.h:30: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 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 . // In GNU this file is #include'd by . -// 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 // . -// 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/netinet/in/capi_illumos_amd64.go b/vendor/modernc.org/libc/netinet/in/capi_illumos_amd64.go new file mode 100644 index 0000000000..eeaf813eda --- /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 953ed09430..e2da4abd5e 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/in_illumos_amd64.go b/vendor/modernc.org/libc/netinet/in/in_illumos_amd64.go new file mode 100644 index 0000000000..3476f8285d --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 . +// 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 , (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 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 +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// 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 " and _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::::, 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 . (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::::, 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 . (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 + +// The following option values are reserved by +// +// 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 cfd5e88aa2..d91dbd3604 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 // :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 // :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 // :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 // :231:1: - Unix = 1 // :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 // :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 // :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" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :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 // // . -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 /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -823,9 +918,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :47: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 @@ -1102,7 +1267,7 @@ type X__float128 = float64 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 // . -// 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 -// 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 { // . // 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 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 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 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 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 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 */ // . // 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 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 -// 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 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 // . -// 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 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 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 -// . - -// 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. +// 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 // . -// 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 // . -// 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 -// . - -// 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 // . +// 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 +// . + +// 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 // . +// 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 @@ -2470,29 +2663,15 @@ type X__kernel_sighandler_t = uintptr /* posix_types.h:30: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 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/poll/capi_illumos_amd64.go b/vendor/modernc.org/libc/poll/capi_illumos_amd64.go new file mode 100644 index 0000000000..ee5e293c24 --- /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 52c3f3a231..b167e73c48 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/poll_illumos_amd64.go b/vendor/modernc.org/libc/poll/poll_illumos_amd64.go new file mode 100644 index 0000000000..54a9972460 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 +// 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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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 +// 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= 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 .) +// +// 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 +// +// 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 +// 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 +// 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= 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 .) +// +// 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 +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +type Fd_set = Fd_set1 /* select.h:125:3 */ + +// Neither X/Open nor POSIX allow the inclusion of for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 +// 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 . + +// We need 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 +// 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 as per X/Open and +// POSIX requirements. + +// The sigevent structure is also defined in 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 + +// 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 +// 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 is needed for the declaration of +// timestruc_t. However, since inclusion of results +// in X/Open and POSIX namespace pollution, the definition for +// timestruct_t has been duplicated in a standards namespace safe header +// . In , 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by only under a restricted set of conditions. + +// The inclusion of is needed for definitions of pid_t, etc. +// Placement here is due to a dependency in which is included +// by 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 is needed for the declaration of +// timestruc_t. However, since inclusion of results +// in X/Open and POSIX namespace pollution, the definition for +// timestruct_t has been duplicated in a standards namespace safe header +// . In , 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by only under a restricted set of conditions. + +// The inclusion of is needed for definitions of pid_t, etc. +// Placement here is due to a dependency in which is included +// by 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 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 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 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 +// 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 83aca0f21e..e88473d050 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 // :25:1: - X_LP64 = 1 // :284:1: - X_POSIX_C_SOURCE = 200809 // features.h:281:1: - X_POSIX_SOURCE = 1 // features.h:279:1: - X_STDC_PREDEF_H = 1 // :162:1: - X_SYS_CDEFS_H = 1 // cdefs.h:19:1: - X_SYS_POLL_H = 1 // poll.h:20:1: - Linux = 1 // :231:1: - Unix = 1 // :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 // :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 // :25:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :372:1: + X_POSIX_C_SOURCE = 200809 // features.h:292:1: + X_POSIX_SOURCE = 1 // features.h:290:1: + X_STDC_PREDEF_H = 1 // :223:1: + X_SYS_CDEFS_H = 1 // cdefs.h:20:1: + X_SYS_POLL_H = 1 // poll.h:20:1: + Linux = 1 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -58,7 +69,7 @@ type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -256,9 +330,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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/pthread/capi_illumos_amd64.go b/vendor/modernc.org/libc/pthread/capi_illumos_amd64.go new file mode 100644 index 0000000000..d647cda9cc --- /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 fd760fda47..04f76e09ec 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/pthread_illumos_amd64.go b/vendor/modernc.org/libc/pthread/pthread_illumos_amd64.go new file mode 100644 index 0000000000..b4d06e30d4 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 +// +// 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 +// +// 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 +// +// 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 + +// 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 + +// 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 c7762fdd08..27a1616513 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 // :25:1: - X_GCC_SIZE_T = 0 // stddef.h:195:1: - X_LP64 = 1 // :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 // :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 // :231:1: - Unix = 1 // :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 // :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 // :25:1: + X_GCC_SIZE_T = 0 // stddef.h:200:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_BITS_SETJMP_H = 0 // setjmp.h:20:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :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 +// . -// Both x86-64 and x32 use the 64-bit system call interface. -// NB: Include guard matches what 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 +// . + +// 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 /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -371,9 +479,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 /* :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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 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 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 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 -// 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 // . -// 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 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 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 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 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 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 { // . // 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 , 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 */ // . // 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 -// . - -// 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 // . -// 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 // . -// 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 // . -// 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 -// . +// 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 // . +// 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 +// . + +// 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 // . +// 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 +// . + +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 +// . + +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 // . -// Define the machine-dependent type `jmp_buf'. x86-64 version. +// NB: Include guard matches what 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 +// . -// 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 +// . -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/pwd/capi_illumos_amd64.go b/vendor/modernc.org/libc/pwd/capi_illumos_amd64.go new file mode 100644 index 0000000000..ee09f8bcdd --- /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 2a479f5856..9029ab8bc1 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/pwd_illumos_amd64.go b/vendor/modernc.org/libc/pwd/pwd_illumos_amd64.go new file mode 100644 index 0000000000..d67affe34d --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 +// 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 +// 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 +// 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 . + +// 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 +// 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 +// +// 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 , , , and +// . 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 or the preferred . Doing so will +// pull in the appropriate compiler protocols defined in +// which is in turn is included by and . See comments +// in 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 , 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 922d6ef332..2ad54c6f9e 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 // :25:1: - X_GCC_SIZE_T = 0 // stddef.h:195:1: - X_LP64 = 1 // :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 // :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 // :231:1: - Unix = 1 // :177:1: + NSS_BUFLEN_PASSWD = 1024 // pwd.h:123:1: + X_ABILP64 = 3 // :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 // :25:1: + X_GCC_SIZE_T = 0 // stddef.h:200:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -63,7 +74,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // POSIX Standard: 9.2.2 User Database Access -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -263,9 +337,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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/signal/capi_illumos_amd64.go b/vendor/modernc.org/libc/signal/capi_illumos_amd64.go new file mode 100644 index 0000000000..4a5c0b1236 --- /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 20eeb2da08..fdb9d9a5d9 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/more_illumos_amd64.go b/vendor/modernc.org/libc/signal/more_illumos_amd64.go new file mode 100644 index 0000000000..25cc318bfb --- /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/signal_illumos_amd64.go b/vendor/modernc.org/libc/signal/signal_illumos_amd64.go new file mode 100644 index 0000000000..940a4b3485 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 +// 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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 +// 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 . + +// We need 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 +// 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 as per X/Open and +// POSIX requirements. + +// The sigevent structure is also defined in 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 + +// 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 +// 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 is needed for the declaration of +// timestruc_t. However, since inclusion of results +// in X/Open and POSIX namespace pollution, the definition for +// timestruct_t has been duplicated in a standards namespace safe header +// . In , 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by only under a restricted set of conditions. + +// The inclusion of is needed for definitions of pid_t, etc. +// Placement here is due to a dependency in which is included +// by 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 is needed for the declaration of +// timestruc_t. However, since inclusion of results +// in X/Open and POSIX namespace pollution, the definition for +// timestruct_t has been duplicated in a standards namespace safe header +// . In , 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by only under a restricted set of conditions. + +// The inclusion of is needed for definitions of pid_t, etc. +// Placement here is due to a dependency in which is included +// by 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 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 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 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 +// 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 b7cdcd8e76..0ed9d081e6 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 // :25:1: - X_GCC_SIZE_T = 0 // stddef.h:195:1: - X_LP64 = 1 // :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 // :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 // :231:1: - Unix = 1 // :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 // :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 // :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" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :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 +// . + // 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 /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // ISO C99 Standard: 7.14 Signal handling -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -519,9 +634,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 -// . - // 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 +// . // 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 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 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 +// . + +// Never include this file directly; use 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 +// . -// 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 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 +// . -// 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 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 +// . -// 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 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 // . -// 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 +// Huacai Chen // -// The GNU C Library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser 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 -// . +// @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 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 +// (and thus ) - but this is a more logical +// place for them. Solved by having dummy defines in . + +// This macro may have been defined in . 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 // . -// 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 -// . - -// 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 // . -// 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 // . -// Never include this file directly; use 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 // . -// 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 -// . - -// 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. +// 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 // . -// 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 // . -// 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 -// . +// 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 // . +// 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 +// . + +// 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 // . +// 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 , 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/stdio/capi_illumos_amd64.go b/vendor/modernc.org/libc/stdio/capi_illumos_amd64.go new file mode 100644 index 0000000000..1246ca73a6 --- /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 e327db4207..48233d32c3 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/stdio_illumos_amd64.go b/vendor/modernc.org/libc/stdio/stdio_illumos_amd64.go new file mode 100644 index 0000000000..431d9d5ac6 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :175:1: +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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 +// 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= 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 .) +// +// 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 +// 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 . + +// 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 +// 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 +// 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 +// +// 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 , , , and +// . 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 or the preferred . Doing so will +// pull in the appropriate compiler protocols defined in +// which is in turn is included by and . See comments +// in 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 , 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 b11d50c876..797977f113 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 // :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 // :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 // :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 // :231:1: - Unix = 1 // :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 // :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 // :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" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -91,7 +104,7 @@ type X__float128 = float64 /* :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 /* :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 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 // . -// 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 +// . -// 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 // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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/stdlib/capi_illumos_amd64.go b/vendor/modernc.org/libc/stdlib/capi_illumos_amd64.go new file mode 100644 index 0000000000..41a7917a16 --- /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 bc0091ea3d..67499fd999 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/stdlib_illumos_amd64.go b/vendor/modernc.org/libc/stdlib/stdlib_illumos_amd64.go new file mode 100644 index 0000000000..09f2553fb6 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :175:1: +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// +// 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 +// 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 . + +// Allow global visibility for symbols defined in +// C++ "std" namespace in . + +type Uid_t = uint32 /* stdlib.h:104:22 */ + +// swab() has historically been in 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 . 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 +// +// Copyright 2005 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , 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 +// 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, , contains (through nested inclusion) the +// vast majority of the facilities specified for 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 . + +// 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 +// 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// 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) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 . +// +// 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 + +// Maximum value of a "size_t". SIZE_MAX was previously defined +// in , however, the standards specify it be defined +// in . The headers includes this header as +// does . The value of SIZE_MAX should not deviate +// from the value of ULONG_MAX defined . + +// Maximum limit of sig_atomic_t defined in + +// Maximum limit of wchar_t. The WCHAR_* macros are also +// defined in , 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 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 + +// Minimum limit of sig_atomic_t defined in + +// Minimum limit of wchar_t. The WCHAR_* macros are also +// defined in , 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 +// . 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 which was introduced by +// the ISO C Standard, ISO/IEC 9899:1999 Programming language - C. +// The header is a subset of the 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 +// +// 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 +// +// 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// Inclusion of 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 242876b7ec..f37b85b2c2 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 // :25:1: - X_GCC_SIZE_T = 0 // stddef.h:195:1: - X_GCC_WCHAR_T = 0 // stddef.h:273:1: - X_LP64 = 1 // :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 // :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 // :231:1: - Unix = 1 // :177:1: -) - -// A null pointer constant. - -// XPG requires a few symbols from 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 -// . - -// 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 // :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 // :25:1: + X_GCC_SIZE_T = 0 // stddef.h:200:1: + X_GCC_WCHAR_T = 0 // stddef.h:280:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -142,7 +117,7 @@ type X__float128 = float64 /* :47:21 */ // XPG requires a few symbols from 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 /* :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 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 // . -// 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 // . +// 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 +// . + +// 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 // . -// 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 // . -// 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 -// 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 { // . // 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 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 // . -// 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 +// . -// 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 // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 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 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 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 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 */ // . // 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 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 -// 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 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 // . -// 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 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 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 -// . - -// 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. +// 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 // . -// 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 // . -// 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 -// . +// 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 // . +// 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 +// . + +// 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 // . +// 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 +// . + var _ int8 /* gen.c:2:13: */ 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 0000000000..442b88933c --- /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 41ea29c813..a632f73f55 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/socket_illumos_amd64.go b/vendor/modernc.org/libc/sys/socket/socket_illumos_amd64.go new file mode 100644 index 0000000000..44d1ed4423 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 +// +// 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 +// 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 +// +// 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 +// 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 +// 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 . +// 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 , (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 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 +// +// 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 +// +// 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 +// +// 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 +// 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 +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// 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 " and _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::::, 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 . (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::::, 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 . (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 + +// The following option values are reserved by +// +// 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 c5ca270fe7..e6bdae345b 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 // :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 // :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 // :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 // :231:1: - Unix = 1 // :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 // :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 // :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" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :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 // // . -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 /* :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 // . -// 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 -// 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 { // . // 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 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 // . -// 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 +// . -// 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 // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 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 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 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 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 */ // . // 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 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 -// 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 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 // . -// 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 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 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 -// . - -// 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. +// 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 // . -// 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 // . -// 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 -// . +// 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 // . +// 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 +// . + +// 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 // . +// 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 @@ -1743,29 +1796,15 @@ type X__kernel_sighandler_t = uintptr /* posix_types.h:30: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/stat/capi_illumos_amd64.go b/vendor/modernc.org/libc/sys/stat/capi_illumos_amd64.go new file mode 100644 index 0000000000..5bd145d359 --- /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 7ab15123be..005ccface5 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/stat_illumos_amd64.go b/vendor/modernc.org/libc/sys/stat/stat_illumos_amd64.go new file mode 100644 index 0000000000..2f60955879 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// 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 +// 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= 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 .) +// +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 includes a +// definition for timestruc_t needed by the stat structure. However, +// including either , which includes , or +// including 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 and +// . The header 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 9c460d3ac4..2c950d24db 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 // :25:1: - X_LP64 = 1 // :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 // :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 // :231:1: - Unix = 1 // :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 // :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 // :25:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -94,7 +101,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // POSIX Standard: 5.6 File Characteristics -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -294,9 +364,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 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 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 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 // . -// 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 +// . + +// 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 +// . -// 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 +// . 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/types/capi_illumos_amd64.go b/vendor/modernc.org/libc/sys/types/capi_illumos_amd64.go new file mode 100644 index 0000000000..137dc72328 --- /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 762800655c..29e8de38e7 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/types_illumos_amd64.go b/vendor/modernc.org/libc/sys/types/types_illumos_amd64.go new file mode 100644 index 0000000000..1792a9a9b6 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 8a758d4cd6..dec9daa5a0 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 // :25:1: - X_GCC_SIZE_T = 0 // stddef.h:195:1: - X_LP64 = 1 // :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 // :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 // :231:1: - Unix = 1 // :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 // :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 // :25:1: + X_GCC_SIZE_T = 0 // stddef.h:200:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -80,7 +91,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // POSIX Standard: 2.6 Primitive System Data Types -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -280,9 +354,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 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 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 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 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 */ // . // 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 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 -// 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 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 // . -// 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 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 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 -// . - -// 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. +// 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 // . -// 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 // . -// 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 -// . - -// 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 // . +// 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 +// . + +// 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 // . +// 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/termios/capi_illumos_amd64.go b/vendor/modernc.org/libc/termios/capi_illumos_amd64.go new file mode 100644 index 0000000000..b922575919 --- /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 193dc60e83..b240607f53 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/termios_illumos_amd64.go b/vendor/modernc.org/libc/termios/termios_illumos_amd64.go new file mode 100644 index 0000000000..6af3344d0f --- /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 // :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 // :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 // :172:1: + TIOC1 = 29696 // termios.h:421:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// +// 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 +// 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= 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 .) +// +// 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 +// +// 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 +// 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 +// including 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// including 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 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 while still allowing for it's existence +// here. With the introduction of XPG6, _POSIX_VDISABLE can only +// be defined in . + +// 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 494b20174f..da9f245568 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 // :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 // :284:1: - X_POSIX_C_SOURCE = 200809 // features.h:281:1: - X_POSIX_SOURCE = 1 // features.h:279:1: - X_STDC_PREDEF_H = 1 // :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 // :231:1: - Unix = 1 // :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 // :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 // :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" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :372:1: + X_POSIX_C_SOURCE = 200809 // features.h:292:1: + X_POSIX_SOURCE = 1 // features.h:290:1: + X_STDC_PREDEF_H = 1 // :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 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -219,7 +231,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // POSIX Standard: 7.1-2 General Terminal Interface -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -419,9 +494,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 */ // . 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/time/capi_illumos_amd64.go b/vendor/modernc.org/libc/time/capi_illumos_amd64.go new file mode 100644 index 0000000000..22a7a7d0e8 --- /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 fef9264df7..4bdcc62e5f 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/time_illumos_amd64.go b/vendor/modernc.org/libc/time/time_illumos_amd64.go new file mode 100644 index 0000000000..01b4e776de --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +type Fd_set = Fd_set1 /* select.h:125:3 */ + +// Neither X/Open nor POSIX allow the inclusion of for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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_amd64.go b/vendor/modernc.org/libc/time/time_linux_amd64.go index 1e08a9c985..21f9ecb4b5 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 // :177:1: // #define CLOCKS_PER_SEC ((__clock_t) 1000000) - CLOCKS_PER_SEC = 1000000 + CLOCKS_PER_SEC = 1000000 ) type Ptrdiff_t = int64 /* :3:26 */ diff --git a/vendor/modernc.org/libc/time/time_linux_loong64.go b/vendor/modernc.org/libc/time/time_linux_loong64.go index 7ad6dd1a96..2ed0c7fa86 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,53 +15,64 @@ 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: - 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 // :25:1: - X_GCC_SIZE_T = 0 // stddef.h:195:1: - X_LP64 = 1 // :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 // :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 // :231:1: - Unix = 1 // :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 // :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 // :25:1: + X_GCC_SIZE_T = 0 // stddef.h:200:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -95,7 +106,7 @@ type X__float128 = float64 /* :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 @@ -115,7 +126,7 @@ type X__float128 = float64 /* :47:21 */ // Never include this file directly; use 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 @@ -134,7 +145,7 @@ type X__float128 = float64 /* :47:21 */ // Never include this file directly; use 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 @@ -151,11 +162,25 @@ type X__float128 = float64 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 @@ -172,7 +197,7 @@ type X__float128 = float64 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 */ @@ -191,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 */ @@ -238,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 @@ -253,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 // . // See for the meaning of these macros. This file exists so // that 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. @@ -271,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 @@ -301,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. @@ -313,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 @@ -397,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 @@ -417,10 +443,10 @@ type X__sig_atomic_t = int32 /* types.h:214:13 */ // Never include this file directly; use 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 @@ -440,10 +466,10 @@ type Clock_t = X__clock_t /* clock_t.h:7:19 */ // Never include this file directly; use 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 @@ -481,7 +507,7 @@ type Tm = struct { // NB: Include guard matches what 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 @@ -501,7 +527,7 @@ type Tm = struct { // Never include this file directly; use 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 @@ -528,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. @@ -537,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 @@ -562,10 +588,10 @@ type Timespec = struct { // Never include this file directly; use 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 @@ -585,10 +611,10 @@ type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ // Never include this file directly; use 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 @@ -612,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 @@ -642,9 +668,8 @@ type Pid_t = X__pid_t /* time.h:54:17 */ // . // 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 , 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 @@ -671,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 index 1e08a9c985..21f9ecb4b5 100644 --- a/vendor/modernc.org/libc/time/time_linux_mips64le.go +++ b/vendor/modernc.org/libc/time/time_linux_mips64le.go @@ -63,7 +63,7 @@ const ( Unix = 1 // :177:1: // #define CLOCKS_PER_SEC ((__clock_t) 1000000) - CLOCKS_PER_SEC = 1000000 + CLOCKS_PER_SEC = 1000000 ) type Ptrdiff_t = int64 /* :3:26 */ 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 0000000000..8b58510ae9 --- /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 4e94243cf3..1dff1b3f42 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/unistd_illumos_amd64.go b/vendor/modernc.org/libc/unistd/unistd_illumos_amd64.go new file mode 100644 index 0000000000..63af42eebc --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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 +// 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= 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 .) +// +// 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 +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// 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 +// 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= 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 .) +// +// 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 +// 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 +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 7a83d48f3f..3b62c2f3ff 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 // :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 // :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 // :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 // :231:1: - Unix = 1 // :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 // :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 // :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" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :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 // :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 // :308:1: + Unix = 1 // :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 /* :3:26 */ @@ -532,7 +553,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // POSIX Standard: 2.10 Symbolic Constants -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -732,9 +816,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :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 /* :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 /* :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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . // 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 /* :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 /* :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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 , 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/utime/capi_illumos_amd64.go b/vendor/modernc.org/libc/utime/capi_illumos_amd64.go new file mode 100644 index 0000000000..754737fe04 --- /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 8f7c87f4d4..82dc916048 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/utime_illumos_amd64.go b/vendor/modernc.org/libc/utime/utime_illumos_amd64.go new file mode 100644 index 0000000000..cc39bd1950 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// 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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 9d673aca99..92694858e6 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 // :25:1: - X_LP64 = 1 // :284:1: - X_POSIX_C_SOURCE = 200809 // features.h:281:1: - X_POSIX_SOURCE = 1 // features.h:279:1: - X_STDC_PREDEF_H = 1 // :162:1: - X_SYS_CDEFS_H = 1 // cdefs.h:19:1: - X_UTIME_H = 1 // utime.h:23:1: - Linux = 1 // :231:1: - Unix = 1 // :177:1: + X_ABILP64 = 3 // :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 // :25:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :372:1: + X_POSIX_C_SOURCE = 200809 // features.h:292:1: + X_POSIX_SOURCE = 1 // features.h:290:1: + X_STDC_PREDEF_H = 1 // :223:1: + X_SYS_CDEFS_H = 1 // cdefs.h:20:1: + X_UTIME_H = 1 // utime.h:23:1: + Linux = 1 // :308:1: + Unix = 1 // :247:1: ) type Ptrdiff_t = int64 /* :3:26 */ @@ -50,7 +61,7 @@ type X__uint128_t = struct { type X__builtin_va_list = uintptr /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // POSIX Standard: 5.6.6 Set File Access and Modification Times -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -250,9 +324,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 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/uuid/uuid/capi_illumos_amd64.go b/vendor/modernc.org/libc/uuid/uuid/capi_illumos_amd64.go new file mode 100644 index 0000000000..1b9a094eae --- /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/uuid_illumos_amd64.go b/vendor/modernc.org/libc/uuid/uuid/uuid_illumos_amd64.go new file mode 100644 index 0000000000..8f48bbd78a --- /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 // :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 // :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 // :172:1: + Unix = 1 // :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 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// 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= 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 .) +// +// 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 . +// CDDL HEADER START +// +// The contents of this file are subject to the terms of the +// Common Development and Distribution License (the "License"). +// You may not use this file except in compliance with the License. +// +// You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +// or http://www.opensolaris.org/os/licensing. +// See the License for the specific language governing permissions +// and limitations under the License. +// +// When distributing Covered Code, include this CDDL HEADER in each +// file and include the License file at usr/src/OPENSOLARIS.LICENSE. +// If applicable, add the following below this CDDL 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 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// Use is subject to license terms. + +// This file, , is part of the Sun Microsystems implementation +// of 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: +// +// Provides only the "_t" types defined in this +// file which is a subset of the contents of +// . (This can be appropriate for +// all programs/modules except those claiming +// ANSI-C conformance.) +// +// Provides the Kernel and Driver appropriate +// components of . +// +// 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 +// 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 */ // ? type +type Daddr_t = int64 /* types.h:108:15 */ // 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 +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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 which includes this header conditionally +// depending on which feature test macros are defined. By default, +// this header is included by . X/Open and POSIX +// standards requirements result in this header being included +// by 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 +// 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 +// +// 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 +// 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 +// including 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 is historical and was added for +// backward compatibility in delta 1.2 when a number of definitions +// were moved out of . More recently, the timespec and +// itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*, +// _TIMER_*, and TIMER_* symbols were moved to , +// which is now included by . 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 +// +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 for the +// definition of the sigevent structure. Both require the inclusion +// of and when using the timer_create() function. +// However, X/Open also specifies that the sigevent structure be defined +// in as described in the header . This prevents +// compiler warnings for applications that only include and not +// also . The sigval union and the sigevent structure is +// therefore defined both here and in which gets included +// via inclusion of . +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 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 +// +// 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 and duplicated +// in 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 in under certain conditions. +// Rather than include 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 . + +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 . + +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 +// +// 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/wctype/capi_illumos_amd64.go b/vendor/modernc.org/libc/wctype/capi_illumos_amd64.go new file mode 100644 index 0000000000..da3ab522d0 --- /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 e1138ccd51..397806877c 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/wctype_illumos_amd64.go b/vendor/modernc.org/libc/wctype/wctype_illumos_amd64.go new file mode 100644 index 0000000000..53a659c433 --- /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 // :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 // :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 // :172:1: + Unix = 1 // :175:1: +) + +type Ptrdiff_t = int64 /* :3:26 */ + +type Size_t = uint64 /* :9:23 */ + +type Wchar_t = int32 /* :15:24 */ + +type X__int128_t = struct { + Flo int64 + Fhi int64 +} /* :21:43 */ // must match modernc.org/mathutil.Int128 +type X__uint128_t = struct { + Flo uint64 + Fhi uint64 +} /* :22:44 */ // must match modernc.org/mathutil.Int128 + +type X__builtin_va_list = uintptr /* :46:14 */ +type X__float128 = float64 /* :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 +// +// 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 +// 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= 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 .) +// +// 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 +// +// 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 . + +// 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 +// 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 +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 +// 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 +// 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 +// 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 . + +// 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 +// 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 +// 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 +// 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 +// 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 +// 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 . + +// 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 +// 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 +// +// 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 , , , and +// . 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 or the preferred . Doing so will +// pull in the appropriate compiler protocols defined in +// which is in turn is included by and . See comments +// in 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 , 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 +// +// 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 . + +// 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 a36ea7c5ab..80f6a1dd0f 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 // :25:1: - X_LP64 = 1 // :284:1: - X_POSIX_C_SOURCE = 200809 // features.h:281:1: - X_POSIX_SOURCE = 1 // features.h:279:1: - X_STDC_PREDEF_H = 1 // :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 // :231:1: - Unix = 1 // :177:1: + WEOF = 4294967295 // wctype.h:33:1: + X_ABILP64 = 3 // :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 // :25:1: + X_LOONGARCH_ARCH = "loongarch64" // :214:1: + X_LOONGARCH_ARCH_LOONGARCH64 = 1 // :340:1: + X_LOONGARCH_FPSET = 32 // :265:1: + X_LOONGARCH_SIM = 3 // :233:1: + X_LOONGARCH_SPFPSET = 32 // :88:1: + X_LOONGARCH_SZINT = 32 // :230:1: + X_LOONGARCH_SZLONG = 64 // :388:1: + X_LOONGARCH_SZPTR = 64 // :200:1: + X_LOONGARCH_TUNE = "la464" // :245:1: + X_LOONGARCH_TUNE_LA464 = 1 // :63:1: + X_LP64 = 1 // :372:1: + X_POSIX_C_SOURCE = 200809 // features.h:292:1: + X_POSIX_SOURCE = 1 // features.h:290:1: + X_STDC_PREDEF_H = 1 // :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 // :308:1: + Unix = 1 // :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 /* :46:14 */ type X__float128 = float64 /* :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 /* :47:21 */ // ISO C99 Standard: 7.25 // Wide character classification and mapping utilities -// 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 /* :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 /* :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 /* :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 /* :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 +// . + +// 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 +// . + +// 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 +// . + +// 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 , this test @@ -323,9 +397,15 @@ type X__float128 = float64 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 /* :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 +// . -// 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 /* :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, [, ]) +// 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 /* :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 +// . + // 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 /* :47:21 */ // Never include this file directly; use 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 +// . -// 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 /* :47:21 */ // License along with the GNU C Library; if not, see // . -// 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 // . // See for the meaning of these macros. This file exists so // that 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 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 // 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 */ // . // 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 , 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/modules.txt b/vendor/modules.txt index 39f4abf8e2..ea148cabfd 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -58,7 +58,7 @@ github.com/CortexFoundation/robot/backend # github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66 ## explicit; go 1.16 github.com/CortexFoundation/statik -# github.com/CortexFoundation/torrentfs v1.0.59-0.20240122113806-d1bfa0497926 +# github.com/CortexFoundation/torrentfs v1.0.59-0.20240127141413-4bf19d565523 ## explicit; go 1.21 github.com/CortexFoundation/torrentfs github.com/CortexFoundation/torrentfs/backend @@ -74,7 +74,7 @@ github.com/CortexFoundation/wormhole # github.com/DataDog/zstd v1.5.6-0.20230622172052-ea68dcab66c0 ## explicit; go 1.14 github.com/DataDog/zstd -# github.com/RoaringBitmap/roaring v1.7.0 +# github.com/RoaringBitmap/roaring v1.8.0 ## explicit; go 1.14 github.com/RoaringBitmap/roaring github.com/RoaringBitmap/roaring/BitSliceIndexing @@ -233,7 +233,7 @@ github.com/aws/aws-sdk-go-v2/internal/shareddefaults github.com/aws/aws-sdk-go-v2/internal/strings github.com/aws/aws-sdk-go-v2/internal/sync/singleflight github.com/aws/aws-sdk-go-v2/internal/timeconv -# github.com/aws/aws-sdk-go-v2/config v1.26.5 +# github.com/aws/aws-sdk-go-v2/config v1.26.6 ## explicit; go 1.19 github.com/aws/aws-sdk-go-v2/config # github.com/aws/aws-sdk-go-v2/credentials v1.16.16 @@ -255,7 +255,7 @@ github.com/aws/aws-sdk-go-v2/internal/configsources # github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 ## explicit; go 1.19 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 -# github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 +# github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 ## explicit; go 1.19 github.com/aws/aws-sdk-go-v2/internal/ini # github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 @@ -369,7 +369,7 @@ github.com/cockroachdb/errors/withstack # github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b ## explicit; go 1.16 github.com/cockroachdb/logtags -# github.com/cockroachdb/pebble v0.0.0-20240119213229-5b092519dc3f +# github.com/cockroachdb/pebble v0.0.0-20240123194302-5b280af78f31 ## explicit; go 1.21 github.com/cockroachdb/pebble github.com/cockroachdb/pebble/batchrepr @@ -621,10 +621,10 @@ github.com/google/go-querystring/query ## explicit; go 1.12 github.com/google/gofuzz github.com/google/gofuzz/bytesource -# github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 +# github.com/google/pprof v0.0.0-20240125082051-42cd04596328 ## explicit; go 1.19 github.com/google/pprof/profile -# github.com/google/uuid v1.5.0 +# github.com/google/uuid v1.6.0 ## explicit github.com/google/uuid # github.com/gorilla/websocket v1.5.2-0.20231113005423-6f5d2139f4b9 @@ -701,12 +701,13 @@ github.com/jmespath/go-jmespath # github.com/julienschmidt/httprouter v1.3.0 ## explicit; go 1.7 github.com/julienschmidt/httprouter -# github.com/klauspost/compress v1.17.4 +# github.com/klauspost/compress v1.17.5 ## explicit; go 1.19 github.com/klauspost/compress github.com/klauspost/compress/fse github.com/klauspost/compress/huff0 github.com/klauspost/compress/internal/cpuinfo +github.com/klauspost/compress/internal/race github.com/klauspost/compress/internal/snapref github.com/klauspost/compress/s2 github.com/klauspost/compress/snappy @@ -927,7 +928,7 @@ github.com/rakyll/statik/fs # github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec ## explicit; go 1.12 github.com/remyoudompheng/bigfft -# github.com/rivo/uniseg v0.4.4 +# github.com/rivo/uniseg v0.4.5 ## explicit; go 1.18 github.com/rivo/uniseg # github.com/rogpeppe/go-internal v1.12.0 @@ -998,7 +999,7 @@ github.com/ucwong/filecache # github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb ## explicit; go 1.19 github.com/ucwong/go-ttlmap -# github.com/ucwong/golang-kv v1.0.24-0.20240119222541-2287e2d1014e +# github.com/ucwong/golang-kv v1.0.24-0.20240123222739-ef750e9bde39 ## explicit; go 1.21 github.com/ucwong/golang-kv github.com/ucwong/golang-kv/badger @@ -1235,7 +1236,7 @@ gopkg.in/urfave/cli.v1 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# modernc.org/libc v1.40.6 +# modernc.org/libc v1.40.7 ## explicit; go 1.20 modernc.org/libc modernc.org/libc/errno