mirror of
https://github.com/BishopFox/sliver.git
synced 2026-11-08 17:09:51 -10:00
Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03ba0ea9e7 | ||
|
|
42a4e93aae | ||
|
|
81ec6398b8 | ||
|
|
5da01d9278 | ||
|
|
bc9bba5d39 | ||
|
|
89f029f55b | ||
|
|
64a31ee3b0 | ||
|
|
9c44890db7 | ||
|
|
50103d7ae9 | ||
|
|
448c9a8c35 | ||
|
|
52e296fed4 | ||
|
|
975d37f169 | ||
|
|
94a4be6254 | ||
|
|
988282cd40 | ||
|
|
dc687055a4 |
No files matched your search
@@ -15,7 +15,7 @@ jobs:
|
||||
- name: Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "^1.20"
|
||||
go-version: "1.20.1"
|
||||
|
||||
- name: OS Packages
|
||||
run: |
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.20
|
||||
FROM golang:1.20.1
|
||||
|
||||
#
|
||||
# IMPORTANT: This Dockerfile is used for testing, I do not recommend deploying
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ set -e
|
||||
|
||||
# Creates the static go asset archives
|
||||
|
||||
GO_VER="1.20"
|
||||
GARBLE_VER="1.20.0"
|
||||
GO_VER="1.20.1"
|
||||
GARBLE_VER="1.20.2"
|
||||
SGN_VER="0.0.3"
|
||||
|
||||
GO_ARCH_1="amd64"
|
||||
|
||||
@@ -38,8 +38,8 @@ require (
|
||||
github.com/things-go/go-socks5 v0.0.3-0.20210722055343-24af464efe43
|
||||
github.com/xlab/treeprint v1.1.0
|
||||
github.com/yiya1989/sshkrb5 v0.0.0-20201110125252-a1455b75a35e
|
||||
golang.org/x/crypto v0.5.0
|
||||
golang.org/x/net v0.6.0
|
||||
golang.org/x/crypto v0.6.0
|
||||
golang.org/x/net v0.7.0
|
||||
golang.org/x/sys v0.5.0
|
||||
golang.org/x/term v0.5.0
|
||||
golang.org/x/text v0.7.0
|
||||
@@ -48,12 +48,12 @@ require (
|
||||
google.golang.org/grpc v1.42.0-dev.0.20211020220737-f00baa6c3c84
|
||||
google.golang.org/protobuf v1.28.1
|
||||
gopkg.in/AlecAivazis/survey.v1 v1.8.8
|
||||
gorm.io/driver/mysql v1.4.6
|
||||
gorm.io/driver/postgres v1.4.6
|
||||
gorm.io/driver/mysql v1.4.7
|
||||
gorm.io/driver/postgres v1.4.8
|
||||
gorm.io/driver/sqlite v1.4.4
|
||||
gorm.io/gorm v1.24.5
|
||||
gvisor.dev/gvisor v0.0.0-20220817001344-846276b3dbc5
|
||||
modernc.org/sqlite v1.19.3
|
||||
modernc.org/sqlite v1.20.4
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -70,6 +70,7 @@ require (
|
||||
github.com/demisto/goxforce v0.0.0-20160322194047-db8357535b1d // indirect
|
||||
github.com/desertbit/closer/v3 v3.1.2 // indirect
|
||||
github.com/dlclark/regexp2 v1.4.0 // indirect
|
||||
github.com/dustin/go-humanize v1.0.0 // indirect
|
||||
github.com/gen2brain/shm v0.0.0-20200228170931-49f9650110c5 // indirect
|
||||
github.com/go-sql-driver/mysql v1.7.0 // indirect
|
||||
github.com/gobwas/httphead v0.1.0 // indirect
|
||||
@@ -83,7 +84,7 @@ require (
|
||||
github.com/inconshreveable/mousetrap v1.0.1 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
|
||||
github.com/jackc/pgx/v5 v5.2.0 // indirect
|
||||
github.com/jackc/pgx/v5 v5.3.0 // indirect
|
||||
github.com/jcmturner/gofork v1.0.0 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
@@ -113,8 +114,8 @@ require (
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
lukechampine.com/uint128 v1.2.0 // indirect
|
||||
modernc.org/cc/v3 v3.40.0 // indirect
|
||||
modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8 // indirect
|
||||
modernc.org/libc v1.21.2 // indirect
|
||||
modernc.org/ccgo/v3 v3.16.13 // indirect
|
||||
modernc.org/libc v1.22.2 // indirect
|
||||
modernc.org/mathutil v1.5.0 // indirect
|
||||
modernc.org/memory v1.4.0 // indirect
|
||||
modernc.org/opt v0.1.3 // indirect
|
||||
|
||||
@@ -85,6 +85,7 @@ github.com/desertbit/readline v1.5.1/go.mod h1:pHQgTsCFs9Cpfh5mlSUFi9Xa5kkL4d8L1
|
||||
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
|
||||
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
||||
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
@@ -143,6 +144,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
@@ -169,12 +171,11 @@ github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7P
|
||||
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
||||
github.com/jackc/pgx/v5 v5.2.0 h1:NdPpngX0Y6z6XDFKqmFQaE+bCtkqzvQIOt1wvBlAqs8=
|
||||
github.com/jackc/pgx/v5 v5.2.0/go.mod h1:Ptn7zmohNsWEsdxRawMzk3gaKma2obW+NWTnKa0S4nk=
|
||||
github.com/jackc/puddle/v2 v2.1.2/go.mod h1:2lpufsF5mRHO6SuZkm0fNYxM6SWHfvyFj62KwNzgels=
|
||||
github.com/jackc/pgx/v5 v5.3.0 h1:/NQi8KHMpKWHInxXesC8yD4DhkXPrVhmnwYkjp9AmBA=
|
||||
github.com/jackc/pgx/v5 v5.3.0/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8=
|
||||
github.com/jackc/puddle/v2 v2.2.0/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
||||
github.com/jcmturner/gofork v1.0.0 h1:J7uCkflzTEhUZ64xqKnkDxq3kzc96ajM1Gli5ktUem8=
|
||||
github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.4 h1:N+gz6UngBPF4M288kiMURPHELDMIhF/Em35aYuKrsSc=
|
||||
@@ -303,7 +304,6 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
@@ -316,10 +316,8 @@ golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPh
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220208050332-20e1d8d225ab/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
|
||||
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
|
||||
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
|
||||
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
|
||||
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
@@ -350,9 +348,9 @@ golang.org/x/net v0.0.0-20211111083644-e5c967477495/go.mod h1:9nx3DQGgdP8bBQD5qx
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
||||
golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 h1:B333XXssMuKQeBwiNODx4TupZy7bf4sxFZnN2ZOcvUE=
|
||||
@@ -364,8 +362,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7 h1:ZrnxWX62AgTKOSagEqxvb3ffipvEDX2pl7E1TdqLqIc=
|
||||
golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180606202747-9527bec2660b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -403,13 +401,11 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
|
||||
golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -417,8 +413,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE=
|
||||
@@ -505,10 +499,10 @@ gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/driver/mysql v1.4.6 h1:5zS3vIKcyb46byXZNcYxaT9EWNIhXzu0gPuvvVrwZ8s=
|
||||
gorm.io/driver/mysql v1.4.6/go.mod h1:SxzItlnT1cb6e1e4ZRpgJN2VYtcqJgqnHxWr4wsP8oc=
|
||||
gorm.io/driver/postgres v1.4.6 h1:1FPESNXqIKG5JmraaH2bfCVlMQ7paLoCreFxDtqzwdc=
|
||||
gorm.io/driver/postgres v1.4.6/go.mod h1:UJChCNLFKeBqQRE+HrkFUbKbq9idPXmTOk2u4Wok8S4=
|
||||
gorm.io/driver/mysql v1.4.7 h1:rY46lkCspzGHn7+IYsNpSfEv9tA+SU4SkkB+GFX125Y=
|
||||
gorm.io/driver/mysql v1.4.7/go.mod h1:SxzItlnT1cb6e1e4ZRpgJN2VYtcqJgqnHxWr4wsP8oc=
|
||||
gorm.io/driver/postgres v1.4.8 h1:NDWizaclb7Q2aupT0jkwK8jx1HVCNzt+PQ8v/VnxviA=
|
||||
gorm.io/driver/postgres v1.4.8/go.mod h1:O9MruWGNLUBUWVYfWuBClpf3HeGjOoybY0SNmCs3wsw=
|
||||
gorm.io/driver/sqlite v1.4.4 h1:gIufGoR0dQzjkyqDyYSCvsYR6fba1Gw5YKDqKeChxFc=
|
||||
gorm.io/driver/sqlite v1.4.4/go.mod h1:0Aq3iPO+v9ZKbcdiz8gLWRw5VOPcBOPUQJFLq5e2ecI=
|
||||
gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
|
||||
@@ -524,20 +518,20 @@ lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
|
||||
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
||||
modernc.org/cc/v3 v3.40.0 h1:P3g79IUS/93SYhtoeaHW+kRCIrYaxJ27MFPv+7kaTOw=
|
||||
modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0=
|
||||
modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8 h1:0+dsXf0zeLx9ixj4nilg6jKe5Bg1ilzBwSFq4kJmIUc=
|
||||
modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8/go.mod h1:fUB3Vn0nVPReA+7IG7yZDfjv1TMWjhQP8gCxrFAtL5g=
|
||||
modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw=
|
||||
modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY=
|
||||
modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk=
|
||||
modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM=
|
||||
modernc.org/libc v1.21.2 h1:V053DgNSpAY+IPrO3XlWqrFKUiQqHyPqG4dsx42Ulck=
|
||||
modernc.org/libc v1.21.2/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI=
|
||||
modernc.org/libc v1.22.2 h1:4U7v51GyhlWqQmwCHj28Rdq2Yzwk55ovjFrdPjs8Hb0=
|
||||
modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug=
|
||||
modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ=
|
||||
modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
modernc.org/memory v1.4.0 h1:crykUfNSnMAXaOJnnxcSzbUGMqkLWjklJKkBK2nwZwk=
|
||||
modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU=
|
||||
modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4=
|
||||
modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
|
||||
modernc.org/sqlite v1.19.3 h1:dIoagx6yIQT3V/zOSeAyZ8OqQyEr17YTgETOXTZNJMA=
|
||||
modernc.org/sqlite v1.19.3/go.mod h1:xiyJD7FY8mTZXnQwE/gEL1STtFrrnDx03V8KhVQmcr8=
|
||||
modernc.org/sqlite v1.20.4 h1:J8+m2trkN+KKoE7jglyHYYYiaq5xmz2HoHJIiBlRzbE=
|
||||
modernc.org/sqlite v1.20.4/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A=
|
||||
modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=
|
||||
modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw=
|
||||
modernc.org/tcl v1.15.0 h1:oY+JeD11qVVSgVvodMJsu7Edf8tr5E/7tuhF5cNYz34=
|
||||
|
||||
@@ -31,8 +31,10 @@ import (
|
||||
"github.com/gofrs/uuid"
|
||||
)
|
||||
|
||||
var zeroGUID = uuid.Must(uuid.FromString("00000000-0000-0000-0000-000000000000"))
|
||||
|
||||
// UUIDFromMAC - Generate a UUID based on the machine's MAC addresses, this is
|
||||
// generally used as a last resort to fingerpint the host machine. It creates
|
||||
// generally used as a last resort to fingerprint the host machine. It creates
|
||||
// a uuid by hashing the MAC addresses of all network interfaces and using the
|
||||
// first 16 bytes of the hash as the UUID. This should work so long as network
|
||||
// interfaces are not added or removed, since its physical addresses this should
|
||||
@@ -43,7 +45,7 @@ func UUIDFromMAC() string {
|
||||
// {{end}}
|
||||
interfaces, err := net.Interfaces()
|
||||
if err != nil {
|
||||
return ""
|
||||
return zeroGUID.String()
|
||||
}
|
||||
hardwareAddrs := []string{}
|
||||
for _, iface := range interfaces {
|
||||
@@ -51,6 +53,9 @@ func UUIDFromMAC() string {
|
||||
hardwareAddrs = append(hardwareAddrs, iface.HardwareAddr.String())
|
||||
}
|
||||
}
|
||||
if len(hardwareAddrs) == 0 {
|
||||
return zeroGUID.String()
|
||||
}
|
||||
sort.Strings(hardwareAddrs) // Ensure deterministic order
|
||||
digest := sha256.New()
|
||||
for _, addr := range hardwareAddrs {
|
||||
@@ -58,7 +63,7 @@ func UUIDFromMAC() string {
|
||||
}
|
||||
value, err := uuid.FromBytes(digest.Sum(nil)[:16]) // Must be 128-bits
|
||||
if err != nil {
|
||||
return ""
|
||||
return zeroGUID.String()
|
||||
}
|
||||
return value.String()
|
||||
}
|
||||
@@ -1,23 +1,23 @@
|
||||
// +build darwin
|
||||
//go:build darwin
|
||||
|
||||
package hostuuid
|
||||
|
||||
/*
|
||||
Sliver Implant Framework
|
||||
Copyright (C) 2019 Bishop Fox
|
||||
Sliver Implant Framework
|
||||
Copyright (C) 2019 Bishop Fox
|
||||
|
||||
This program 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 of the License, or
|
||||
(at your option) any later version.
|
||||
This program 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 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that 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.
|
||||
This program is distributed in the hope that 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.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
//go:build linux
|
||||
// +build linux
|
||||
|
||||
package hostuuid
|
||||
|
||||
@@ -23,15 +22,15 @@ package hostuuid
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
)
|
||||
|
||||
// GetUUID - Get a system specific UUID
|
||||
func GetUUID() string {
|
||||
uuid, err := ioutil.ReadFile("/etc/machine-id")
|
||||
uuid, err := os.ReadFile("/etc/machine-id")
|
||||
// UUID length is 32 plus newline
|
||||
if err != nil || len(uuid) != 33 {
|
||||
uuid, err = ioutil.ReadFile("/var/lib/dbus/machine-id")
|
||||
uuid, err = os.ReadFile("/var/lib/dbus/machine-id")
|
||||
if err != nil || len(uuid) != 33 {
|
||||
return UUIDFromMAC() // Failed, try to use MAC addresses
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
sudo: false
|
||||
language: go
|
||||
go:
|
||||
- 1.3.x
|
||||
- 1.5.x
|
||||
- 1.6.x
|
||||
- 1.7.x
|
||||
- 1.8.x
|
||||
- 1.9.x
|
||||
- master
|
||||
matrix:
|
||||
allow_failures:
|
||||
- go: master
|
||||
fast_finish: true
|
||||
install:
|
||||
- # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step).
|
||||
script:
|
||||
- go get -t -v ./...
|
||||
- diff -u <(echo -n) <(gofmt -d -s .)
|
||||
- go tool vet .
|
||||
- go test -v -race ./...
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 2005-2008 Dustin Sallings <[email protected]>
|
||||
|
||||
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.
|
||||
|
||||
<http://www.opensource.org/licenses/mit-license.php>
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
# Humane Units [](https://travis-ci.org/dustin/go-humanize) [](https://godoc.org/github.com/dustin/go-humanize)
|
||||
|
||||
Just a few functions for helping humanize times and sizes.
|
||||
|
||||
`go get` it as `github.com/dustin/go-humanize`, import it as
|
||||
`"github.com/dustin/go-humanize"`, use it as `humanize`.
|
||||
|
||||
See [godoc](https://godoc.org/github.com/dustin/go-humanize) for
|
||||
complete documentation.
|
||||
|
||||
## Sizes
|
||||
|
||||
This lets you take numbers like `82854982` and convert them to useful
|
||||
strings like, `83 MB` or `79 MiB` (whichever you prefer).
|
||||
|
||||
Example:
|
||||
|
||||
```go
|
||||
fmt.Printf("That file is %s.", humanize.Bytes(82854982)) // That file is 83 MB.
|
||||
```
|
||||
|
||||
## Times
|
||||
|
||||
This lets you take a `time.Time` and spit it out in relative terms.
|
||||
For example, `12 seconds ago` or `3 days from now`.
|
||||
|
||||
Example:
|
||||
|
||||
```go
|
||||
fmt.Printf("This was touched %s.", humanize.Time(someTimeInstance)) // This was touched 7 hours ago.
|
||||
```
|
||||
|
||||
Thanks to Kyle Lemons for the time implementation from an IRC
|
||||
conversation one day. It's pretty neat.
|
||||
|
||||
## Ordinals
|
||||
|
||||
From a [mailing list discussion][odisc] where a user wanted to be able
|
||||
to label ordinals.
|
||||
|
||||
0 -> 0th
|
||||
1 -> 1st
|
||||
2 -> 2nd
|
||||
3 -> 3rd
|
||||
4 -> 4th
|
||||
[...]
|
||||
|
||||
Example:
|
||||
|
||||
```go
|
||||
fmt.Printf("You're my %s best friend.", humanize.Ordinal(193)) // You are my 193rd best friend.
|
||||
```
|
||||
|
||||
## Commas
|
||||
|
||||
Want to shove commas into numbers? Be my guest.
|
||||
|
||||
0 -> 0
|
||||
100 -> 100
|
||||
1000 -> 1,000
|
||||
1000000000 -> 1,000,000,000
|
||||
-100000 -> -100,000
|
||||
|
||||
Example:
|
||||
|
||||
```go
|
||||
fmt.Printf("You owe $%s.\n", humanize.Comma(6582491)) // You owe $6,582,491.
|
||||
```
|
||||
|
||||
## Ftoa
|
||||
|
||||
Nicer float64 formatter that removes trailing zeros.
|
||||
|
||||
```go
|
||||
fmt.Printf("%f", 2.24) // 2.240000
|
||||
fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24
|
||||
fmt.Printf("%f", 2.0) // 2.000000
|
||||
fmt.Printf("%s", humanize.Ftoa(2.0)) // 2
|
||||
```
|
||||
|
||||
## SI notation
|
||||
|
||||
Format numbers with [SI notation][sinotation].
|
||||
|
||||
Example:
|
||||
|
||||
```go
|
||||
humanize.SI(0.00000000223, "M") // 2.23 nM
|
||||
```
|
||||
|
||||
## English-specific functions
|
||||
|
||||
The following functions are in the `humanize/english` subpackage.
|
||||
|
||||
### Plurals
|
||||
|
||||
Simple English pluralization
|
||||
|
||||
```go
|
||||
english.PluralWord(1, "object", "") // object
|
||||
english.PluralWord(42, "object", "") // objects
|
||||
english.PluralWord(2, "bus", "") // buses
|
||||
english.PluralWord(99, "locus", "loci") // loci
|
||||
|
||||
english.Plural(1, "object", "") // 1 object
|
||||
english.Plural(42, "object", "") // 42 objects
|
||||
english.Plural(2, "bus", "") // 2 buses
|
||||
english.Plural(99, "locus", "loci") // 99 loci
|
||||
```
|
||||
|
||||
### Word series
|
||||
|
||||
Format comma-separated words lists with conjuctions:
|
||||
|
||||
```go
|
||||
english.WordSeries([]string{"foo"}, "and") // foo
|
||||
english.WordSeries([]string{"foo", "bar"}, "and") // foo and bar
|
||||
english.WordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar and baz
|
||||
|
||||
english.OxfordWordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar, and baz
|
||||
```
|
||||
|
||||
[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion
|
||||
[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package humanize
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
)
|
||||
|
||||
// order of magnitude (to a max order)
|
||||
func oomm(n, b *big.Int, maxmag int) (float64, int) {
|
||||
mag := 0
|
||||
m := &big.Int{}
|
||||
for n.Cmp(b) >= 0 {
|
||||
n.DivMod(n, b, m)
|
||||
mag++
|
||||
if mag == maxmag && maxmag >= 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag
|
||||
}
|
||||
|
||||
// total order of magnitude
|
||||
// (same as above, but with no upper limit)
|
||||
func oom(n, b *big.Int) (float64, int) {
|
||||
mag := 0
|
||||
m := &big.Int{}
|
||||
for n.Cmp(b) >= 0 {
|
||||
n.DivMod(n, b, m)
|
||||
mag++
|
||||
}
|
||||
return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag
|
||||
}
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
package humanize
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
var (
|
||||
bigIECExp = big.NewInt(1024)
|
||||
|
||||
// BigByte is one byte in bit.Ints
|
||||
BigByte = big.NewInt(1)
|
||||
// BigKiByte is 1,024 bytes in bit.Ints
|
||||
BigKiByte = (&big.Int{}).Mul(BigByte, bigIECExp)
|
||||
// BigMiByte is 1,024 k bytes in bit.Ints
|
||||
BigMiByte = (&big.Int{}).Mul(BigKiByte, bigIECExp)
|
||||
// BigGiByte is 1,024 m bytes in bit.Ints
|
||||
BigGiByte = (&big.Int{}).Mul(BigMiByte, bigIECExp)
|
||||
// BigTiByte is 1,024 g bytes in bit.Ints
|
||||
BigTiByte = (&big.Int{}).Mul(BigGiByte, bigIECExp)
|
||||
// BigPiByte is 1,024 t bytes in bit.Ints
|
||||
BigPiByte = (&big.Int{}).Mul(BigTiByte, bigIECExp)
|
||||
// BigEiByte is 1,024 p bytes in bit.Ints
|
||||
BigEiByte = (&big.Int{}).Mul(BigPiByte, bigIECExp)
|
||||
// BigZiByte is 1,024 e bytes in bit.Ints
|
||||
BigZiByte = (&big.Int{}).Mul(BigEiByte, bigIECExp)
|
||||
// BigYiByte is 1,024 z bytes in bit.Ints
|
||||
BigYiByte = (&big.Int{}).Mul(BigZiByte, bigIECExp)
|
||||
)
|
||||
|
||||
var (
|
||||
bigSIExp = big.NewInt(1000)
|
||||
|
||||
// BigSIByte is one SI byte in big.Ints
|
||||
BigSIByte = big.NewInt(1)
|
||||
// BigKByte is 1,000 SI bytes in big.Ints
|
||||
BigKByte = (&big.Int{}).Mul(BigSIByte, bigSIExp)
|
||||
// BigMByte is 1,000 SI k bytes in big.Ints
|
||||
BigMByte = (&big.Int{}).Mul(BigKByte, bigSIExp)
|
||||
// BigGByte is 1,000 SI m bytes in big.Ints
|
||||
BigGByte = (&big.Int{}).Mul(BigMByte, bigSIExp)
|
||||
// BigTByte is 1,000 SI g bytes in big.Ints
|
||||
BigTByte = (&big.Int{}).Mul(BigGByte, bigSIExp)
|
||||
// BigPByte is 1,000 SI t bytes in big.Ints
|
||||
BigPByte = (&big.Int{}).Mul(BigTByte, bigSIExp)
|
||||
// BigEByte is 1,000 SI p bytes in big.Ints
|
||||
BigEByte = (&big.Int{}).Mul(BigPByte, bigSIExp)
|
||||
// BigZByte is 1,000 SI e bytes in big.Ints
|
||||
BigZByte = (&big.Int{}).Mul(BigEByte, bigSIExp)
|
||||
// BigYByte is 1,000 SI z bytes in big.Ints
|
||||
BigYByte = (&big.Int{}).Mul(BigZByte, bigSIExp)
|
||||
)
|
||||
|
||||
var bigBytesSizeTable = map[string]*big.Int{
|
||||
"b": BigByte,
|
||||
"kib": BigKiByte,
|
||||
"kb": BigKByte,
|
||||
"mib": BigMiByte,
|
||||
"mb": BigMByte,
|
||||
"gib": BigGiByte,
|
||||
"gb": BigGByte,
|
||||
"tib": BigTiByte,
|
||||
"tb": BigTByte,
|
||||
"pib": BigPiByte,
|
||||
"pb": BigPByte,
|
||||
"eib": BigEiByte,
|
||||
"eb": BigEByte,
|
||||
"zib": BigZiByte,
|
||||
"zb": BigZByte,
|
||||
"yib": BigYiByte,
|
||||
"yb": BigYByte,
|
||||
// Without suffix
|
||||
"": BigByte,
|
||||
"ki": BigKiByte,
|
||||
"k": BigKByte,
|
||||
"mi": BigMiByte,
|
||||
"m": BigMByte,
|
||||
"gi": BigGiByte,
|
||||
"g": BigGByte,
|
||||
"ti": BigTiByte,
|
||||
"t": BigTByte,
|
||||
"pi": BigPiByte,
|
||||
"p": BigPByte,
|
||||
"ei": BigEiByte,
|
||||
"e": BigEByte,
|
||||
"z": BigZByte,
|
||||
"zi": BigZiByte,
|
||||
"y": BigYByte,
|
||||
"yi": BigYiByte,
|
||||
}
|
||||
|
||||
var ten = big.NewInt(10)
|
||||
|
||||
func humanateBigBytes(s, base *big.Int, sizes []string) string {
|
||||
if s.Cmp(ten) < 0 {
|
||||
return fmt.Sprintf("%d B", s)
|
||||
}
|
||||
c := (&big.Int{}).Set(s)
|
||||
val, mag := oomm(c, base, len(sizes)-1)
|
||||
suffix := sizes[mag]
|
||||
f := "%.0f %s"
|
||||
if val < 10 {
|
||||
f = "%.1f %s"
|
||||
}
|
||||
|
||||
return fmt.Sprintf(f, val, suffix)
|
||||
|
||||
}
|
||||
|
||||
// BigBytes produces a human readable representation of an SI size.
|
||||
//
|
||||
// See also: ParseBigBytes.
|
||||
//
|
||||
// BigBytes(82854982) -> 83 MB
|
||||
func BigBytes(s *big.Int) string {
|
||||
sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}
|
||||
return humanateBigBytes(s, bigSIExp, sizes)
|
||||
}
|
||||
|
||||
// BigIBytes produces a human readable representation of an IEC size.
|
||||
//
|
||||
// See also: ParseBigBytes.
|
||||
//
|
||||
// BigIBytes(82854982) -> 79 MiB
|
||||
func BigIBytes(s *big.Int) string {
|
||||
sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"}
|
||||
return humanateBigBytes(s, bigIECExp, sizes)
|
||||
}
|
||||
|
||||
// ParseBigBytes parses a string representation of bytes into the number
|
||||
// of bytes it represents.
|
||||
//
|
||||
// See also: BigBytes, BigIBytes.
|
||||
//
|
||||
// ParseBigBytes("42 MB") -> 42000000, nil
|
||||
// ParseBigBytes("42 mib") -> 44040192, nil
|
||||
func ParseBigBytes(s string) (*big.Int, error) {
|
||||
lastDigit := 0
|
||||
hasComma := false
|
||||
for _, r := range s {
|
||||
if !(unicode.IsDigit(r) || r == '.' || r == ',') {
|
||||
break
|
||||
}
|
||||
if r == ',' {
|
||||
hasComma = true
|
||||
}
|
||||
lastDigit++
|
||||
}
|
||||
|
||||
num := s[:lastDigit]
|
||||
if hasComma {
|
||||
num = strings.Replace(num, ",", "", -1)
|
||||
}
|
||||
|
||||
val := &big.Rat{}
|
||||
_, err := fmt.Sscanf(num, "%f", val)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
extra := strings.ToLower(strings.TrimSpace(s[lastDigit:]))
|
||||
if m, ok := bigBytesSizeTable[extra]; ok {
|
||||
mv := (&big.Rat{}).SetInt(m)
|
||||
val.Mul(val, mv)
|
||||
rv := &big.Int{}
|
||||
rv.Div(val.Num(), val.Denom())
|
||||
return rv, nil
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("unhandled size name: %v", extra)
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
package humanize
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
// IEC Sizes.
|
||||
// kibis of bits
|
||||
const (
|
||||
Byte = 1 << (iota * 10)
|
||||
KiByte
|
||||
MiByte
|
||||
GiByte
|
||||
TiByte
|
||||
PiByte
|
||||
EiByte
|
||||
)
|
||||
|
||||
// SI Sizes.
|
||||
const (
|
||||
IByte = 1
|
||||
KByte = IByte * 1000
|
||||
MByte = KByte * 1000
|
||||
GByte = MByte * 1000
|
||||
TByte = GByte * 1000
|
||||
PByte = TByte * 1000
|
||||
EByte = PByte * 1000
|
||||
)
|
||||
|
||||
var bytesSizeTable = map[string]uint64{
|
||||
"b": Byte,
|
||||
"kib": KiByte,
|
||||
"kb": KByte,
|
||||
"mib": MiByte,
|
||||
"mb": MByte,
|
||||
"gib": GiByte,
|
||||
"gb": GByte,
|
||||
"tib": TiByte,
|
||||
"tb": TByte,
|
||||
"pib": PiByte,
|
||||
"pb": PByte,
|
||||
"eib": EiByte,
|
||||
"eb": EByte,
|
||||
// Without suffix
|
||||
"": Byte,
|
||||
"ki": KiByte,
|
||||
"k": KByte,
|
||||
"mi": MiByte,
|
||||
"m": MByte,
|
||||
"gi": GiByte,
|
||||
"g": GByte,
|
||||
"ti": TiByte,
|
||||
"t": TByte,
|
||||
"pi": PiByte,
|
||||
"p": PByte,
|
||||
"ei": EiByte,
|
||||
"e": EByte,
|
||||
}
|
||||
|
||||
func logn(n, b float64) float64 {
|
||||
return math.Log(n) / math.Log(b)
|
||||
}
|
||||
|
||||
func humanateBytes(s uint64, base float64, sizes []string) string {
|
||||
if s < 10 {
|
||||
return fmt.Sprintf("%d B", s)
|
||||
}
|
||||
e := math.Floor(logn(float64(s), base))
|
||||
suffix := sizes[int(e)]
|
||||
val := math.Floor(float64(s)/math.Pow(base, e)*10+0.5) / 10
|
||||
f := "%.0f %s"
|
||||
if val < 10 {
|
||||
f = "%.1f %s"
|
||||
}
|
||||
|
||||
return fmt.Sprintf(f, val, suffix)
|
||||
}
|
||||
|
||||
// Bytes produces a human readable representation of an SI size.
|
||||
//
|
||||
// See also: ParseBytes.
|
||||
//
|
||||
// Bytes(82854982) -> 83 MB
|
||||
func Bytes(s uint64) string {
|
||||
sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"}
|
||||
return humanateBytes(s, 1000, sizes)
|
||||
}
|
||||
|
||||
// IBytes produces a human readable representation of an IEC size.
|
||||
//
|
||||
// See also: ParseBytes.
|
||||
//
|
||||
// IBytes(82854982) -> 79 MiB
|
||||
func IBytes(s uint64) string {
|
||||
sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"}
|
||||
return humanateBytes(s, 1024, sizes)
|
||||
}
|
||||
|
||||
// ParseBytes parses a string representation of bytes into the number
|
||||
// of bytes it represents.
|
||||
//
|
||||
// See Also: Bytes, IBytes.
|
||||
//
|
||||
// ParseBytes("42 MB") -> 42000000, nil
|
||||
// ParseBytes("42 mib") -> 44040192, nil
|
||||
func ParseBytes(s string) (uint64, error) {
|
||||
lastDigit := 0
|
||||
hasComma := false
|
||||
for _, r := range s {
|
||||
if !(unicode.IsDigit(r) || r == '.' || r == ',') {
|
||||
break
|
||||
}
|
||||
if r == ',' {
|
||||
hasComma = true
|
||||
}
|
||||
lastDigit++
|
||||
}
|
||||
|
||||
num := s[:lastDigit]
|
||||
if hasComma {
|
||||
num = strings.Replace(num, ",", "", -1)
|
||||
}
|
||||
|
||||
f, err := strconv.ParseFloat(num, 64)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
extra := strings.ToLower(strings.TrimSpace(s[lastDigit:]))
|
||||
if m, ok := bytesSizeTable[extra]; ok {
|
||||
f *= float64(m)
|
||||
if f >= math.MaxUint64 {
|
||||
return 0, fmt.Errorf("too large: %v", s)
|
||||
}
|
||||
return uint64(f), nil
|
||||
}
|
||||
|
||||
return 0, fmt.Errorf("unhandled size name: %v", extra)
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
package humanize
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"math"
|
||||
"math/big"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Comma produces a string form of the given number in base 10 with
|
||||
// commas after every three orders of magnitude.
|
||||
//
|
||||
// e.g. Comma(834142) -> 834,142
|
||||
func Comma(v int64) string {
|
||||
sign := ""
|
||||
|
||||
// Min int64 can't be negated to a usable value, so it has to be special cased.
|
||||
if v == math.MinInt64 {
|
||||
return "-9,223,372,036,854,775,808"
|
||||
}
|
||||
|
||||
if v < 0 {
|
||||
sign = "-"
|
||||
v = 0 - v
|
||||
}
|
||||
|
||||
parts := []string{"", "", "", "", "", "", ""}
|
||||
j := len(parts) - 1
|
||||
|
||||
for v > 999 {
|
||||
parts[j] = strconv.FormatInt(v%1000, 10)
|
||||
switch len(parts[j]) {
|
||||
case 2:
|
||||
parts[j] = "0" + parts[j]
|
||||
case 1:
|
||||
parts[j] = "00" + parts[j]
|
||||
}
|
||||
v = v / 1000
|
||||
j--
|
||||
}
|
||||
parts[j] = strconv.Itoa(int(v))
|
||||
return sign + strings.Join(parts[j:], ",")
|
||||
}
|
||||
|
||||
// Commaf produces a string form of the given number in base 10 with
|
||||
// commas after every three orders of magnitude.
|
||||
//
|
||||
// e.g. Commaf(834142.32) -> 834,142.32
|
||||
func Commaf(v float64) string {
|
||||
buf := &bytes.Buffer{}
|
||||
if v < 0 {
|
||||
buf.Write([]byte{'-'})
|
||||
v = 0 - v
|
||||
}
|
||||
|
||||
comma := []byte{','}
|
||||
|
||||
parts := strings.Split(strconv.FormatFloat(v, 'f', -1, 64), ".")
|
||||
pos := 0
|
||||
if len(parts[0])%3 != 0 {
|
||||
pos += len(parts[0]) % 3
|
||||
buf.WriteString(parts[0][:pos])
|
||||
buf.Write(comma)
|
||||
}
|
||||
for ; pos < len(parts[0]); pos += 3 {
|
||||
buf.WriteString(parts[0][pos : pos+3])
|
||||
buf.Write(comma)
|
||||
}
|
||||
buf.Truncate(buf.Len() - 1)
|
||||
|
||||
if len(parts) > 1 {
|
||||
buf.Write([]byte{'.'})
|
||||
buf.WriteString(parts[1])
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
// CommafWithDigits works like the Commaf but limits the resulting
|
||||
// string to the given number of decimal places.
|
||||
//
|
||||
// e.g. CommafWithDigits(834142.32, 1) -> 834,142.3
|
||||
func CommafWithDigits(f float64, decimals int) string {
|
||||
return stripTrailingDigits(Commaf(f), decimals)
|
||||
}
|
||||
|
||||
// BigComma produces a string form of the given big.Int in base 10
|
||||
// with commas after every three orders of magnitude.
|
||||
func BigComma(b *big.Int) string {
|
||||
sign := ""
|
||||
if b.Sign() < 0 {
|
||||
sign = "-"
|
||||
b.Abs(b)
|
||||
}
|
||||
|
||||
athousand := big.NewInt(1000)
|
||||
c := (&big.Int{}).Set(b)
|
||||
_, m := oom(c, athousand)
|
||||
parts := make([]string, m+1)
|
||||
j := len(parts) - 1
|
||||
|
||||
mod := &big.Int{}
|
||||
for b.Cmp(athousand) >= 0 {
|
||||
b.DivMod(b, athousand, mod)
|
||||
parts[j] = strconv.FormatInt(mod.Int64(), 10)
|
||||
switch len(parts[j]) {
|
||||
case 2:
|
||||
parts[j] = "0" + parts[j]
|
||||
case 1:
|
||||
parts[j] = "00" + parts[j]
|
||||
}
|
||||
j--
|
||||
}
|
||||
parts[j] = strconv.Itoa(int(b.Int64()))
|
||||
return sign + strings.Join(parts[j:], ",")
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
// +build go1.6
|
||||
|
||||
package humanize
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"math/big"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// BigCommaf produces a string form of the given big.Float in base 10
|
||||
// with commas after every three orders of magnitude.
|
||||
func BigCommaf(v *big.Float) string {
|
||||
buf := &bytes.Buffer{}
|
||||
if v.Sign() < 0 {
|
||||
buf.Write([]byte{'-'})
|
||||
v.Abs(v)
|
||||
}
|
||||
|
||||
comma := []byte{','}
|
||||
|
||||
parts := strings.Split(v.Text('f', -1), ".")
|
||||
pos := 0
|
||||
if len(parts[0])%3 != 0 {
|
||||
pos += len(parts[0]) % 3
|
||||
buf.WriteString(parts[0][:pos])
|
||||
buf.Write(comma)
|
||||
}
|
||||
for ; pos < len(parts[0]); pos += 3 {
|
||||
buf.WriteString(parts[0][pos : pos+3])
|
||||
buf.Write(comma)
|
||||
}
|
||||
buf.Truncate(buf.Len() - 1)
|
||||
|
||||
if len(parts) > 1 {
|
||||
buf.Write([]byte{'.'})
|
||||
buf.WriteString(parts[1])
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package humanize
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func stripTrailingZeros(s string) string {
|
||||
offset := len(s) - 1
|
||||
for offset > 0 {
|
||||
if s[offset] == '.' {
|
||||
offset--
|
||||
break
|
||||
}
|
||||
if s[offset] != '0' {
|
||||
break
|
||||
}
|
||||
offset--
|
||||
}
|
||||
return s[:offset+1]
|
||||
}
|
||||
|
||||
func stripTrailingDigits(s string, digits int) string {
|
||||
if i := strings.Index(s, "."); i >= 0 {
|
||||
if digits <= 0 {
|
||||
return s[:i]
|
||||
}
|
||||
i++
|
||||
if i+digits >= len(s) {
|
||||
return s
|
||||
}
|
||||
return s[:i+digits]
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
// Ftoa converts a float to a string with no trailing zeros.
|
||||
func Ftoa(num float64) string {
|
||||
return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64))
|
||||
}
|
||||
|
||||
// FtoaWithDigits converts a float to a string but limits the resulting string
|
||||
// to the given number of decimal places, and no trailing zeros.
|
||||
func FtoaWithDigits(num float64, digits int) string {
|
||||
return stripTrailingZeros(stripTrailingDigits(strconv.FormatFloat(num, 'f', 6, 64), digits))
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
Package humanize converts boring ugly numbers to human-friendly strings and back.
|
||||
|
||||
Durations can be turned into strings such as "3 days ago", numbers
|
||||
representing sizes like 82854982 into useful strings like, "83 MB" or
|
||||
"79 MiB" (whichever you prefer).
|
||||
*/
|
||||
package humanize
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
package humanize
|
||||
|
||||
/*
|
||||
Slightly adapted from the source to fit go-humanize.
|
||||
|
||||
Author: https://github.com/gorhill
|
||||
Source: https://gist.github.com/gorhill/5285193
|
||||
|
||||
*/
|
||||
|
||||
import (
|
||||
"math"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
var (
|
||||
renderFloatPrecisionMultipliers = [...]float64{
|
||||
1,
|
||||
10,
|
||||
100,
|
||||
1000,
|
||||
10000,
|
||||
100000,
|
||||
1000000,
|
||||
10000000,
|
||||
100000000,
|
||||
1000000000,
|
||||
}
|
||||
|
||||
renderFloatPrecisionRounders = [...]float64{
|
||||
0.5,
|
||||
0.05,
|
||||
0.005,
|
||||
0.0005,
|
||||
0.00005,
|
||||
0.000005,
|
||||
0.0000005,
|
||||
0.00000005,
|
||||
0.000000005,
|
||||
0.0000000005,
|
||||
}
|
||||
)
|
||||
|
||||
// FormatFloat produces a formatted number as string based on the following user-specified criteria:
|
||||
// * thousands separator
|
||||
// * decimal separator
|
||||
// * decimal precision
|
||||
//
|
||||
// Usage: s := RenderFloat(format, n)
|
||||
// The format parameter tells how to render the number n.
|
||||
//
|
||||
// See examples: http://play.golang.org/p/LXc1Ddm1lJ
|
||||
//
|
||||
// Examples of format strings, given n = 12345.6789:
|
||||
// "#,###.##" => "12,345.67"
|
||||
// "#,###." => "12,345"
|
||||
// "#,###" => "12345,678"
|
||||
// "#\u202F###,##" => "12 345,68"
|
||||
// "#.###,###### => 12.345,678900
|
||||
// "" (aka default format) => 12,345.67
|
||||
//
|
||||
// The highest precision allowed is 9 digits after the decimal symbol.
|
||||
// There is also a version for integer number, FormatInteger(),
|
||||
// which is convenient for calls within template.
|
||||
func FormatFloat(format string, n float64) string {
|
||||
// Special cases:
|
||||
// NaN = "NaN"
|
||||
// +Inf = "+Infinity"
|
||||
// -Inf = "-Infinity"
|
||||
if math.IsNaN(n) {
|
||||
return "NaN"
|
||||
}
|
||||
if n > math.MaxFloat64 {
|
||||
return "Infinity"
|
||||
}
|
||||
if n < -math.MaxFloat64 {
|
||||
return "-Infinity"
|
||||
}
|
||||
|
||||
// default format
|
||||
precision := 2
|
||||
decimalStr := "."
|
||||
thousandStr := ","
|
||||
positiveStr := ""
|
||||
negativeStr := "-"
|
||||
|
||||
if len(format) > 0 {
|
||||
format := []rune(format)
|
||||
|
||||
// If there is an explicit format directive,
|
||||
// then default values are these:
|
||||
precision = 9
|
||||
thousandStr = ""
|
||||
|
||||
// collect indices of meaningful formatting directives
|
||||
formatIndx := []int{}
|
||||
for i, char := range format {
|
||||
if char != '#' && char != '0' {
|
||||
formatIndx = append(formatIndx, i)
|
||||
}
|
||||
}
|
||||
|
||||
if len(formatIndx) > 0 {
|
||||
// Directive at index 0:
|
||||
// Must be a '+'
|
||||
// Raise an error if not the case
|
||||
// index: 0123456789
|
||||
// +0.000,000
|
||||
// +000,000.0
|
||||
// +0000.00
|
||||
// +0000
|
||||
if formatIndx[0] == 0 {
|
||||
if format[formatIndx[0]] != '+' {
|
||||
panic("RenderFloat(): invalid positive sign directive")
|
||||
}
|
||||
positiveStr = "+"
|
||||
formatIndx = formatIndx[1:]
|
||||
}
|
||||
|
||||
// Two directives:
|
||||
// First is thousands separator
|
||||
// Raise an error if not followed by 3-digit
|
||||
// 0123456789
|
||||
// 0.000,000
|
||||
// 000,000.00
|
||||
if len(formatIndx) == 2 {
|
||||
if (formatIndx[1] - formatIndx[0]) != 4 {
|
||||
panic("RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers")
|
||||
}
|
||||
thousandStr = string(format[formatIndx[0]])
|
||||
formatIndx = formatIndx[1:]
|
||||
}
|
||||
|
||||
// One directive:
|
||||
// Directive is decimal separator
|
||||
// The number of digit-specifier following the separator indicates wanted precision
|
||||
// 0123456789
|
||||
// 0.00
|
||||
// 000,0000
|
||||
if len(formatIndx) == 1 {
|
||||
decimalStr = string(format[formatIndx[0]])
|
||||
precision = len(format) - formatIndx[0] - 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// generate sign part
|
||||
var signStr string
|
||||
if n >= 0.000000001 {
|
||||
signStr = positiveStr
|
||||
} else if n <= -0.000000001 {
|
||||
signStr = negativeStr
|
||||
n = -n
|
||||
} else {
|
||||
signStr = ""
|
||||
n = 0.0
|
||||
}
|
||||
|
||||
// split number into integer and fractional parts
|
||||
intf, fracf := math.Modf(n + renderFloatPrecisionRounders[precision])
|
||||
|
||||
// generate integer part string
|
||||
intStr := strconv.FormatInt(int64(intf), 10)
|
||||
|
||||
// add thousand separator if required
|
||||
if len(thousandStr) > 0 {
|
||||
for i := len(intStr); i > 3; {
|
||||
i -= 3
|
||||
intStr = intStr[:i] + thousandStr + intStr[i:]
|
||||
}
|
||||
}
|
||||
|
||||
// no fractional part, we can leave now
|
||||
if precision == 0 {
|
||||
return signStr + intStr
|
||||
}
|
||||
|
||||
// generate fractional part
|
||||
fracStr := strconv.Itoa(int(fracf * renderFloatPrecisionMultipliers[precision]))
|
||||
// may need padding
|
||||
if len(fracStr) < precision {
|
||||
fracStr = "000000000000000"[:precision-len(fracStr)] + fracStr
|
||||
}
|
||||
|
||||
return signStr + intStr + decimalStr + fracStr
|
||||
}
|
||||
|
||||
// FormatInteger produces a formatted number as string.
|
||||
// See FormatFloat.
|
||||
func FormatInteger(format string, n int) string {
|
||||
return FormatFloat(format, float64(n))
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package humanize
|
||||
|
||||
import "strconv"
|
||||
|
||||
// Ordinal gives you the input number in a rank/ordinal format.
|
||||
//
|
||||
// Ordinal(3) -> 3rd
|
||||
func Ordinal(x int) string {
|
||||
suffix := "th"
|
||||
switch x % 10 {
|
||||
case 1:
|
||||
if x%100 != 11 {
|
||||
suffix = "st"
|
||||
}
|
||||
case 2:
|
||||
if x%100 != 12 {
|
||||
suffix = "nd"
|
||||
}
|
||||
case 3:
|
||||
if x%100 != 13 {
|
||||
suffix = "rd"
|
||||
}
|
||||
}
|
||||
return strconv.Itoa(x) + suffix
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
package humanize
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"math"
|
||||
"regexp"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
var siPrefixTable = map[float64]string{
|
||||
-24: "y", // yocto
|
||||
-21: "z", // zepto
|
||||
-18: "a", // atto
|
||||
-15: "f", // femto
|
||||
-12: "p", // pico
|
||||
-9: "n", // nano
|
||||
-6: "µ", // micro
|
||||
-3: "m", // milli
|
||||
0: "",
|
||||
3: "k", // kilo
|
||||
6: "M", // mega
|
||||
9: "G", // giga
|
||||
12: "T", // tera
|
||||
15: "P", // peta
|
||||
18: "E", // exa
|
||||
21: "Z", // zetta
|
||||
24: "Y", // yotta
|
||||
}
|
||||
|
||||
var revSIPrefixTable = revfmap(siPrefixTable)
|
||||
|
||||
// revfmap reverses the map and precomputes the power multiplier
|
||||
func revfmap(in map[float64]string) map[string]float64 {
|
||||
rv := map[string]float64{}
|
||||
for k, v := range in {
|
||||
rv[v] = math.Pow(10, k)
|
||||
}
|
||||
return rv
|
||||
}
|
||||
|
||||
var riParseRegex *regexp.Regexp
|
||||
|
||||
func init() {
|
||||
ri := `^([\-0-9.]+)\s?([`
|
||||
for _, v := range siPrefixTable {
|
||||
ri += v
|
||||
}
|
||||
ri += `]?)(.*)`
|
||||
|
||||
riParseRegex = regexp.MustCompile(ri)
|
||||
}
|
||||
|
||||
// ComputeSI finds the most appropriate SI prefix for the given number
|
||||
// and returns the prefix along with the value adjusted to be within
|
||||
// that prefix.
|
||||
//
|
||||
// See also: SI, ParseSI.
|
||||
//
|
||||
// e.g. ComputeSI(2.2345e-12) -> (2.2345, "p")
|
||||
func ComputeSI(input float64) (float64, string) {
|
||||
if input == 0 {
|
||||
return 0, ""
|
||||
}
|
||||
mag := math.Abs(input)
|
||||
exponent := math.Floor(logn(mag, 10))
|
||||
exponent = math.Floor(exponent/3) * 3
|
||||
|
||||
value := mag / math.Pow(10, exponent)
|
||||
|
||||
// Handle special case where value is exactly 1000.0
|
||||
// Should return 1 M instead of 1000 k
|
||||
if value == 1000.0 {
|
||||
exponent += 3
|
||||
value = mag / math.Pow(10, exponent)
|
||||
}
|
||||
|
||||
value = math.Copysign(value, input)
|
||||
|
||||
prefix := siPrefixTable[exponent]
|
||||
return value, prefix
|
||||
}
|
||||
|
||||
// SI returns a string with default formatting.
|
||||
//
|
||||
// SI uses Ftoa to format float value, removing trailing zeros.
|
||||
//
|
||||
// See also: ComputeSI, ParseSI.
|
||||
//
|
||||
// e.g. SI(1000000, "B") -> 1 MB
|
||||
// e.g. SI(2.2345e-12, "F") -> 2.2345 pF
|
||||
func SI(input float64, unit string) string {
|
||||
value, prefix := ComputeSI(input)
|
||||
return Ftoa(value) + " " + prefix + unit
|
||||
}
|
||||
|
||||
// SIWithDigits works like SI but limits the resulting string to the
|
||||
// given number of decimal places.
|
||||
//
|
||||
// e.g. SIWithDigits(1000000, 0, "B") -> 1 MB
|
||||
// e.g. SIWithDigits(2.2345e-12, 2, "F") -> 2.23 pF
|
||||
func SIWithDigits(input float64, decimals int, unit string) string {
|
||||
value, prefix := ComputeSI(input)
|
||||
return FtoaWithDigits(value, decimals) + " " + prefix + unit
|
||||
}
|
||||
|
||||
var errInvalid = errors.New("invalid input")
|
||||
|
||||
// ParseSI parses an SI string back into the number and unit.
|
||||
//
|
||||
// See also: SI, ComputeSI.
|
||||
//
|
||||
// e.g. ParseSI("2.2345 pF") -> (2.2345e-12, "F", nil)
|
||||
func ParseSI(input string) (float64, string, error) {
|
||||
found := riParseRegex.FindStringSubmatch(input)
|
||||
if len(found) != 4 {
|
||||
return 0, "", errInvalid
|
||||
}
|
||||
mag := revSIPrefixTable[found[2]]
|
||||
unit := found[3]
|
||||
|
||||
base, err := strconv.ParseFloat(found[1], 64)
|
||||
return base * mag, unit, err
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
package humanize
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"sort"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Seconds-based time units
|
||||
const (
|
||||
Day = 24 * time.Hour
|
||||
Week = 7 * Day
|
||||
Month = 30 * Day
|
||||
Year = 12 * Month
|
||||
LongTime = 37 * Year
|
||||
)
|
||||
|
||||
// Time formats a time into a relative string.
|
||||
//
|
||||
// Time(someT) -> "3 weeks ago"
|
||||
func Time(then time.Time) string {
|
||||
return RelTime(then, time.Now(), "ago", "from now")
|
||||
}
|
||||
|
||||
// A RelTimeMagnitude struct contains a relative time point at which
|
||||
// the relative format of time will switch to a new format string. A
|
||||
// slice of these in ascending order by their "D" field is passed to
|
||||
// CustomRelTime to format durations.
|
||||
//
|
||||
// The Format field is a string that may contain a "%s" which will be
|
||||
// replaced with the appropriate signed label (e.g. "ago" or "from
|
||||
// now") and a "%d" that will be replaced by the quantity.
|
||||
//
|
||||
// The DivBy field is the amount of time the time difference must be
|
||||
// divided by in order to display correctly.
|
||||
//
|
||||
// e.g. if D is 2*time.Minute and you want to display "%d minutes %s"
|
||||
// DivBy should be time.Minute so whatever the duration is will be
|
||||
// expressed in minutes.
|
||||
type RelTimeMagnitude struct {
|
||||
D time.Duration
|
||||
Format string
|
||||
DivBy time.Duration
|
||||
}
|
||||
|
||||
var defaultMagnitudes = []RelTimeMagnitude{
|
||||
{time.Second, "now", time.Second},
|
||||
{2 * time.Second, "1 second %s", 1},
|
||||
{time.Minute, "%d seconds %s", time.Second},
|
||||
{2 * time.Minute, "1 minute %s", 1},
|
||||
{time.Hour, "%d minutes %s", time.Minute},
|
||||
{2 * time.Hour, "1 hour %s", 1},
|
||||
{Day, "%d hours %s", time.Hour},
|
||||
{2 * Day, "1 day %s", 1},
|
||||
{Week, "%d days %s", Day},
|
||||
{2 * Week, "1 week %s", 1},
|
||||
{Month, "%d weeks %s", Week},
|
||||
{2 * Month, "1 month %s", 1},
|
||||
{Year, "%d months %s", Month},
|
||||
{18 * Month, "1 year %s", 1},
|
||||
{2 * Year, "2 years %s", 1},
|
||||
{LongTime, "%d years %s", Year},
|
||||
{math.MaxInt64, "a long while %s", 1},
|
||||
}
|
||||
|
||||
// RelTime formats a time into a relative string.
|
||||
//
|
||||
// It takes two times and two labels. In addition to the generic time
|
||||
// delta string (e.g. 5 minutes), the labels are used applied so that
|
||||
// the label corresponding to the smaller time is applied.
|
||||
//
|
||||
// RelTime(timeInPast, timeInFuture, "earlier", "later") -> "3 weeks earlier"
|
||||
func RelTime(a, b time.Time, albl, blbl string) string {
|
||||
return CustomRelTime(a, b, albl, blbl, defaultMagnitudes)
|
||||
}
|
||||
|
||||
// CustomRelTime formats a time into a relative string.
|
||||
//
|
||||
// It takes two times two labels and a table of relative time formats.
|
||||
// In addition to the generic time delta string (e.g. 5 minutes), the
|
||||
// labels are used applied so that the label corresponding to the
|
||||
// smaller time is applied.
|
||||
func CustomRelTime(a, b time.Time, albl, blbl string, magnitudes []RelTimeMagnitude) string {
|
||||
lbl := albl
|
||||
diff := b.Sub(a)
|
||||
|
||||
if a.After(b) {
|
||||
lbl = blbl
|
||||
diff = a.Sub(b)
|
||||
}
|
||||
|
||||
n := sort.Search(len(magnitudes), func(i int) bool {
|
||||
return magnitudes[i].D > diff
|
||||
})
|
||||
|
||||
if n >= len(magnitudes) {
|
||||
n = len(magnitudes) - 1
|
||||
}
|
||||
mag := magnitudes[n]
|
||||
args := []interface{}{}
|
||||
escaped := false
|
||||
for _, ch := range mag.Format {
|
||||
if escaped {
|
||||
switch ch {
|
||||
case 's':
|
||||
args = append(args, lbl)
|
||||
case 'd':
|
||||
args = append(args, diff/mag.DivBy)
|
||||
}
|
||||
escaped = false
|
||||
} else {
|
||||
escaped = ch == '%'
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf(mag.Format, args...)
|
||||
}
|
||||
+2
@@ -23,3 +23,5 @@ _testmain.go
|
||||
|
||||
.envrc
|
||||
/.testdb
|
||||
|
||||
.DS_Store
|
||||
+24
@@ -1,3 +1,27 @@
|
||||
# 5.3.0 (February 11, 2023)
|
||||
|
||||
* Fix: json values work with sql.Scanner
|
||||
* Fixed / improved error messages (Mark Chambers and Yevgeny Pats)
|
||||
* Fix: support scan into single dimensional arrays
|
||||
* Fix: MaxConnLifetimeJitter setting actually jitter (Ben Weintraub)
|
||||
* Fix: driver.Value representation of bytea should be []byte not string
|
||||
* Fix: better handling of unregistered OIDs
|
||||
* CopyFrom can use query cache to avoid extra round trip to get OIDs (Alejandro Do Nascimento Mora)
|
||||
* Fix: encode to json ignoring driver.Valuer
|
||||
* Support sql.Scanner on renamed base type
|
||||
* Fix: pgtype.Numeric text encoding of negative numbers (Mark Chambers)
|
||||
* Fix: connect with multiple hostnames when one can't be resolved
|
||||
* Upgrade puddle to remove dependency on uber/atomic and fix alignment issue on 32-bit platform
|
||||
* Fix: scanning json column into **string
|
||||
* Multiple reductions in memory allocations
|
||||
* Fake non-blocking read adapts its max wait time
|
||||
* Improve CopyFrom performance and reduce memory usage
|
||||
* Fix: encode []any to array
|
||||
* Fix: LoadType for composite with dropped attributes (Felix Röhrich)
|
||||
* Support v4 and v5 stdlib in same program
|
||||
* Fix: text format array decoding with string of "NULL"
|
||||
* Prefer binary format for arrays
|
||||
|
||||
# 5.2.0 (December 5, 2022)
|
||||
|
||||
* `tracelog.TraceLog` implements the pgx.PrepareTracer interface. (Vitalii Solodilov)
|
||||
|
||||
+10
-1
@@ -88,7 +88,7 @@ See CONTRIBUTING.md for setup instructions.
|
||||
|
||||
## Supported Go and PostgreSQL Versions
|
||||
|
||||
pgx supports the same versions of Go and PostgreSQL that are supported by their respective teams. For [Go](https://golang.org/doc/devel/release.html#policy) that is the two most recent major releases and for [PostgreSQL](https://www.postgresql.org/support/versioning/) the major releases in the last 5 years. This means pgx supports Go 1.18 and higher and PostgreSQL 11 and higher. pgx also is tested against the latest version of [CockroachDB](https://www.cockroachlabs.com/product/).
|
||||
pgx supports the same versions of Go and PostgreSQL that are supported by their respective teams. For [Go](https://golang.org/doc/devel/release.html#policy) that is the two most recent major releases and for [PostgreSQL](https://www.postgresql.org/support/versioning/) the major releases in the last 5 years. This means pgx supports Go 1.19 and higher and PostgreSQL 11 and higher. pgx also is tested against the latest version of [CockroachDB](https://www.cockroachlabs.com/product/).
|
||||
|
||||
## Version Policy
|
||||
|
||||
@@ -142,3 +142,12 @@ Library for scanning data from a database into Go structs and more.
|
||||
### [https://github.com/otan/gopgkrb5](https://github.com/otan/gopgkrb5)
|
||||
|
||||
Adds GSSAPI / Kerberos authentication support.
|
||||
|
||||
### [github.com/wcamarao/pmx](https://github.com/wcamarao/pmx)
|
||||
|
||||
Explicit data mapping and scanning library for Go structs and slices.
|
||||
|
||||
### [github.com/stephenafamo/scan](https://github.com/stephenafamo/scan)
|
||||
|
||||
Type safe and flexible package for scanning database data into Go types.
|
||||
Supports, structs, maps, slices and custom mapping functions.
|
||||
+58
-47
@@ -197,17 +197,17 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con
|
||||
// ParseConfig creates a ConnConfig from a connection string. ParseConfig handles all options that pgconn.ParseConfig
|
||||
// does. In addition, it accepts the following options:
|
||||
//
|
||||
// default_query_exec_mode
|
||||
// Possible values: "cache_statement", "cache_describe", "describe_exec", "exec", and "simple_protocol". See
|
||||
// QueryExecMode constant documentation for the meaning of these values. Default: "cache_statement".
|
||||
// - default_query_exec_mode.
|
||||
// Possible values: "cache_statement", "cache_describe", "describe_exec", "exec", and "simple_protocol". See
|
||||
// QueryExecMode constant documentation for the meaning of these values. Default: "cache_statement".
|
||||
//
|
||||
// statement_cache_capacity
|
||||
// The maximum size of the statement cache used when executing a query with "cache_statement" query exec mode.
|
||||
// Default: 512.
|
||||
// - statement_cache_capacity.
|
||||
// The maximum size of the statement cache used when executing a query with "cache_statement" query exec mode.
|
||||
// Default: 512.
|
||||
//
|
||||
// description_cache_capacity
|
||||
// The maximum size of the description cache used when executing a query with "cache_describe" query exec mode.
|
||||
// Default: 512.
|
||||
// - description_cache_capacity.
|
||||
// The maximum size of the description cache used when executing a query with "cache_describe" query exec mode.
|
||||
// Default: 512.
|
||||
func ParseConfig(connString string) (*ConnConfig, error) {
|
||||
return ParseConfigWithOptions(connString, ParseConfigOptions{})
|
||||
}
|
||||
@@ -721,43 +721,10 @@ optionLoop:
|
||||
sd, explicitPreparedStatement := c.preparedStatements[sql]
|
||||
if sd != nil || mode == QueryExecModeCacheStatement || mode == QueryExecModeCacheDescribe || mode == QueryExecModeDescribeExec {
|
||||
if sd == nil {
|
||||
switch mode {
|
||||
case QueryExecModeCacheStatement:
|
||||
if c.statementCache == nil {
|
||||
err = errDisabledStatementCache
|
||||
rows.fatal(err)
|
||||
return rows, err
|
||||
}
|
||||
sd = c.statementCache.Get(sql)
|
||||
if sd == nil {
|
||||
sd, err = c.Prepare(ctx, stmtcache.NextStatementName(), sql)
|
||||
if err != nil {
|
||||
rows.fatal(err)
|
||||
return rows, err
|
||||
}
|
||||
c.statementCache.Put(sd)
|
||||
}
|
||||
case QueryExecModeCacheDescribe:
|
||||
if c.descriptionCache == nil {
|
||||
err = errDisabledDescriptionCache
|
||||
rows.fatal(err)
|
||||
return rows, err
|
||||
}
|
||||
sd = c.descriptionCache.Get(sql)
|
||||
if sd == nil {
|
||||
sd, err = c.Prepare(ctx, "", sql)
|
||||
if err != nil {
|
||||
rows.fatal(err)
|
||||
return rows, err
|
||||
}
|
||||
c.descriptionCache.Put(sd)
|
||||
}
|
||||
case QueryExecModeDescribeExec:
|
||||
sd, err = c.Prepare(ctx, "", sql)
|
||||
if err != nil {
|
||||
rows.fatal(err)
|
||||
return rows, err
|
||||
}
|
||||
sd, err = c.getStatementDescription(ctx, mode, sql)
|
||||
if err != nil {
|
||||
rows.fatal(err)
|
||||
return rows, err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -827,6 +794,48 @@ optionLoop:
|
||||
return rows, rows.err
|
||||
}
|
||||
|
||||
// getStatementDescription returns the statement description of the sql query
|
||||
// according to the given mode.
|
||||
//
|
||||
// If the mode is one that doesn't require to know the param and result OIDs
|
||||
// then nil is returned without error.
|
||||
func (c *Conn) getStatementDescription(
|
||||
ctx context.Context,
|
||||
mode QueryExecMode,
|
||||
sql string,
|
||||
) (sd *pgconn.StatementDescription, err error) {
|
||||
|
||||
switch mode {
|
||||
case QueryExecModeCacheStatement:
|
||||
if c.statementCache == nil {
|
||||
return nil, errDisabledStatementCache
|
||||
}
|
||||
sd = c.statementCache.Get(sql)
|
||||
if sd == nil {
|
||||
sd, err = c.Prepare(ctx, stmtcache.NextStatementName(), sql)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.statementCache.Put(sd)
|
||||
}
|
||||
case QueryExecModeCacheDescribe:
|
||||
if c.descriptionCache == nil {
|
||||
return nil, errDisabledDescriptionCache
|
||||
}
|
||||
sd = c.descriptionCache.Get(sql)
|
||||
if sd == nil {
|
||||
sd, err = c.Prepare(ctx, "", sql)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.descriptionCache.Put(sd)
|
||||
}
|
||||
case QueryExecModeDescribeExec:
|
||||
return c.Prepare(ctx, "", sql)
|
||||
}
|
||||
return sd, err
|
||||
}
|
||||
|
||||
// QueryRow is a convenience wrapper over Query. Any error that occurs while
|
||||
// querying is deferred until calling Scan on the returned Row. That Row will
|
||||
// error with ErrNoRows if no rows are returned.
|
||||
@@ -1106,6 +1115,8 @@ func (c *Conn) sendBatchExtendedWithDescription(ctx context.Context, b *Batch, d
|
||||
for _, bi := range b.queuedQueries {
|
||||
err := c.eqb.Build(c.typeMap, bi.sd, bi.arguments)
|
||||
if err != nil {
|
||||
// we wrap the error so we the user can understand which query failed inside the batch
|
||||
err = fmt.Errorf("error building query %s: %w", bi.query, err)
|
||||
return &pipelineBatchResults{ctx: ctx, conn: c, err: err}
|
||||
}
|
||||
|
||||
@@ -1271,7 +1282,7 @@ func (c *Conn) getCompositeFields(ctx context.Context, oid uint32) ([]pgtype.Com
|
||||
var fieldOID uint32
|
||||
rows, _ := c.Query(ctx, `select attname, atttypid
|
||||
from pg_attribute
|
||||
where attrelid=$1
|
||||
where attrelid=$1 and not attisdropped
|
||||
order by attnum`,
|
||||
typrelid,
|
||||
)
|
||||
|
||||
+39
-4
@@ -85,6 +85,7 @@ type copyFrom struct {
|
||||
columnNames []string
|
||||
rowSrc CopyFromSource
|
||||
readerErrChan chan error
|
||||
mode QueryExecMode
|
||||
}
|
||||
|
||||
func (ct *copyFrom) run(ctx context.Context) (int64, error) {
|
||||
@@ -105,9 +106,29 @@ func (ct *copyFrom) run(ctx context.Context) (int64, error) {
|
||||
}
|
||||
quotedColumnNames := cbuf.String()
|
||||
|
||||
sd, err := ct.conn.Prepare(ctx, "", fmt.Sprintf("select %s from %s", quotedColumnNames, quotedTableName))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
var sd *pgconn.StatementDescription
|
||||
switch ct.mode {
|
||||
case QueryExecModeExec, QueryExecModeSimpleProtocol:
|
||||
// These modes don't support the binary format. Before the inclusion of the
|
||||
// QueryExecModes, Conn.Prepare was called on every COPY operation to get
|
||||
// the OIDs. These prepared statements were not cached.
|
||||
//
|
||||
// Since that's the same behavior provided by QueryExecModeDescribeExec,
|
||||
// we'll default to that mode.
|
||||
ct.mode = QueryExecModeDescribeExec
|
||||
fallthrough
|
||||
case QueryExecModeCacheStatement, QueryExecModeCacheDescribe, QueryExecModeDescribeExec:
|
||||
var err error
|
||||
sd, err = ct.conn.getStatementDescription(
|
||||
ctx,
|
||||
ct.mode,
|
||||
fmt.Sprintf("select %s from %s", quotedColumnNames, quotedTableName),
|
||||
)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("statement description failed: %w", err)
|
||||
}
|
||||
default:
|
||||
return 0, fmt.Errorf("unknown QueryExecMode: %v", ct.mode)
|
||||
}
|
||||
|
||||
r, w := io.Pipe()
|
||||
@@ -167,8 +188,13 @@ func (ct *copyFrom) run(ctx context.Context) (int64, error) {
|
||||
}
|
||||
|
||||
func (ct *copyFrom) buildCopyBuf(buf []byte, sd *pgconn.StatementDescription) (bool, []byte, error) {
|
||||
const sendBufSize = 65536 - 5 // The packet has a 5-byte header
|
||||
lastBufLen := 0
|
||||
largestRowLen := 0
|
||||
|
||||
for ct.rowSrc.Next() {
|
||||
lastBufLen = len(buf)
|
||||
|
||||
values, err := ct.rowSrc.Values()
|
||||
if err != nil {
|
||||
return false, nil, err
|
||||
@@ -185,7 +211,15 @@ func (ct *copyFrom) buildCopyBuf(buf []byte, sd *pgconn.StatementDescription) (b
|
||||
}
|
||||
}
|
||||
|
||||
if len(buf) > 65536 {
|
||||
rowLen := len(buf) - lastBufLen
|
||||
if rowLen > largestRowLen {
|
||||
largestRowLen = rowLen
|
||||
}
|
||||
|
||||
// Try not to overflow size of the buffer PgConn.CopyFrom will be reading into. If that happens then the nature of
|
||||
// io.Pipe means that the next Read will be short. This can lead to pathological send sizes such as 65531, 13, 65531
|
||||
// 13, 65531, 13, 65531, 13.
|
||||
if len(buf) > sendBufSize-largestRowLen {
|
||||
return true, buf, nil
|
||||
}
|
||||
}
|
||||
@@ -208,6 +242,7 @@ func (c *Conn) CopyFrom(ctx context.Context, tableName Identifier, columnNames [
|
||||
columnNames: columnNames,
|
||||
rowSrc: rowSrc,
|
||||
readerErrChan: make(chan error),
|
||||
mode: c.config.DefaultQueryExecMode,
|
||||
}
|
||||
|
||||
return ct.run(ctx)
|
||||
|
||||
+3
-2
@@ -69,8 +69,9 @@ Use Exec to execute a query that does not return a result set.
|
||||
|
||||
PostgreSQL Data Types
|
||||
|
||||
The package pgtype provides extensive and customizable support for converting Go values to and from PostgreSQL values
|
||||
including array and composite types. See that package's documentation for details.
|
||||
pgx uses the pgtype package to converting Go values to and from PostgreSQL values. It supports many PostgreSQL types
|
||||
directly and is customizable and extendable. User defined data types such as enums, domains, and composite types may
|
||||
require type registration. See that package's documentation for details.
|
||||
|
||||
Transactions
|
||||
|
||||
|
||||
+14
@@ -1,6 +1,7 @@
|
||||
package pgx
|
||||
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
|
||||
"github.com/jackc/pgx/v5/internal/anynil"
|
||||
@@ -181,6 +182,19 @@ func (eqb *ExtendedQueryBuilder) appendParamsForQueryExecModeExec(m *pgtype.Map,
|
||||
}
|
||||
}
|
||||
}
|
||||
if !ok {
|
||||
var dv driver.Valuer
|
||||
if dv, ok = arg.(driver.Valuer); ok {
|
||||
v, err := dv.Value()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
dt, ok = m.TypeForValue(v)
|
||||
if ok {
|
||||
arg = v
|
||||
}
|
||||
}
|
||||
}
|
||||
if !ok {
|
||||
var str fmt.Stringer
|
||||
if str, ok = arg.(fmt.Stringer); ok {
|
||||
|
||||
+19
-6
@@ -1,4 +1,7 @@
|
||||
// Package iobufpool implements a global segregated-fit pool of buffers for IO.
|
||||
//
|
||||
// It uses *[]byte instead of []byte to avoid the sync.Pool allocation with Put. Unfortunately, using a pointer to avoid
|
||||
// an allocation is purposely not documented. https://github.com/golang/go/issues/16323
|
||||
package iobufpool
|
||||
|
||||
import "sync"
|
||||
@@ -10,17 +13,27 @@ var pools [18]*sync.Pool
|
||||
func init() {
|
||||
for i := range pools {
|
||||
bufLen := 1 << (minPoolExpOf2 + i)
|
||||
pools[i] = &sync.Pool{New: func() any { return make([]byte, bufLen) }}
|
||||
pools[i] = &sync.Pool{
|
||||
New: func() any {
|
||||
buf := make([]byte, bufLen)
|
||||
return &buf
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get gets a []byte of len size with cap <= size*2.
|
||||
func Get(size int) []byte {
|
||||
func Get(size int) *[]byte {
|
||||
i := getPoolIdx(size)
|
||||
if i >= len(pools) {
|
||||
return make([]byte, size)
|
||||
buf := make([]byte, size)
|
||||
return &buf
|
||||
}
|
||||
return pools[i].Get().([]byte)[:size]
|
||||
|
||||
ptrBuf := (pools[i].Get().(*[]byte))
|
||||
*ptrBuf = (*ptrBuf)[:size]
|
||||
|
||||
return ptrBuf
|
||||
}
|
||||
|
||||
func getPoolIdx(size int) int {
|
||||
@@ -36,8 +49,8 @@ func getPoolIdx(size int) int {
|
||||
}
|
||||
|
||||
// Put returns buf to the pool.
|
||||
func Put(buf []byte) {
|
||||
i := putPoolIdx(cap(buf))
|
||||
func Put(buf *[]byte) {
|
||||
i := putPoolIdx(cap(*buf))
|
||||
if i < 0 {
|
||||
return
|
||||
}
|
||||
|
||||
+6
-6
@@ -8,11 +8,11 @@ const minBufferQueueLen = 8
|
||||
|
||||
type bufferQueue struct {
|
||||
lock sync.Mutex
|
||||
queue [][]byte
|
||||
queue []*[]byte
|
||||
r, w int
|
||||
}
|
||||
|
||||
func (bq *bufferQueue) pushBack(buf []byte) {
|
||||
func (bq *bufferQueue) pushBack(buf *[]byte) {
|
||||
bq.lock.Lock()
|
||||
defer bq.lock.Unlock()
|
||||
|
||||
@@ -23,7 +23,7 @@ func (bq *bufferQueue) pushBack(buf []byte) {
|
||||
bq.w++
|
||||
}
|
||||
|
||||
func (bq *bufferQueue) pushFront(buf []byte) {
|
||||
func (bq *bufferQueue) pushFront(buf *[]byte) {
|
||||
bq.lock.Lock()
|
||||
defer bq.lock.Unlock()
|
||||
|
||||
@@ -35,7 +35,7 @@ func (bq *bufferQueue) pushFront(buf []byte) {
|
||||
bq.w++
|
||||
}
|
||||
|
||||
func (bq *bufferQueue) popFront() []byte {
|
||||
func (bq *bufferQueue) popFront() *[]byte {
|
||||
bq.lock.Lock()
|
||||
defer bq.lock.Unlock()
|
||||
|
||||
@@ -51,7 +51,7 @@ func (bq *bufferQueue) popFront() []byte {
|
||||
bq.r = 0
|
||||
bq.w = 0
|
||||
if len(bq.queue) > minBufferQueueLen {
|
||||
bq.queue = make([][]byte, minBufferQueueLen)
|
||||
bq.queue = make([]*[]byte, minBufferQueueLen)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ func (bq *bufferQueue) growQueue() {
|
||||
desiredLen = minBufferQueueLen
|
||||
}
|
||||
|
||||
newQueue := make([][]byte, desiredLen)
|
||||
newQueue := make([]*[]byte, desiredLen)
|
||||
copy(newQueue, bq.queue)
|
||||
bq.queue = newQueue
|
||||
}
|
||||
+63
-21
@@ -26,7 +26,9 @@ import (
|
||||
var errClosed = errors.New("closed")
|
||||
var ErrWouldBlock = new(wouldBlockError)
|
||||
|
||||
const fakeNonblockingWaitDuration = 100 * time.Millisecond
|
||||
const fakeNonblockingWriteWaitDuration = 100 * time.Millisecond
|
||||
const minNonblockingReadWaitDuration = time.Microsecond
|
||||
const maxNonblockingReadWaitDuration = 100 * time.Millisecond
|
||||
|
||||
// NonBlockingDeadline is a magic value that when passed to Set[Read]Deadline places the connection in non-blocking read
|
||||
// mode.
|
||||
@@ -54,7 +56,7 @@ type Conn interface {
|
||||
// Flush flushes any buffered writes.
|
||||
Flush() error
|
||||
|
||||
// BufferReadUntilBlock reads and buffers any sucessfully read bytes until the read would block.
|
||||
// BufferReadUntilBlock reads and buffers any successfully read bytes until the read would block.
|
||||
BufferReadUntilBlock() error
|
||||
}
|
||||
|
||||
@@ -73,14 +75,24 @@ type NetConn struct {
|
||||
|
||||
readFlushLock sync.Mutex
|
||||
// non-blocking writes with syscall.RawConn are done with a callback function. By using these fields instead of the
|
||||
// callback functions closure to pass the buf argument and receive the n and err results we avoid some allocations.
|
||||
nonblockWriteBuf []byte
|
||||
nonblockWriteErr error
|
||||
nonblockWriteN int
|
||||
// callback functions closure to pass the buf argument and receive the n and err results we avoid some allocations.
|
||||
nonblockWriteFunc func(fd uintptr) (done bool)
|
||||
nonblockWriteBuf []byte
|
||||
nonblockWriteErr error
|
||||
nonblockWriteN int
|
||||
|
||||
readDeadlineLock sync.Mutex
|
||||
readDeadline time.Time
|
||||
readNonblocking bool
|
||||
// non-blocking reads with syscall.RawConn are done with a callback function. By using these fields instead of the
|
||||
// callback functions closure to pass the buf argument and receive the n and err results we avoid some allocations.
|
||||
nonblockReadFunc func(fd uintptr) (done bool)
|
||||
nonblockReadBuf []byte
|
||||
nonblockReadErr error
|
||||
nonblockReadN int
|
||||
|
||||
readDeadlineLock sync.Mutex
|
||||
readDeadline time.Time
|
||||
readNonblocking bool
|
||||
fakeNonBlockingShortReadCount int
|
||||
fakeNonblockingReadWaitDuration time.Duration
|
||||
|
||||
writeDeadlineLock sync.Mutex
|
||||
writeDeadline time.Time
|
||||
@@ -88,7 +100,8 @@ type NetConn struct {
|
||||
|
||||
func NewNetConn(conn net.Conn, fakeNonBlockingIO bool) *NetConn {
|
||||
nc := &NetConn{
|
||||
conn: conn,
|
||||
conn: conn,
|
||||
fakeNonblockingReadWaitDuration: maxNonblockingReadWaitDuration,
|
||||
}
|
||||
|
||||
if !fakeNonBlockingIO {
|
||||
@@ -121,9 +134,9 @@ func (c *NetConn) Read(b []byte) (n int, err error) {
|
||||
if buf == nil {
|
||||
break
|
||||
}
|
||||
copiedN := copy(b[n:], buf)
|
||||
if copiedN < len(buf) {
|
||||
buf = buf[copiedN:]
|
||||
copiedN := copy(b[n:], *buf)
|
||||
if copiedN < len(*buf) {
|
||||
*buf = (*buf)[copiedN:]
|
||||
c.readQueue.pushFront(buf)
|
||||
} else {
|
||||
iobufpool.Put(buf)
|
||||
@@ -160,7 +173,7 @@ func (c *NetConn) Write(b []byte) (n int, err error) {
|
||||
}
|
||||
|
||||
buf := iobufpool.Get(len(b))
|
||||
copy(buf, b)
|
||||
copy(*buf, b)
|
||||
c.writeQueue.pushBack(buf)
|
||||
return len(b), nil
|
||||
}
|
||||
@@ -278,14 +291,14 @@ func (c *NetConn) flush() error {
|
||||
}()
|
||||
|
||||
for buf := c.writeQueue.popFront(); buf != nil; buf = c.writeQueue.popFront() {
|
||||
remainingBuf := buf
|
||||
remainingBuf := *buf
|
||||
for len(remainingBuf) > 0 {
|
||||
n, err := c.nonblockingWrite(remainingBuf)
|
||||
remainingBuf = remainingBuf[n:]
|
||||
if err != nil {
|
||||
if !errors.Is(err, ErrWouldBlock) {
|
||||
buf = buf[:len(remainingBuf)]
|
||||
copy(buf, remainingBuf)
|
||||
*buf = (*buf)[:len(remainingBuf)]
|
||||
copy(*buf, remainingBuf)
|
||||
c.writeQueue.pushFront(buf)
|
||||
return err
|
||||
}
|
||||
@@ -313,10 +326,12 @@ func (c *NetConn) flush() error {
|
||||
func (c *NetConn) BufferReadUntilBlock() error {
|
||||
for {
|
||||
buf := iobufpool.Get(8 * 1024)
|
||||
n, err := c.nonblockingRead(buf)
|
||||
n, err := c.nonblockingRead(*buf)
|
||||
if n > 0 {
|
||||
buf = buf[:n]
|
||||
*buf = (*buf)[:n]
|
||||
c.readQueue.pushBack(buf)
|
||||
} else if n == 0 {
|
||||
iobufpool.Put(buf)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
@@ -369,7 +384,7 @@ func (c *NetConn) fakeNonblockingWrite(b []byte) (n int, err error) {
|
||||
c.writeDeadlineLock.Lock()
|
||||
defer c.writeDeadlineLock.Unlock()
|
||||
|
||||
deadline := time.Now().Add(fakeNonblockingWaitDuration)
|
||||
deadline := time.Now().Add(fakeNonblockingWriteWaitDuration)
|
||||
if c.writeDeadline.IsZero() || deadline.Before(c.writeDeadline) {
|
||||
err = c.conn.SetWriteDeadline(deadline)
|
||||
if err != nil {
|
||||
@@ -402,13 +417,40 @@ func (c *NetConn) fakeNonblockingRead(b []byte) (n int, err error) {
|
||||
c.readDeadlineLock.Lock()
|
||||
defer c.readDeadlineLock.Unlock()
|
||||
|
||||
deadline := time.Now().Add(fakeNonblockingWaitDuration)
|
||||
// The first 5 reads only read 1 byte at a time. This should give us 4 chances to read when we are sure the bytes are
|
||||
// already in Go or the OS's receive buffer.
|
||||
if c.fakeNonBlockingShortReadCount < 5 && len(b) > 0 {
|
||||
b = b[:1]
|
||||
}
|
||||
|
||||
startTime := time.Now()
|
||||
deadline := startTime.Add(c.fakeNonblockingReadWaitDuration)
|
||||
if c.readDeadline.IsZero() || deadline.Before(c.readDeadline) {
|
||||
err = c.conn.SetReadDeadline(deadline)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
defer func() {
|
||||
// If the read was successful and the wait duration is not already the minimum
|
||||
if err == nil && c.fakeNonblockingReadWaitDuration > minNonblockingReadWaitDuration {
|
||||
endTime := time.Now()
|
||||
|
||||
if n > 0 && c.fakeNonBlockingShortReadCount < 5 {
|
||||
c.fakeNonBlockingShortReadCount++
|
||||
}
|
||||
|
||||
// The wait duration should be 2x the fastest read that has occurred. This should give reasonable assurance that
|
||||
// a Read deadline will not block a read before it has a chance to read data already in Go or the OS's receive
|
||||
// buffer.
|
||||
proposedWait := endTime.Sub(startTime) * 2
|
||||
if proposedWait < minNonblockingReadWaitDuration {
|
||||
proposedWait = minNonblockingReadWaitDuration
|
||||
}
|
||||
if proposedWait < c.fakeNonblockingReadWaitDuration {
|
||||
c.fakeNonblockingReadWaitDuration = proposedWait
|
||||
}
|
||||
}
|
||||
|
||||
// Ignoring error resetting deadline as there is nothing that can reasonably be done if it fails.
|
||||
c.conn.SetReadDeadline(c.readDeadline)
|
||||
|
||||
|
||||
+1
-3
@@ -1,9 +1,7 @@
|
||||
//go:build !(aix || android || darwin || dragonfly || freebsd || hurd || illumos || ios || linux || netbsd || openbsd || solaris)
|
||||
//go:build !unix
|
||||
|
||||
package nbconn
|
||||
|
||||
// Not using unix build tag for support on Go 1.18.
|
||||
|
||||
func (c *NetConn) realNonblockingWrite(b []byte) (n int, err error) {
|
||||
return c.fakeNonblockingWrite(b)
|
||||
}
|
||||
|
||||
+26
-15
@@ -1,9 +1,7 @@
|
||||
//go:build aix || android || darwin || dragonfly || freebsd || hurd || illumos || ios || linux || netbsd || openbsd || solaris
|
||||
//go:build unix
|
||||
|
||||
package nbconn
|
||||
|
||||
// Not using unix build tag for support on Go 1.18.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io"
|
||||
@@ -12,14 +10,19 @@ import (
|
||||
|
||||
// realNonblockingWrite does a non-blocking write. readFlushLock must already be held.
|
||||
func (c *NetConn) realNonblockingWrite(b []byte) (n int, err error) {
|
||||
if c.nonblockWriteFunc == nil {
|
||||
c.nonblockWriteFunc = func(fd uintptr) (done bool) {
|
||||
c.nonblockWriteN, c.nonblockWriteErr = syscall.Write(int(fd), c.nonblockWriteBuf)
|
||||
return true
|
||||
}
|
||||
}
|
||||
c.nonblockWriteBuf = b
|
||||
c.nonblockWriteN = 0
|
||||
c.nonblockWriteErr = nil
|
||||
err = c.rawConn.Write(func(fd uintptr) (done bool) {
|
||||
c.nonblockWriteN, c.nonblockWriteErr = syscall.Write(int(fd), c.nonblockWriteBuf)
|
||||
return true
|
||||
})
|
||||
|
||||
err = c.rawConn.Write(c.nonblockWriteFunc)
|
||||
n = c.nonblockWriteN
|
||||
c.nonblockWriteBuf = nil // ensure that no reference to b is kept.
|
||||
if err == nil && c.nonblockWriteErr != nil {
|
||||
if errors.Is(c.nonblockWriteErr, syscall.EWOULDBLOCK) {
|
||||
err = ErrWouldBlock
|
||||
@@ -40,16 +43,24 @@ func (c *NetConn) realNonblockingWrite(b []byte) (n int, err error) {
|
||||
}
|
||||
|
||||
func (c *NetConn) realNonblockingRead(b []byte) (n int, err error) {
|
||||
var funcErr error
|
||||
err = c.rawConn.Read(func(fd uintptr) (done bool) {
|
||||
n, funcErr = syscall.Read(int(fd), b)
|
||||
return true
|
||||
})
|
||||
if err == nil && funcErr != nil {
|
||||
if errors.Is(funcErr, syscall.EWOULDBLOCK) {
|
||||
if c.nonblockReadFunc == nil {
|
||||
c.nonblockReadFunc = func(fd uintptr) (done bool) {
|
||||
c.nonblockReadN, c.nonblockReadErr = syscall.Read(int(fd), c.nonblockReadBuf)
|
||||
return true
|
||||
}
|
||||
}
|
||||
c.nonblockReadBuf = b
|
||||
c.nonblockReadN = 0
|
||||
c.nonblockReadErr = nil
|
||||
|
||||
err = c.rawConn.Read(c.nonblockReadFunc)
|
||||
n = c.nonblockReadN
|
||||
c.nonblockReadBuf = nil // ensure that no reference to b is kept.
|
||||
if err == nil && c.nonblockReadErr != nil {
|
||||
if errors.Is(c.nonblockReadErr, syscall.EWOULDBLOCK) {
|
||||
err = ErrWouldBlock
|
||||
} else {
|
||||
err = funcErr
|
||||
err = c.nonblockReadErr
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
+6
-7
@@ -8,7 +8,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"net"
|
||||
"net/url"
|
||||
@@ -211,9 +210,9 @@ func NetworkAddress(host string, port uint16) (network, address string) {
|
||||
//
|
||||
// In addition, ParseConfig accepts the following options:
|
||||
//
|
||||
// servicefile
|
||||
// libpq only reads servicefile from the PGSERVICEFILE environment variable. ParseConfig accepts servicefile as a
|
||||
// part of the connection string.
|
||||
// - servicefile.
|
||||
// libpq only reads servicefile from the PGSERVICEFILE environment variable. ParseConfig accepts servicefile as a
|
||||
// part of the connection string.
|
||||
func ParseConfig(connString string) (*Config, error) {
|
||||
var parseConfigOptions ParseConfigOptions
|
||||
return ParseConfigWithOptions(connString, parseConfigOptions)
|
||||
@@ -687,7 +686,7 @@ func configTLS(settings map[string]string, thisHost string, parseConfigOptions P
|
||||
caCertPool := x509.NewCertPool()
|
||||
|
||||
caPath := sslrootcert
|
||||
caCert, err := ioutil.ReadFile(caPath)
|
||||
caCert, err := os.ReadFile(caPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to read CA file: %w", err)
|
||||
}
|
||||
@@ -705,7 +704,7 @@ func configTLS(settings map[string]string, thisHost string, parseConfigOptions P
|
||||
}
|
||||
|
||||
if sslcert != "" && sslkey != "" {
|
||||
buf, err := ioutil.ReadFile(sslkey)
|
||||
buf, err := os.ReadFile(sslkey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to read sslkey: %w", err)
|
||||
}
|
||||
@@ -744,7 +743,7 @@ func configTLS(settings map[string]string, thisHost string, parseConfigOptions P
|
||||
} else {
|
||||
pemKey = pem.EncodeToMemory(block)
|
||||
}
|
||||
certfile, err := ioutil.ReadFile(sslcert)
|
||||
certfile, err := os.ReadFile(sslcert)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to read cert: %w", err)
|
||||
}
|
||||
|
||||
+15
-6
@@ -203,6 +203,8 @@ func ConnectConfig(octx context.Context, config *Config) (pgConn *PgConn, err er
|
||||
func expandWithIPs(ctx context.Context, lookupFn LookupFunc, fallbacks []*FallbackConfig) ([]*FallbackConfig, error) {
|
||||
var configs []*FallbackConfig
|
||||
|
||||
var lookupErrors []error
|
||||
|
||||
for _, fb := range fallbacks {
|
||||
// skip resolve for unix sockets
|
||||
if isAbsolutePath(fb.Host) {
|
||||
@@ -217,7 +219,8 @@ func expandWithIPs(ctx context.Context, lookupFn LookupFunc, fallbacks []*Fallba
|
||||
|
||||
ips, err := lookupFn(ctx, fb.Host)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
lookupErrors = append(lookupErrors, err)
|
||||
continue
|
||||
}
|
||||
|
||||
for _, ip := range ips {
|
||||
@@ -242,6 +245,12 @@ func expandWithIPs(ctx context.Context, lookupFn LookupFunc, fallbacks []*Fallba
|
||||
}
|
||||
}
|
||||
|
||||
// See https://github.com/jackc/pgx/issues/1464. When Go 1.20 can be used in pgx consider using errors.Join so all
|
||||
// errors are reported.
|
||||
if len(configs) == 0 && len(lookupErrors) > 0 {
|
||||
return nil, lookupErrors[0]
|
||||
}
|
||||
|
||||
return configs, nil
|
||||
}
|
||||
|
||||
@@ -1166,20 +1175,20 @@ func (pgConn *PgConn) CopyFrom(ctx context.Context, r io.Reader, sql string) (Co
|
||||
|
||||
buf := iobufpool.Get(65536)
|
||||
defer iobufpool.Put(buf)
|
||||
buf[0] = 'd'
|
||||
(*buf)[0] = 'd'
|
||||
|
||||
var readErr, pgErr error
|
||||
for pgErr == nil {
|
||||
// Read chunk from r.
|
||||
var n int
|
||||
n, readErr = r.Read(buf[5:cap(buf)])
|
||||
n, readErr = r.Read((*buf)[5:cap(*buf)])
|
||||
|
||||
// Send chunk to PostgreSQL.
|
||||
if n > 0 {
|
||||
buf = buf[0 : n+5]
|
||||
pgio.SetInt32(buf[1:], int32(n+4))
|
||||
*buf = (*buf)[0 : n+5]
|
||||
pgio.SetInt32((*buf)[1:], int32(n+4))
|
||||
|
||||
writeErr := pgConn.frontend.SendUnbufferedEncodedCopyData(buf)
|
||||
writeErr := pgConn.frontend.SendUnbufferedEncodedCopyData(*buf)
|
||||
if writeErr != nil {
|
||||
pgConn.asyncClose()
|
||||
return CommandTag{}, err
|
||||
|
||||
+5
-5
@@ -196,7 +196,7 @@ func (b *Backend) Receive() (FrontendMessage, error) {
|
||||
case AuthTypeCleartextPassword, AuthTypeMD5Password:
|
||||
fallthrough
|
||||
default:
|
||||
// to maintain backwards compatability
|
||||
// to maintain backwards compatibility
|
||||
msg = &PasswordMessage{}
|
||||
}
|
||||
case 'Q':
|
||||
@@ -233,11 +233,11 @@ func (b *Backend) Receive() (FrontendMessage, error) {
|
||||
// contextual identification of FrontendMessages. For example, in the
|
||||
// PG message flow documentation for PasswordMessage:
|
||||
//
|
||||
// Byte1('p')
|
||||
// Byte1('p')
|
||||
//
|
||||
// Identifies the message as a password response. Note that this is also used for
|
||||
// GSSAPI, SSPI and SASL response messages. The exact message type can be deduced from
|
||||
// the context.
|
||||
// Identifies the message as a password response. Note that this is also used for
|
||||
// GSSAPI, SSPI and SASL response messages. The exact message type can be deduced from
|
||||
// the context.
|
||||
//
|
||||
// Since the Frontend does not know about the state of a backend, it is important
|
||||
// to call SetAuthType() after an authentication request is received by the Frontend.
|
||||
|
||||
+9
-9
@@ -14,7 +14,7 @@ import (
|
||||
type chunkReader struct {
|
||||
r io.Reader
|
||||
|
||||
buf []byte
|
||||
buf *[]byte
|
||||
rp, wp int // buf read position and write position
|
||||
|
||||
minBufSize int
|
||||
@@ -45,7 +45,7 @@ func newChunkReader(r io.Reader, minBufSize int) *chunkReader {
|
||||
func (r *chunkReader) Next(n int) (buf []byte, err error) {
|
||||
// Reset the buffer if it is empty
|
||||
if r.rp == r.wp {
|
||||
if len(r.buf) != r.minBufSize {
|
||||
if len(*r.buf) != r.minBufSize {
|
||||
iobufpool.Put(r.buf)
|
||||
r.buf = iobufpool.Get(r.minBufSize)
|
||||
}
|
||||
@@ -55,15 +55,15 @@ func (r *chunkReader) Next(n int) (buf []byte, err error) {
|
||||
|
||||
// n bytes already in buf
|
||||
if (r.wp - r.rp) >= n {
|
||||
buf = r.buf[r.rp : r.rp+n : r.rp+n]
|
||||
buf = (*r.buf)[r.rp : r.rp+n : r.rp+n]
|
||||
r.rp += n
|
||||
return buf, err
|
||||
}
|
||||
|
||||
// buf is smaller than requested number of bytes
|
||||
if len(r.buf) < n {
|
||||
if len(*r.buf) < n {
|
||||
bigBuf := iobufpool.Get(n)
|
||||
r.wp = copy(bigBuf, r.buf[r.rp:r.wp])
|
||||
r.wp = copy((*bigBuf), (*r.buf)[r.rp:r.wp])
|
||||
r.rp = 0
|
||||
iobufpool.Put(r.buf)
|
||||
r.buf = bigBuf
|
||||
@@ -71,20 +71,20 @@ func (r *chunkReader) Next(n int) (buf []byte, err error) {
|
||||
|
||||
// buf is large enough, but need to shift filled area to start to make enough contiguous space
|
||||
minReadCount := n - (r.wp - r.rp)
|
||||
if (len(r.buf) - r.wp) < minReadCount {
|
||||
r.wp = copy(r.buf, r.buf[r.rp:r.wp])
|
||||
if (len(*r.buf) - r.wp) < minReadCount {
|
||||
r.wp = copy((*r.buf), (*r.buf)[r.rp:r.wp])
|
||||
r.rp = 0
|
||||
}
|
||||
|
||||
// Read at least the required number of bytes from the underlying io.Reader
|
||||
readBytesCount, err := io.ReadAtLeast(r.r, r.buf[r.wp:], minReadCount)
|
||||
readBytesCount, err := io.ReadAtLeast(r.r, (*r.buf)[r.wp:], minReadCount)
|
||||
r.wp += readBytesCount
|
||||
// fmt.Println("read", n)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
buf = r.buf[r.rp : r.rp+n : r.rp+n]
|
||||
buf = (*r.buf)[r.rp : r.rp+n : r.rp+n]
|
||||
r.rp += n
|
||||
return buf, nil
|
||||
}
|
||||
+14
-3
@@ -47,7 +47,16 @@ func (c *ArrayCodec) FormatSupported(format int16) bool {
|
||||
}
|
||||
|
||||
func (c *ArrayCodec) PreferredFormat() int16 {
|
||||
return c.ElementType.Codec.PreferredFormat()
|
||||
// The binary format should always be preferred for arrays if it is supported. Usually, this will happen automatically
|
||||
// because most types that support binary prefer it. However, text, json, and jsonb support binary but prefer the text
|
||||
// format. This is because it is simpler for jsonb and PostgreSQL can be significantly faster using the text format
|
||||
// for text-like data types than binary. However, arrays appear to always be faster in binary.
|
||||
//
|
||||
// https://www.postgresql.org/message-id/CAMovtNoHFod2jMAKQjjxv209PCTJx5Kc66anwWvX0mEiaXwgmA%40mail.gmail.com
|
||||
if c.ElementType.Codec.FormatSupported(BinaryFormatCode) {
|
||||
return BinaryFormatCode
|
||||
}
|
||||
return TextFormatCode
|
||||
}
|
||||
|
||||
func (c *ArrayCodec) PlanEncode(m *Map, oid uint32, format int16, value any) EncodePlan {
|
||||
@@ -60,7 +69,9 @@ func (c *ArrayCodec) PlanEncode(m *Map, oid uint32, format int16, value any) Enc
|
||||
|
||||
elementEncodePlan := m.PlanEncode(c.ElementType.OID, format, elementType)
|
||||
if elementEncodePlan == nil {
|
||||
return nil
|
||||
if reflect.TypeOf(elementType) != nil {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
switch format {
|
||||
@@ -301,7 +312,7 @@ func (c *ArrayCodec) decodeText(m *Map, arrayOID uint32, src []byte, array Array
|
||||
for i, s := range uta.Elements {
|
||||
elem := array.ScanIndex(i)
|
||||
var elemSrc []byte
|
||||
if s != "NULL" {
|
||||
if s != "NULL" || uta.Quoted[i] {
|
||||
elemSrc = []byte(s)
|
||||
}
|
||||
|
||||
|
||||
+40
@@ -910,3 +910,43 @@ func (a *anyMultiDimSliceArray) ScanIndexType() any {
|
||||
}
|
||||
return reflect.New(lowestSliceType.Elem()).Interface()
|
||||
}
|
||||
|
||||
type anyArrayArrayReflect struct {
|
||||
array reflect.Value
|
||||
}
|
||||
|
||||
func (a anyArrayArrayReflect) Dimensions() []ArrayDimension {
|
||||
return []ArrayDimension{{Length: int32(a.array.Len()), LowerBound: 1}}
|
||||
}
|
||||
|
||||
func (a anyArrayArrayReflect) Index(i int) any {
|
||||
return a.array.Index(i).Interface()
|
||||
}
|
||||
|
||||
func (a anyArrayArrayReflect) IndexType() any {
|
||||
return reflect.New(a.array.Type().Elem()).Elem().Interface()
|
||||
}
|
||||
|
||||
func (a *anyArrayArrayReflect) SetDimensions(dimensions []ArrayDimension) error {
|
||||
if dimensions == nil {
|
||||
return fmt.Errorf("anyArrayArrayReflect: cannot scan NULL into %v", a.array.Type().String())
|
||||
}
|
||||
|
||||
if len(dimensions) != 1 {
|
||||
return fmt.Errorf("anyArrayArrayReflect: cannot scan multi-dimensional array into %v", a.array.Type().String())
|
||||
}
|
||||
|
||||
if int(dimensions[0].Length) != a.array.Len() {
|
||||
return fmt.Errorf("anyArrayArrayReflect: cannot scan array with length %v into %v", dimensions[0].Length, a.array.Type().String())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *anyArrayArrayReflect) ScanIndex(i int) any {
|
||||
return a.array.Index(i).Addr().Interface()
|
||||
}
|
||||
|
||||
func (a *anyArrayArrayReflect) ScanIndexType() any {
|
||||
return reflect.New(a.array.Type().Elem()).Interface()
|
||||
}
|
||||
+1
-1
@@ -238,7 +238,7 @@ func decodeHexBytea(src []byte) ([]byte, error) {
|
||||
}
|
||||
|
||||
func (c ByteaCodec) DecodeDatabaseSQLValue(m *Map, oid uint32, format int16, src []byte) (driver.Value, error) {
|
||||
return codecDecodeToTextFormat(c, m, oid, format, src)
|
||||
return c.DecodeValue(m, oid, format, src)
|
||||
}
|
||||
|
||||
func (c ByteaCodec) DecodeValue(m *Map, oid uint32, format int16, src []byte) (any, error) {
|
||||
|
||||
+52
-25
@@ -57,27 +57,7 @@ JSON Support
|
||||
|
||||
pgtype automatically marshals and unmarshals data from json and jsonb PostgreSQL types.
|
||||
|
||||
Array Support
|
||||
|
||||
ArrayCodec implements support for arrays. If pgtype supports type T then it can easily support []T by registering an
|
||||
ArrayCodec for the appropriate PostgreSQL OID. In addition, Array[T] type can support multi-dimensional arrays.
|
||||
|
||||
Composite Support
|
||||
|
||||
CompositeCodec implements support for PostgreSQL composite types. Go structs can be scanned into if the public fields of
|
||||
the struct are in the exact order and type of the PostgreSQL type or by implementing CompositeIndexScanner and
|
||||
CompositeIndexGetter.
|
||||
|
||||
Enum Support
|
||||
|
||||
PostgreSQL enums can usually be treated as text. However, EnumCodec implements support for interning strings which can
|
||||
reduce memory usage.
|
||||
|
||||
Array, Composite, and Enum Type Registration
|
||||
|
||||
Array, composite, and enum types can be easily registered from a pgx.Conn with the LoadType method.
|
||||
|
||||
Extending Existing Type Support
|
||||
Extending Existing PostgreSQL Type Support
|
||||
|
||||
Generally, all Codecs will support interfaces that can be implemented to enable scanning and encoding. For example,
|
||||
PointCodec can use any Go type that implements the PointScanner and PointValuer interfaces. So rather than use
|
||||
@@ -90,11 +70,58 @@ pgx support such as github.com/shopspring/decimal. These types can be registered
|
||||
logic. See https://github.com/jackc/pgx-shopspring-decimal and https://github.com/jackc/pgx-gofrs-uuid for a example
|
||||
integrations.
|
||||
|
||||
Entirely New Type Support
|
||||
New PostgreSQL Type Support
|
||||
|
||||
If the PostgreSQL type is not already supported then an OID / Codec mapping can be registered with Map.RegisterType.
|
||||
There is no difference between a Codec defined and registered by the application and a Codec built in to pgtype. See any
|
||||
of the Codecs in pgtype for Codec examples and for examples of type registration.
|
||||
pgtype uses the PostgreSQL OID to determine how to encode or decode a value. pgtype supports array, composite, domain,
|
||||
and enum types. However, any type created in PostgreSQL with CREATE TYPE will receive a new OID. This means that the OID
|
||||
of each new PostgreSQL type must be registered for pgtype to handle values of that type with the correct Codec.
|
||||
|
||||
The pgx.Conn LoadType method can return a *Type for array, composite, domain, and enum types by inspecting the database
|
||||
metadata. This *Type can then be registered with Map.RegisterType.
|
||||
|
||||
For example, the following function could be called after a connection is established:
|
||||
|
||||
func RegisterDataTypes(ctx context.Context, conn *pgx.Conn) error {
|
||||
dataTypeNames := []string{
|
||||
"foo",
|
||||
"_foo",
|
||||
"bar",
|
||||
"_bar",
|
||||
}
|
||||
|
||||
for _, typeName := range dataTypeNames {
|
||||
dataType, err := conn.LoadType(ctx, typeName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
conn.TypeMap().RegisterType(dataType)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
A type cannot be registered unless all types it depends on are already registered. e.g. An array type cannot be
|
||||
registered until its element type is registered.
|
||||
|
||||
ArrayCodec implements support for arrays. If pgtype supports type T then it can easily support []T by registering an
|
||||
ArrayCodec for the appropriate PostgreSQL OID. In addition, Array[T] type can support multi-dimensional arrays.
|
||||
|
||||
CompositeCodec implements support for PostgreSQL composite types. Go structs can be scanned into if the public fields of
|
||||
the struct are in the exact order and type of the PostgreSQL type or by implementing CompositeIndexScanner and
|
||||
CompositeIndexGetter.
|
||||
|
||||
Domain types are treated as their underlying type if the underlying type and the domain type are registered.
|
||||
|
||||
PostgreSQL enums can usually be treated as text. However, EnumCodec implements support for interning strings which can
|
||||
reduce memory usage.
|
||||
|
||||
While pgtype will often still work with unregistered types it is highly recommended that all types be registered due to
|
||||
an improvement in performance and the elimination of certain edge cases.
|
||||
|
||||
If an entirely new PostgreSQL type (e.g. PostGIS types) is used then the application or a library can create a new
|
||||
Codec. Then the OID / Codec mapping can be registered with Map.RegisterType. There is no difference between a Codec
|
||||
defined and registered by the application and a Codec built in to pgtype. See any of the Codecs in pgtype for Codec
|
||||
examples and for examples of type registration.
|
||||
|
||||
Encoding Unknown Types
|
||||
|
||||
|
||||
+3
-3
@@ -33,7 +33,7 @@ func (dst *Int2) ScanInt64(n Int8) error {
|
||||
}
|
||||
|
||||
if n.Int64 < math.MinInt16 {
|
||||
return fmt.Errorf("%d is greater than maximum value for Int2", n.Int64)
|
||||
return fmt.Errorf("%d is less than minimum value for Int2", n.Int64)
|
||||
}
|
||||
if n.Int64 > math.MaxInt16 {
|
||||
return fmt.Errorf("%d is greater than maximum value for Int2", n.Int64)
|
||||
@@ -593,7 +593,7 @@ func (dst *Int4) ScanInt64(n Int8) error {
|
||||
}
|
||||
|
||||
if n.Int64 < math.MinInt32 {
|
||||
return fmt.Errorf("%d is greater than maximum value for Int4", n.Int64)
|
||||
return fmt.Errorf("%d is less than minimum value for Int4", n.Int64)
|
||||
}
|
||||
if n.Int64 > math.MaxInt32 {
|
||||
return fmt.Errorf("%d is greater than maximum value for Int4", n.Int64)
|
||||
@@ -1164,7 +1164,7 @@ func (dst *Int8) ScanInt64(n Int8) error {
|
||||
}
|
||||
|
||||
if n.Int64 < math.MinInt64 {
|
||||
return fmt.Errorf("%d is greater than maximum value for Int8", n.Int64)
|
||||
return fmt.Errorf("%d is less than minimum value for Int8", n.Int64)
|
||||
}
|
||||
if n.Int64 > math.MaxInt64 {
|
||||
return fmt.Errorf("%d is greater than maximum value for Int8", n.Int64)
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@ package pgtype
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"encoding/binary"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math"
|
||||
"strconv"
|
||||
@@ -34,7 +35,7 @@ func (dst *Int<%= pg_byte_size %>) ScanInt64(n Int8) error {
|
||||
}
|
||||
|
||||
if n.Int64 < math.MinInt<%= pg_bit_size %> {
|
||||
return fmt.Errorf("%d is greater than maximum value for Int<%= pg_byte_size %>", n.Int64)
|
||||
return fmt.Errorf("%d is less than minimum value for Int<%= pg_byte_size %>", n.Int64)
|
||||
}
|
||||
if n.Int64 > math.MaxInt<%= pg_bit_size %> {
|
||||
return fmt.Errorf("%d is greater than maximum value for Int<%= pg_byte_size %>", n.Int64)
|
||||
|
||||
+27
-2
@@ -1,6 +1,7 @@
|
||||
package pgtype
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"database/sql/driver"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
@@ -23,6 +24,12 @@ func (c JSONCodec) PlanEncode(m *Map, oid uint32, format int16, value any) Encod
|
||||
return encodePlanJSONCodecEitherFormatString{}
|
||||
case []byte:
|
||||
return encodePlanJSONCodecEitherFormatByteSlice{}
|
||||
|
||||
// Cannot rely on driver.Valuer being handled later because anything can be marshalled.
|
||||
//
|
||||
// https://github.com/jackc/pgx/issues/1430
|
||||
case driver.Valuer:
|
||||
return &encodePlanDriverValuer{m: m, oid: oid, formatCode: format}
|
||||
}
|
||||
|
||||
// Because anything can be marshalled the normal wrapping in Map.PlanScan doesn't get a chance to run. So try the
|
||||
@@ -82,10 +89,28 @@ func (JSONCodec) PlanScan(m *Map, oid uint32, format int16, target any) ScanPlan
|
||||
return scanPlanJSONToByteSlice{}
|
||||
case BytesScanner:
|
||||
return scanPlanBinaryBytesToBytesScanner{}
|
||||
default:
|
||||
return scanPlanJSONToJSONUnmarshal{}
|
||||
|
||||
// Cannot rely on sql.Scanner being handled later because scanPlanJSONToJSONUnmarshal will take precedence.
|
||||
//
|
||||
// https://github.com/jackc/pgx/issues/1418
|
||||
case sql.Scanner:
|
||||
return &scanPlanSQLScanner{formatCode: format}
|
||||
}
|
||||
|
||||
// This is to fix **string scanning. It seems wrong to special case sql.Scanner and pointer to pointer, but it's not
|
||||
// clear what a better solution would be.
|
||||
//
|
||||
// https://github.com/jackc/pgx/issues/1470
|
||||
if wrapperPlan, nextDst, ok := TryPointerPointerScanPlan(target); ok {
|
||||
if nextPlan := m.planScan(oid, format, nextDst); nextPlan != nil {
|
||||
if _, failed := nextPlan.(*scanPlanFail); !failed {
|
||||
wrapperPlan.SetNext(nextPlan)
|
||||
return wrapperPlan
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return scanPlanJSONToJSONUnmarshal{}
|
||||
}
|
||||
|
||||
type scanPlanAnyToString struct{}
|
||||
|
||||
+19
@@ -240,10 +240,29 @@ func (n Numeric) MarshalJSON() ([]byte, error) {
|
||||
return n.numberTextBytes(), nil
|
||||
}
|
||||
|
||||
func (n *Numeric) UnmarshalJSON(src []byte) error {
|
||||
if bytes.Compare(src, []byte(`null`)) == 0 {
|
||||
*n = Numeric{}
|
||||
return nil
|
||||
}
|
||||
if bytes.Compare(src, []byte(`"NaN"`)) == 0 {
|
||||
*n = Numeric{NaN: true, Valid: true}
|
||||
return nil
|
||||
}
|
||||
return scanPlanTextAnyToNumericScanner{}.Scan(src, n)
|
||||
}
|
||||
|
||||
// numberString returns a string of the number. undefined if NaN, infinite, or NULL
|
||||
func (n Numeric) numberTextBytes() []byte {
|
||||
intStr := n.Int.String()
|
||||
|
||||
buf := &bytes.Buffer{}
|
||||
|
||||
if len(intStr) > 0 && intStr[:1] == "-" {
|
||||
intStr = intStr[1:]
|
||||
buf.WriteByte('-')
|
||||
}
|
||||
|
||||
exp := int(n.Exp)
|
||||
if exp > 0 {
|
||||
buf.WriteString(intStr)
|
||||
|
||||
+101
-13
@@ -192,7 +192,8 @@ type Map struct {
|
||||
|
||||
reflectTypeToType map[reflect.Type]*Type
|
||||
|
||||
memoizedScanPlans map[uint32]map[reflect.Type][2]ScanPlan
|
||||
memoizedScanPlans map[uint32]map[reflect.Type][2]ScanPlan
|
||||
memoizedEncodePlans map[uint32]map[reflect.Type][2]EncodePlan
|
||||
|
||||
// TryWrapEncodePlanFuncs is a slice of functions that will wrap a value that cannot be encoded by the Codec. Every
|
||||
// time a wrapper is found the PlanEncode method will be recursively called with the new value. This allows several layers of wrappers
|
||||
@@ -214,7 +215,8 @@ func NewMap() *Map {
|
||||
reflectTypeToName: make(map[reflect.Type]string),
|
||||
oidToFormatCode: make(map[uint32]int16),
|
||||
|
||||
memoizedScanPlans: make(map[uint32]map[reflect.Type][2]ScanPlan),
|
||||
memoizedScanPlans: make(map[uint32]map[reflect.Type][2]ScanPlan),
|
||||
memoizedEncodePlans: make(map[uint32]map[reflect.Type][2]EncodePlan),
|
||||
|
||||
TryWrapEncodePlanFuncs: []TryWrapEncodePlanFunc{
|
||||
TryWrapDerefPointerEncodePlan,
|
||||
@@ -223,6 +225,7 @@ func NewMap() *Map {
|
||||
TryWrapStructEncodePlan,
|
||||
TryWrapSliceEncodePlan,
|
||||
TryWrapMultiDimSliceEncodePlan,
|
||||
TryWrapArrayEncodePlan,
|
||||
},
|
||||
|
||||
TryWrapScanPlanFuncs: []TryWrapScanPlanFunc{
|
||||
@@ -232,6 +235,7 @@ func NewMap() *Map {
|
||||
TryWrapStructScanPlan,
|
||||
TryWrapPtrSliceScanPlan,
|
||||
TryWrapPtrMultiDimSliceScanPlan,
|
||||
TryWrapPtrArrayScanPlan,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -420,6 +424,9 @@ func (m *Map) RegisterType(t *Type) {
|
||||
for k := range m.memoizedScanPlans {
|
||||
delete(m.memoizedScanPlans, k)
|
||||
}
|
||||
for k := range m.memoizedEncodePlans {
|
||||
delete(m.memoizedEncodePlans, k)
|
||||
}
|
||||
}
|
||||
|
||||
// RegisterDefaultPgType registers a mapping of a Go type to a PostgreSQL type name. Typically the data type to be
|
||||
@@ -433,6 +440,9 @@ func (m *Map) RegisterDefaultPgType(value any, name string) {
|
||||
for k := range m.memoizedScanPlans {
|
||||
delete(m.memoizedScanPlans, k)
|
||||
}
|
||||
for k := range m.memoizedEncodePlans {
|
||||
delete(m.memoizedEncodePlans, k)
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Map) TypeForOID(oid uint32) (*Type, bool) {
|
||||
@@ -1018,7 +1028,7 @@ func TryWrapStructScanPlan(target any) (plan WrappedScanPlanNextSetter, nextValu
|
||||
|
||||
var targetElemValue reflect.Value
|
||||
if targetValue.IsNil() {
|
||||
targetElemValue = reflect.New(targetValue.Type().Elem())
|
||||
targetElemValue = reflect.Zero(targetValue.Type().Elem())
|
||||
} else {
|
||||
targetElemValue = targetValue.Elem()
|
||||
}
|
||||
@@ -1139,6 +1149,31 @@ func (plan *wrapPtrMultiDimSliceScanPlan) Scan(src []byte, target any) error {
|
||||
return plan.next.Scan(src, &anyMultiDimSliceArray{slice: reflect.ValueOf(target).Elem()})
|
||||
}
|
||||
|
||||
// TryWrapPtrArrayScanPlan tries to wrap a pointer to a single dimension array.
|
||||
func TryWrapPtrArrayScanPlan(target any) (plan WrappedScanPlanNextSetter, nextValue any, ok bool) {
|
||||
targetValue := reflect.ValueOf(target)
|
||||
if targetValue.Kind() != reflect.Ptr {
|
||||
return nil, nil, false
|
||||
}
|
||||
|
||||
targetElemValue := targetValue.Elem()
|
||||
|
||||
if targetElemValue.Kind() == reflect.Array {
|
||||
return &wrapPtrArrayReflectScanPlan{}, &anyArrayArrayReflect{array: targetElemValue}, true
|
||||
}
|
||||
return nil, nil, false
|
||||
}
|
||||
|
||||
type wrapPtrArrayReflectScanPlan struct {
|
||||
next ScanPlan
|
||||
}
|
||||
|
||||
func (plan *wrapPtrArrayReflectScanPlan) SetNext(next ScanPlan) { plan.next = next }
|
||||
|
||||
func (plan *wrapPtrArrayReflectScanPlan) Scan(src []byte, target any) error {
|
||||
return plan.next.Scan(src, &anyArrayArrayReflect{array: reflect.ValueOf(target).Elem()})
|
||||
}
|
||||
|
||||
// PlanScan prepares a plan to scan a value into target.
|
||||
func (m *Map) PlanScan(oid uint32, formatCode int16, target any) ScanPlan {
|
||||
oidMemo := m.memoizedScanPlans[oid]
|
||||
@@ -1200,6 +1235,16 @@ func (m *Map) planScan(oid uint32, formatCode int16, target any) ScanPlan {
|
||||
}
|
||||
}
|
||||
|
||||
// This needs to happen before trying m.TryWrapScanPlanFuncs. Otherwise, a sql.Scanner would not get called if it was
|
||||
// defined on a type that could be unwrapped such as `type myString string`.
|
||||
//
|
||||
// https://github.com/jackc/pgtype/issues/197
|
||||
if dt == nil {
|
||||
if _, ok := target.(sql.Scanner); ok {
|
||||
return &scanPlanSQLScanner{formatCode: formatCode}
|
||||
}
|
||||
}
|
||||
|
||||
for _, f := range m.TryWrapScanPlanFuncs {
|
||||
if wrapperPlan, nextDst, ok := f(target); ok {
|
||||
if nextPlan := m.planScan(oid, formatCode, nextDst); nextPlan != nil {
|
||||
@@ -1221,10 +1266,6 @@ func (m *Map) planScan(oid uint32, formatCode int16, target any) ScanPlan {
|
||||
}
|
||||
}
|
||||
|
||||
if _, ok := target.(sql.Scanner); ok {
|
||||
return &scanPlanSQLScanner{formatCode: formatCode}
|
||||
}
|
||||
|
||||
return &scanPlanFail{m: m, oid: oid, formatCode: formatCode}
|
||||
}
|
||||
|
||||
@@ -1289,6 +1330,24 @@ func codecDecodeToTextFormat(codec Codec, m *Map, oid uint32, format int16, src
|
||||
// PlanEncode returns an Encode plan for encoding value into PostgreSQL format for oid and format. If no plan can be
|
||||
// found then nil is returned.
|
||||
func (m *Map) PlanEncode(oid uint32, format int16, value any) EncodePlan {
|
||||
oidMemo := m.memoizedEncodePlans[oid]
|
||||
if oidMemo == nil {
|
||||
oidMemo = make(map[reflect.Type][2]EncodePlan)
|
||||
m.memoizedEncodePlans[oid] = oidMemo
|
||||
}
|
||||
targetReflectType := reflect.TypeOf(value)
|
||||
typeMemo := oidMemo[targetReflectType]
|
||||
plan := typeMemo[format]
|
||||
if plan == nil {
|
||||
plan = m.planEncode(oid, format, value)
|
||||
typeMemo[format] = plan
|
||||
oidMemo[targetReflectType] = typeMemo
|
||||
}
|
||||
|
||||
return plan
|
||||
}
|
||||
|
||||
func (m *Map) planEncode(oid uint32, format int16, value any) EncodePlan {
|
||||
if format == TextFormatCode {
|
||||
switch value.(type) {
|
||||
case string:
|
||||
@@ -1299,16 +1358,16 @@ func (m *Map) PlanEncode(oid uint32, format int16, value any) EncodePlan {
|
||||
}
|
||||
|
||||
var dt *Type
|
||||
|
||||
if oid == 0 {
|
||||
if dataType, ok := m.TypeForOID(oid); ok {
|
||||
dt = dataType
|
||||
} else {
|
||||
// If no type for the OID was found, then either it is unknowable (e.g. the simple protocol) or it is an
|
||||
// unregistered type. In either case try to find the type and OID that matches the value (e.g. a []byte would be
|
||||
// registered to PostgreSQL bytea).
|
||||
if dataType, ok := m.TypeForValue(value); ok {
|
||||
dt = dataType
|
||||
oid = dt.OID // Preserve assumed OID in case we are recursively called below.
|
||||
}
|
||||
} else {
|
||||
if dataType, ok := m.TypeForOID(oid); ok {
|
||||
dt = dataType
|
||||
}
|
||||
}
|
||||
|
||||
if dt != nil {
|
||||
@@ -1941,6 +2000,35 @@ func (plan *wrapMultiDimSliceEncodePlan) Encode(value any, buf []byte) (newBuf [
|
||||
return plan.next.Encode(&w, buf)
|
||||
}
|
||||
|
||||
func TryWrapArrayEncodePlan(value any) (plan WrappedEncodePlanNextSetter, nextValue any, ok bool) {
|
||||
if _, ok := value.(driver.Valuer); ok {
|
||||
return nil, nil, false
|
||||
}
|
||||
|
||||
if valueType := reflect.TypeOf(value); valueType != nil && valueType.Kind() == reflect.Array {
|
||||
w := anyArrayArrayReflect{
|
||||
array: reflect.ValueOf(value),
|
||||
}
|
||||
return &wrapArrayEncodeReflectPlan{}, w, true
|
||||
}
|
||||
|
||||
return nil, nil, false
|
||||
}
|
||||
|
||||
type wrapArrayEncodeReflectPlan struct {
|
||||
next EncodePlan
|
||||
}
|
||||
|
||||
func (plan *wrapArrayEncodeReflectPlan) SetNext(next EncodePlan) { plan.next = next }
|
||||
|
||||
func (plan *wrapArrayEncodeReflectPlan) Encode(value any, buf []byte) (newBuf []byte, err error) {
|
||||
w := anyArrayArrayReflect{
|
||||
array: reflect.ValueOf(value),
|
||||
}
|
||||
|
||||
return plan.next.Encode(w, buf)
|
||||
}
|
||||
|
||||
func newEncodeError(value any, m *Map, oid uint32, formatCode int16, err error) error {
|
||||
var format string
|
||||
switch formatCode {
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ type TIDValuer interface {
|
||||
//
|
||||
// When one does
|
||||
//
|
||||
// select ctid, * from some_table;
|
||||
// select ctid, * from some_table;
|
||||
//
|
||||
// it is the data type of the ctid hidden system column.
|
||||
//
|
||||
|
||||
+40
-33
@@ -2,58 +2,58 @@
|
||||
//
|
||||
// A database/sql connection can be established through sql.Open.
|
||||
//
|
||||
// db, err := sql.Open("pgx", "postgres://pgx_md5:secret@localhost:5432/pgx_test?sslmode=disable")
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// db, err := sql.Open("pgx", "postgres://pgx_md5:secret@localhost:5432/pgx_test?sslmode=disable")
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
// Or from a DSN string.
|
||||
//
|
||||
// db, err := sql.Open("pgx", "user=postgres password=secret host=localhost port=5432 database=pgx_test sslmode=disable")
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// db, err := sql.Open("pgx", "user=postgres password=secret host=localhost port=5432 database=pgx_test sslmode=disable")
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
// Or a pgx.ConnConfig can be used to set configuration not accessible via connection string. In this case the
|
||||
// pgx.ConnConfig must first be registered with the driver. This registration returns a connection string which is used
|
||||
// with sql.Open.
|
||||
//
|
||||
// connConfig, _ := pgx.ParseConfig(os.Getenv("DATABASE_URL"))
|
||||
// connConfig.Logger = myLogger
|
||||
// connStr := stdlib.RegisterConnConfig(connConfig)
|
||||
// db, _ := sql.Open("pgx", connStr)
|
||||
// connConfig, _ := pgx.ParseConfig(os.Getenv("DATABASE_URL"))
|
||||
// connConfig.Logger = myLogger
|
||||
// connStr := stdlib.RegisterConnConfig(connConfig)
|
||||
// db, _ := sql.Open("pgx", connStr)
|
||||
//
|
||||
// pgx uses standard PostgreSQL positional parameters in queries. e.g. $1, $2. It does not support named parameters.
|
||||
//
|
||||
// db.QueryRow("select * from users where id=$1", userID)
|
||||
// db.QueryRow("select * from users where id=$1", userID)
|
||||
//
|
||||
// (*sql.Conn) Raw() can be used to get a *pgx.Conn from the standard database/sql.DB connection pool. This allows
|
||||
// operations that use pgx specific functionality.
|
||||
//
|
||||
// // Given db is a *sql.DB
|
||||
// conn, err := db.Conn(context.Background())
|
||||
// if err != nil {
|
||||
// // handle error from acquiring connection from DB pool
|
||||
// }
|
||||
// // Given db is a *sql.DB
|
||||
// conn, err := db.Conn(context.Background())
|
||||
// if err != nil {
|
||||
// // handle error from acquiring connection from DB pool
|
||||
// }
|
||||
//
|
||||
// err = conn.Raw(func(driverConn any) error {
|
||||
// conn := driverConn.(*stdlib.Conn).Conn() // conn is a *pgx.Conn
|
||||
// // Do pgx specific stuff with conn
|
||||
// conn.CopyFrom(...)
|
||||
// return nil
|
||||
// })
|
||||
// if err != nil {
|
||||
// // handle error that occurred while using *pgx.Conn
|
||||
// }
|
||||
// err = conn.Raw(func(driverConn any) error {
|
||||
// conn := driverConn.(*stdlib.Conn).Conn() // conn is a *pgx.Conn
|
||||
// // Do pgx specific stuff with conn
|
||||
// conn.CopyFrom(...)
|
||||
// return nil
|
||||
// })
|
||||
// if err != nil {
|
||||
// // handle error that occurred while using *pgx.Conn
|
||||
// }
|
||||
//
|
||||
// PostgreSQL Specific Data Types
|
||||
// # PostgreSQL Specific Data Types
|
||||
//
|
||||
// The pgtype package provides support for PostgreSQL specific types. *pgtype.Map.SQLScanner is an adapter that makes
|
||||
// these types usable as a sql.Scanner.
|
||||
//
|
||||
// m := pgtype.NewMap()
|
||||
// var a []int64
|
||||
// err := db.QueryRow("select '{1,2,3}'::bigint[]").Scan(m.SQLScanner(&a))
|
||||
// m := pgtype.NewMap()
|
||||
// var a []int64
|
||||
// err := db.QueryRow("select '{1,2,3}'::bigint[]").Scan(m.SQLScanner(&a))
|
||||
package stdlib
|
||||
|
||||
import (
|
||||
@@ -66,6 +66,7 @@ import (
|
||||
"math"
|
||||
"math/rand"
|
||||
"reflect"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -85,7 +86,13 @@ func init() {
|
||||
pgxDriver = &Driver{
|
||||
configs: make(map[string]*pgx.ConnConfig),
|
||||
}
|
||||
sql.Register("pgx", pgxDriver)
|
||||
|
||||
drivers := sql.Drivers()
|
||||
// if pgx driver was already registered by different pgx major version then we skip registration under the default name.
|
||||
if i := sort.SearchStrings(sql.Drivers(), "pgx"); len(drivers) >= i || drivers[i] != "pgx" {
|
||||
sql.Register("pgx", pgxDriver)
|
||||
}
|
||||
sql.Register("pgx/v5", pgxDriver)
|
||||
|
||||
databaseSQLResultFormats = pgx.QueryResultFormatsByOID{
|
||||
pgtype.BoolOID: 1,
|
||||
@@ -140,7 +147,7 @@ func RandomizeHostOrderFunc(ctx context.Context, connConfig *pgx.ConnConfig) err
|
||||
return nil
|
||||
}
|
||||
|
||||
newFallbacks := append([]*pgconn.FallbackConfig{&pgconn.FallbackConfig{
|
||||
newFallbacks := append([]*pgconn.FallbackConfig{{
|
||||
Host: connConfig.Host,
|
||||
Port: connConfig.Port,
|
||||
TLSConfig: connConfig.TLSConfig,
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ func (c *Client) updateRegRFC(ctx context.Context, a *Account) (*Account, error)
|
||||
return responseAccount(res)
|
||||
}
|
||||
|
||||
// getGegRFC is equivalent to c.GetReg but for CAs implementing RFC 8555.
|
||||
// getRegRFC is equivalent to c.GetReg but for CAs implementing RFC 8555.
|
||||
// It expects c.Discover to have already been called.
|
||||
func (c *Client) getRegRFC(ctx context.Context) (*Account, error) {
|
||||
req := json.RawMessage(`{"onlyReturnExisting": true}`)
|
||||
|
||||
+1
-1
@@ -245,7 +245,7 @@ func feSquareGeneric(v, a *Element) {
|
||||
v.carryPropagate()
|
||||
}
|
||||
|
||||
// carryPropagate brings the limbs below 52 bits by applying the reduction
|
||||
// carryPropagateGeneric brings the limbs below 52 bits by applying the reduction
|
||||
// identity (a * 2²⁵⁵ + b = a * 19 + b) to the l4 carry. TODO inline
|
||||
func (v *Element) carryPropagateGeneric() *Element {
|
||||
c0 := v.l0 >> 51
|
||||
|
||||
+10
-1
@@ -662,6 +662,15 @@ func (f *Framer) WriteData(streamID uint32, endStream bool, data []byte) error {
|
||||
// It is the caller's responsibility not to violate the maximum frame size
|
||||
// and to not call other Write methods concurrently.
|
||||
func (f *Framer) WriteDataPadded(streamID uint32, endStream bool, data, pad []byte) error {
|
||||
if err := f.startWriteDataPadded(streamID, endStream, data, pad); err != nil {
|
||||
return err
|
||||
}
|
||||
return f.endWrite()
|
||||
}
|
||||
|
||||
// startWriteDataPadded is WriteDataPadded, but only writes the frame to the Framer's internal buffer.
|
||||
// The caller should call endWrite to flush the frame to the underlying writer.
|
||||
func (f *Framer) startWriteDataPadded(streamID uint32, endStream bool, data, pad []byte) error {
|
||||
if !validStreamID(streamID) && !f.AllowIllegalWrites {
|
||||
return errStreamID
|
||||
}
|
||||
@@ -691,7 +700,7 @@ func (f *Framer) WriteDataPadded(streamID uint32, endStream bool, data, pad []by
|
||||
}
|
||||
f.wbuf = append(f.wbuf, data...)
|
||||
f.wbuf = append(f.wbuf, pad...)
|
||||
return f.endWrite()
|
||||
return nil
|
||||
}
|
||||
|
||||
// A SettingsFrame conveys configuration parameters that affect how
|
||||
|
||||
+49
-30
@@ -359,6 +359,7 @@ func (d *Decoder) parseFieldLiteral(n uint8, it indexType) error {
|
||||
|
||||
var hf HeaderField
|
||||
wantStr := d.emitEnabled || it.indexed()
|
||||
var undecodedName undecodedString
|
||||
if nameIdx > 0 {
|
||||
ihf, ok := d.at(nameIdx)
|
||||
if !ok {
|
||||
@@ -366,15 +367,27 @@ func (d *Decoder) parseFieldLiteral(n uint8, it indexType) error {
|
||||
}
|
||||
hf.Name = ihf.Name
|
||||
} else {
|
||||
hf.Name, buf, err = d.readString(buf, wantStr)
|
||||
undecodedName, buf, err = d.readString(buf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
hf.Value, buf, err = d.readString(buf, wantStr)
|
||||
undecodedValue, buf, err := d.readString(buf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if wantStr {
|
||||
if nameIdx <= 0 {
|
||||
hf.Name, err = d.decodeString(undecodedName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
hf.Value, err = d.decodeString(undecodedValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
d.buf = buf
|
||||
if it.indexed() {
|
||||
d.dynTab.add(hf)
|
||||
@@ -459,46 +472,52 @@ func readVarInt(n byte, p []byte) (i uint64, remain []byte, err error) {
|
||||
return 0, origP, errNeedMore
|
||||
}
|
||||
|
||||
// readString decodes an hpack string from p.
|
||||
// readString reads an hpack string from p.
|
||||
//
|
||||
// wantStr is whether s will be used. If false, decompression and
|
||||
// []byte->string garbage are skipped if s will be ignored
|
||||
// anyway. This does mean that huffman decoding errors for non-indexed
|
||||
// strings past the MAX_HEADER_LIST_SIZE are ignored, but the server
|
||||
// is returning an error anyway, and because they're not indexed, the error
|
||||
// won't affect the decoding state.
|
||||
func (d *Decoder) readString(p []byte, wantStr bool) (s string, remain []byte, err error) {
|
||||
// It returns a reference to the encoded string data to permit deferring decode costs
|
||||
// until after the caller verifies all data is present.
|
||||
func (d *Decoder) readString(p []byte) (u undecodedString, remain []byte, err error) {
|
||||
if len(p) == 0 {
|
||||
return "", p, errNeedMore
|
||||
return u, p, errNeedMore
|
||||
}
|
||||
isHuff := p[0]&128 != 0
|
||||
strLen, p, err := readVarInt(7, p)
|
||||
if err != nil {
|
||||
return "", p, err
|
||||
return u, p, err
|
||||
}
|
||||
if d.maxStrLen != 0 && strLen > uint64(d.maxStrLen) {
|
||||
return "", nil, ErrStringLength
|
||||
// Returning an error here means Huffman decoding errors
|
||||
// for non-indexed strings past the maximum string length
|
||||
// are ignored, but the server is returning an error anyway
|
||||
// and because the string is not indexed the error will not
|
||||
// affect the decoding state.
|
||||
return u, nil, ErrStringLength
|
||||
}
|
||||
if uint64(len(p)) < strLen {
|
||||
return "", p, errNeedMore
|
||||
return u, p, errNeedMore
|
||||
}
|
||||
if !isHuff {
|
||||
if wantStr {
|
||||
s = string(p[:strLen])
|
||||
}
|
||||
return s, p[strLen:], nil
|
||||
u.isHuff = isHuff
|
||||
u.b = p[:strLen]
|
||||
return u, p[strLen:], nil
|
||||
}
|
||||
|
||||
type undecodedString struct {
|
||||
isHuff bool
|
||||
b []byte
|
||||
}
|
||||
|
||||
func (d *Decoder) decodeString(u undecodedString) (string, error) {
|
||||
if !u.isHuff {
|
||||
return string(u.b), nil
|
||||
}
|
||||
|
||||
if wantStr {
|
||||
buf := bufPool.Get().(*bytes.Buffer)
|
||||
buf.Reset() // don't trust others
|
||||
defer bufPool.Put(buf)
|
||||
if err := huffmanDecode(buf, d.maxStrLen, p[:strLen]); err != nil {
|
||||
buf.Reset()
|
||||
return "", nil, err
|
||||
}
|
||||
buf := bufPool.Get().(*bytes.Buffer)
|
||||
buf.Reset() // don't trust others
|
||||
var s string
|
||||
err := huffmanDecode(buf, d.maxStrLen, u.b)
|
||||
if err == nil {
|
||||
s = buf.String()
|
||||
buf.Reset() // be nice to GC
|
||||
}
|
||||
return s, p[strLen:], nil
|
||||
buf.Reset() // be nice to GC
|
||||
bufPool.Put(buf)
|
||||
return s, err
|
||||
}
|
||||
+15
-3
@@ -843,8 +843,13 @@ type frameWriteResult struct {
|
||||
// and then reports when it's done.
|
||||
// At most one goroutine can be running writeFrameAsync at a time per
|
||||
// serverConn.
|
||||
func (sc *serverConn) writeFrameAsync(wr FrameWriteRequest) {
|
||||
err := wr.write.writeFrame(sc)
|
||||
func (sc *serverConn) writeFrameAsync(wr FrameWriteRequest, wd *writeData) {
|
||||
var err error
|
||||
if wd == nil {
|
||||
err = wr.write.writeFrame(sc)
|
||||
} else {
|
||||
err = sc.framer.endWrite()
|
||||
}
|
||||
sc.wroteFrameCh <- frameWriteResult{wr: wr, err: err}
|
||||
}
|
||||
|
||||
@@ -1251,9 +1256,16 @@ func (sc *serverConn) startFrameWrite(wr FrameWriteRequest) {
|
||||
sc.writingFrameAsync = false
|
||||
err := wr.write.writeFrame(sc)
|
||||
sc.wroteFrame(frameWriteResult{wr: wr, err: err})
|
||||
} else if wd, ok := wr.write.(*writeData); ok {
|
||||
// Encode the frame in the serve goroutine, to ensure we don't have
|
||||
// any lingering asynchronous references to data passed to Write.
|
||||
// See https://go.dev/issue/58446.
|
||||
sc.framer.startWriteDataPadded(wd.streamID, wd.endStream, wd.p, nil)
|
||||
sc.writingFrameAsync = true
|
||||
go sc.writeFrameAsync(wr, wd)
|
||||
} else {
|
||||
sc.writingFrameAsync = true
|
||||
go sc.writeFrameAsync(wr)
|
||||
go sc.writeFrameAsync(wr, nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-3
@@ -460,9 +460,6 @@ func (dialector Dialector) getSchemaIntAndUnitType(field *schema.Field) string {
|
||||
if field.DataType == schema.Uint {
|
||||
sqlType += " unsigned"
|
||||
}
|
||||
if field.NotNull {
|
||||
sqlType += " NOT NULL"
|
||||
}
|
||||
if field.AutoIncrement {
|
||||
sqlType += " AUTO_INCREMENT"
|
||||
}
|
||||
|
||||
+5
-2
@@ -336,8 +336,11 @@ func (m Migrator) AlterColumn(value interface{}, field string) error {
|
||||
|
||||
if uniq, _ := fieldColumnType.Unique(); !uniq && field.Unique {
|
||||
idxName := clause.Column{Name: m.DB.Config.NamingStrategy.IndexName(stmt.Table, field.DBName)}
|
||||
if err := m.DB.Exec("ALTER TABLE ? ADD CONSTRAINT ? UNIQUE(?)", m.CurrentTable(stmt), idxName, clause.Column{Name: field.DBName}).Error; err != nil {
|
||||
return err
|
||||
// Not a unique constraint but a unique index
|
||||
if !m.HasIndex(stmt.Table, idxName.Name) {
|
||||
if err := m.DB.Exec("ALTER TABLE ? ADD CONSTRAINT ? UNIQUE(?)", m.CurrentTable(stmt), idxName, clause.Column{Name: field.DBName}).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -111,6 +111,12 @@ openbsd_amd64:
|
||||
go generate 2>&1 | tee log-generate
|
||||
go build -v ./...
|
||||
#
|
||||
# only on openbsd/386
|
||||
openbsd_386:
|
||||
@echo "Should be executed only on openbsd/386."
|
||||
go generate 2>&1 | tee log-generate
|
||||
go build -v ./...
|
||||
|
||||
# only on openbsd/arm64
|
||||
openbsd_arm64:
|
||||
@echo "Should be executed only on openbsd/arm64."
|
||||
|
||||
+10
-2
@@ -3,13 +3,14 @@
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_CurrentRuneLocale": {},
|
||||
"_DefaultRuneLocale": {},
|
||||
"_C_ctype_": {},
|
||||
"_IO_putc": {},
|
||||
"_ThreadRuneLocale": {},
|
||||
"___errno_location": {},
|
||||
"___runetype": {},
|
||||
"__assert": {},
|
||||
"__assert13": {},
|
||||
"__assert2": {},
|
||||
"__assert_fail": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
@@ -84,6 +85,7 @@ var CAPI = map[string]struct{}{
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__errno": {},
|
||||
"__errno_location": {},
|
||||
"__error": {},
|
||||
"__floatscan": {},
|
||||
@@ -109,6 +111,7 @@ var CAPI = map[string]struct{}{
|
||||
"__lookup_serv": {},
|
||||
"__mb_sb_limit": {},
|
||||
"__runes_for_locale": {},
|
||||
"__sF": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__srget": {},
|
||||
@@ -125,11 +128,14 @@ var CAPI = map[string]struct{}{
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"__xuname": {},
|
||||
"_ctype_": {},
|
||||
"_exit": {},
|
||||
"_longjmp": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"_setjmp": {},
|
||||
"_tolower_tab_": {},
|
||||
"_toupper_tab_": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
@@ -248,6 +254,7 @@ var CAPI = map[string]struct{}{
|
||||
"gethostbyname2_r": {},
|
||||
"gethostname": {},
|
||||
"getnameinfo": {},
|
||||
"getpagesize": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
@@ -279,6 +286,7 @@ var CAPI = map[string]struct{}{
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isblank": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
|
||||
+4
-2
@@ -3,8 +3,7 @@
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_CurrentRuneLocale": {},
|
||||
"_DefaultRuneLocale": {},
|
||||
"_C_ctype_": {},
|
||||
"_IO_putc": {},
|
||||
"_ThreadRuneLocale": {},
|
||||
"___errno_location": {},
|
||||
@@ -50,6 +49,7 @@ var CAPI = map[string]struct{}{
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isblank": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_llabs": {},
|
||||
@@ -129,6 +129,7 @@ var CAPI = map[string]struct{}{
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"__xuname": {},
|
||||
"_ctype_": {},
|
||||
"_exit": {},
|
||||
"_longjmp": {},
|
||||
"_obstack_begin": {},
|
||||
@@ -286,6 +287,7 @@ var CAPI = map[string]struct{}{
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isblank": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
|
||||
+4
-2
@@ -3,8 +3,7 @@
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_CurrentRuneLocale": {},
|
||||
"_DefaultRuneLocale": {},
|
||||
"_C_ctype_": {},
|
||||
"_IO_putc": {},
|
||||
"_ThreadRuneLocale": {},
|
||||
"___errno_location": {},
|
||||
@@ -50,6 +49,7 @@ var CAPI = map[string]struct{}{
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isblank": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_llabs": {},
|
||||
@@ -129,6 +129,7 @@ var CAPI = map[string]struct{}{
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"__xuname": {},
|
||||
"_ctype_": {},
|
||||
"_exit": {},
|
||||
"_longjmp": {},
|
||||
"_obstack_begin": {},
|
||||
@@ -286,6 +287,7 @@ var CAPI = map[string]struct{}{
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isblank": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
|
||||
+16
@@ -363,6 +363,21 @@ var CAPI = map[string]struct{}{
|
||||
"__ms_vswscanf": {},
|
||||
"__ms_vwscanf": {},
|
||||
"__putenv": {},
|
||||
"__stdio_common_vfprintf": {},
|
||||
"__stdio_common_vfprintf_p": {},
|
||||
"__stdio_common_vfprintf_s": {},
|
||||
"__stdio_common_vfscanf": {},
|
||||
"__stdio_common_vfwprintf_s": {},
|
||||
"__stdio_common_vfwscanf": {},
|
||||
"__stdio_common_vsnprintf_s": {},
|
||||
"__stdio_common_vsnwprintf_s": {},
|
||||
"__stdio_common_vsprintf": {},
|
||||
"__stdio_common_vsprintf_p": {},
|
||||
"__stdio_common_vsprintf_s": {},
|
||||
"__stdio_common_vsscanf": {},
|
||||
"__stdio_common_vswprintf": {},
|
||||
"__stdio_common_vswprintf_s": {},
|
||||
"__stdio_common_vswscanf": {},
|
||||
"__strchrnul": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
@@ -386,6 +401,7 @@ var CAPI = map[string]struct{}{
|
||||
"_findfirst64i32": {},
|
||||
"_findnext32": {},
|
||||
"_findnext64i32": {},
|
||||
"_fstat": {},
|
||||
"_fstat64": {},
|
||||
"_fstati64": {},
|
||||
"_ftime": {},
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
|
||||
+1
-1
@@ -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_freebsd_386.go -pkgname errno', DO NOT EDIT.
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_openbsd_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
|
||||
+1
-1
@@ -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_openbsd_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_openbsd_arm64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo errno\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno\errno_windows_386.go -pkgname errno', DO NOT EDIT.
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
|
||||
+120
-120
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
@@ -15,125 +15,125 @@ var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
E2BIG = 7
|
||||
EACCES = 13
|
||||
EADDRINUSE = 48
|
||||
EADDRNOTAVAIL = 49
|
||||
EAFNOSUPPORT = 47
|
||||
EAGAIN = 35
|
||||
EALREADY = 37
|
||||
EAUTH = 80
|
||||
EBADARCH = 86
|
||||
EBADEXEC = 85
|
||||
EBADF = 9
|
||||
EBADMACHO = 88
|
||||
EBADMSG = 94
|
||||
EBADRPC = 72
|
||||
EBUSY = 16
|
||||
ECANCELED = 89
|
||||
ECHILD = 10
|
||||
ECONNABORTED = 53
|
||||
ECONNREFUSED = 61
|
||||
ECONNRESET = 54
|
||||
EDEADLK = 11
|
||||
EDESTADDRREQ = 39
|
||||
EDEVERR = 83
|
||||
EDOM = 33
|
||||
EDQUOT = 69
|
||||
EEXIST = 17
|
||||
EFAULT = 14
|
||||
EFBIG = 27
|
||||
EFTYPE = 79
|
||||
EHOSTDOWN = 64
|
||||
EHOSTUNREACH = 65
|
||||
EIDRM = 90
|
||||
EILSEQ = 92
|
||||
EINPROGRESS = 36
|
||||
EINTR = 4
|
||||
EINVAL = 22
|
||||
EIO = 5
|
||||
EISCONN = 56
|
||||
EISDIR = 21
|
||||
ELAST = 106
|
||||
ELOOP = 62
|
||||
EMFILE = 24
|
||||
EMLINK = 31
|
||||
EMSGSIZE = 40
|
||||
EMULTIHOP = 95
|
||||
ENAMETOOLONG = 63
|
||||
ENEEDAUTH = 81
|
||||
ENETDOWN = 50
|
||||
ENETRESET = 52
|
||||
ENETUNREACH = 51
|
||||
ENFILE = 23
|
||||
ENOATTR = 93
|
||||
ENOBUFS = 55
|
||||
ENODATA = 96
|
||||
ENODEV = 19
|
||||
ENOENT = 2
|
||||
ENOEXEC = 8
|
||||
ENOLCK = 77
|
||||
ENOLINK = 97
|
||||
ENOMEM = 12
|
||||
ENOMSG = 91
|
||||
ENOPOLICY = 103
|
||||
ENOPROTOOPT = 42
|
||||
ENOSPC = 28
|
||||
ENOSR = 98
|
||||
ENOSTR = 99
|
||||
ENOSYS = 78
|
||||
ENOTBLK = 15
|
||||
ENOTCONN = 57
|
||||
ENOTDIR = 20
|
||||
ENOTEMPTY = 66
|
||||
ENOTRECOVERABLE = 104
|
||||
ENOTSOCK = 38
|
||||
ENOTSUP = 45
|
||||
ENOTTY = 25
|
||||
ENXIO = 6
|
||||
EOPNOTSUPP = 102
|
||||
EOVERFLOW = 84
|
||||
EOWNERDEAD = 105
|
||||
EPERM = 1
|
||||
EPFNOSUPPORT = 46
|
||||
EPIPE = 32
|
||||
EPROCLIM = 67
|
||||
EPROCUNAVAIL = 76
|
||||
EPROGMISMATCH = 75
|
||||
EPROGUNAVAIL = 74
|
||||
EPROTO = 100
|
||||
EPROTONOSUPPORT = 43
|
||||
EPROTOTYPE = 41
|
||||
EPWROFF = 82
|
||||
EQFULL = 106
|
||||
ERANGE = 34
|
||||
EREMOTE = 71
|
||||
EROFS = 30
|
||||
ERPCMISMATCH = 73
|
||||
ESHLIBVERS = 87
|
||||
ESHUTDOWN = 58
|
||||
ESOCKTNOSUPPORT = 44
|
||||
ESPIPE = 29
|
||||
ESRCH = 3
|
||||
ESTALE = 70
|
||||
ETIME = 101
|
||||
ETIMEDOUT = 60
|
||||
ETOOMANYREFS = 59
|
||||
ETXTBSY = 26
|
||||
EUSERS = 68
|
||||
EWOULDBLOCK = 35
|
||||
EXDEV = 18
|
||||
X_CDEFS_H_ = 0
|
||||
X_DARWIN_FEATURE_64_BIT_INODE = 1
|
||||
X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1
|
||||
X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3
|
||||
X_ERRNO_T = 0
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_LP64 = 1
|
||||
X_Nonnull = 0
|
||||
X_Null_unspecified = 0
|
||||
X_Nullable = 0
|
||||
X_SYS_ERRNO_H_ = 0
|
||||
E2BIG = 7 // errno.h:94:1:
|
||||
EACCES = 13 // errno.h:101:1:
|
||||
EADDRINUSE = 48 // errno.h:161:1:
|
||||
EADDRNOTAVAIL = 49 // errno.h:162:1:
|
||||
EAFNOSUPPORT = 47 // errno.h:160:1:
|
||||
EAGAIN = 35 // errno.h:129:1:
|
||||
EALREADY = 37 // errno.h:132:1:
|
||||
EAUTH = 80 // errno.h:213:1:
|
||||
EBADARCH = 86 // errno.h:226:1:
|
||||
EBADEXEC = 85 // errno.h:225:1:
|
||||
EBADF = 9 // errno.h:96:1:
|
||||
EBADMACHO = 88 // errno.h:228:1:
|
||||
EBADMSG = 94 // errno.h:240:1:
|
||||
EBADRPC = 72 // errno.h:201:1:
|
||||
EBUSY = 16 // errno.h:106:1:
|
||||
ECANCELED = 89 // errno.h:231:1:
|
||||
ECHILD = 10 // errno.h:97:1:
|
||||
ECONNABORTED = 53 // errno.h:168:1:
|
||||
ECONNREFUSED = 61 // errno.h:178:1:
|
||||
ECONNRESET = 54 // errno.h:169:1:
|
||||
EDEADLK = 11 // errno.h:98:1:
|
||||
EDESTADDRREQ = 39 // errno.h:136:1:
|
||||
EDEVERR = 83 // errno.h:218:1:
|
||||
EDOM = 33 // errno.h:125:1:
|
||||
EDQUOT = 69 // errno.h:195:1:
|
||||
EEXIST = 17 // errno.h:107:1:
|
||||
EFAULT = 14 // errno.h:102:1:
|
||||
EFBIG = 27 // errno.h:117:1:
|
||||
EFTYPE = 79 // errno.h:212:1:
|
||||
EHOSTDOWN = 64 // errno.h:185:1:
|
||||
EHOSTUNREACH = 65 // errno.h:187:1:
|
||||
EIDRM = 90 // errno.h:233:1:
|
||||
EILSEQ = 92 // errno.h:235:1:
|
||||
EINPROGRESS = 36 // errno.h:131:1:
|
||||
EINTR = 4 // errno.h:91:1:
|
||||
EINVAL = 22 // errno.h:112:1:
|
||||
EIO = 5 // errno.h:92:1:
|
||||
EISCONN = 56 // errno.h:171:1:
|
||||
EISDIR = 21 // errno.h:111:1:
|
||||
ELAST = 106 // errno.h:263:1:
|
||||
ELOOP = 62 // errno.h:180:1:
|
||||
EMFILE = 24 // errno.h:114:1:
|
||||
EMLINK = 31 // errno.h:121:1:
|
||||
EMSGSIZE = 40 // errno.h:137:1:
|
||||
EMULTIHOP = 95 // errno.h:241:1:
|
||||
ENAMETOOLONG = 63 // errno.h:181:1:
|
||||
ENEEDAUTH = 81 // errno.h:214:1:
|
||||
ENETDOWN = 50 // errno.h:165:1:
|
||||
ENETRESET = 52 // errno.h:167:1:
|
||||
ENETUNREACH = 51 // errno.h:166:1:
|
||||
ENFILE = 23 // errno.h:113:1:
|
||||
ENOATTR = 93 // errno.h:237:1:
|
||||
ENOBUFS = 55 // errno.h:170:1:
|
||||
ENODATA = 96 // errno.h:242:1:
|
||||
ENODEV = 19 // errno.h:109:1:
|
||||
ENOENT = 2 // errno.h:89:1:
|
||||
ENOEXEC = 8 // errno.h:95:1:
|
||||
ENOLCK = 77 // errno.h:208:1:
|
||||
ENOLINK = 97 // errno.h:243:1:
|
||||
ENOMEM = 12 // errno.h:100:1:
|
||||
ENOMSG = 91 // errno.h:234:1:
|
||||
ENOPOLICY = 103 // errno.h:254:1:
|
||||
ENOPROTOOPT = 42 // errno.h:139:1:
|
||||
ENOSPC = 28 // errno.h:118:1:
|
||||
ENOSR = 98 // errno.h:244:1:
|
||||
ENOSTR = 99 // errno.h:245:1:
|
||||
ENOSYS = 78 // errno.h:209:1:
|
||||
ENOTBLK = 15 // errno.h:104:1:
|
||||
ENOTCONN = 57 // errno.h:172:1:
|
||||
ENOTDIR = 20 // errno.h:110:1:
|
||||
ENOTEMPTY = 66 // errno.h:188:1:
|
||||
ENOTRECOVERABLE = 104 // errno.h:257:1:
|
||||
ENOTSOCK = 38 // errno.h:135:1:
|
||||
ENOTSUP = 45 // errno.h:144:1:
|
||||
ENOTTY = 25 // errno.h:115:1:
|
||||
ENXIO = 6 // errno.h:93:1:
|
||||
EOPNOTSUPP = 102 // errno.h:251:1:
|
||||
EOVERFLOW = 84 // errno.h:221:1:
|
||||
EOWNERDEAD = 105 // errno.h:258:1:
|
||||
EPERM = 1 // errno.h:88:1:
|
||||
EPFNOSUPPORT = 46 // errno.h:158:1:
|
||||
EPIPE = 32 // errno.h:122:1:
|
||||
EPROCLIM = 67 // errno.h:192:1:
|
||||
EPROCUNAVAIL = 76 // errno.h:205:1:
|
||||
EPROGMISMATCH = 75 // errno.h:204:1:
|
||||
EPROGUNAVAIL = 74 // errno.h:203:1:
|
||||
EPROTO = 100 // errno.h:246:1:
|
||||
EPROTONOSUPPORT = 43 // errno.h:140:1:
|
||||
EPROTOTYPE = 41 // errno.h:138:1:
|
||||
EPWROFF = 82 // errno.h:217:1:
|
||||
EQFULL = 106 // errno.h:262:1:
|
||||
ERANGE = 34 // errno.h:126:1:
|
||||
EREMOTE = 71 // errno.h:200:1:
|
||||
EROFS = 30 // errno.h:120:1:
|
||||
ERPCMISMATCH = 73 // errno.h:202:1:
|
||||
ESHLIBVERS = 87 // errno.h:227:1:
|
||||
ESHUTDOWN = 58 // errno.h:174:1:
|
||||
ESOCKTNOSUPPORT = 44 // errno.h:142:1:
|
||||
ESPIPE = 29 // errno.h:119:1:
|
||||
ESRCH = 3 // errno.h:90:1:
|
||||
ESTALE = 70 // errno.h:198:1:
|
||||
ETIME = 101 // errno.h:247:1:
|
||||
ETIMEDOUT = 60 // errno.h:177:1:
|
||||
ETOOMANYREFS = 59 // errno.h:175:1:
|
||||
ETXTBSY = 26 // errno.h:116:1:
|
||||
EUSERS = 68 // errno.h:193:1:
|
||||
EWOULDBLOCK = 35 // errno.h:130:1:
|
||||
EXDEV = 18 // errno.h:108:1:
|
||||
X_CDEFS_H_ = 0 // cdefs.h:68:1:
|
||||
X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1:
|
||||
X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1:
|
||||
X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1:
|
||||
X_ERRNO_T = 0 // _errno_t.h:29:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_Nonnull = 0 // cdefs.h:243:1:
|
||||
X_Null_unspecified = 0 // cdefs.h:246:1:
|
||||
X_Nullable = 0 // cdefs.h:240:1:
|
||||
X_SYS_ERRNO_H_ = 0 // errno.h:70:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
+102
-127
@@ -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_freebsd_386.go -pkgname errno', DO NOT EDIT.
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_openbsd_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
@@ -15,116 +15,110 @@ var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
E2BIG = 7 // errno.h:57:1:
|
||||
EACCES = 13 // errno.h:64:1:
|
||||
EADDRINUSE = 48 // errno.h:112:1:
|
||||
EADDRNOTAVAIL = 49 // errno.h:113:1:
|
||||
EAFNOSUPPORT = 47 // errno.h:111:1:
|
||||
EAGAIN = 35 // errno.h:94:1:
|
||||
EALREADY = 37 // errno.h:98:1:
|
||||
EAUTH = 80 // errno.h:161:1:
|
||||
EBADF = 9 // errno.h:59:1:
|
||||
EBADMSG = 89 // errno.h:173:1:
|
||||
EBADRPC = 72 // errno.h:149:1:
|
||||
EBUSY = 16 // errno.h:69:1:
|
||||
ECANCELED = 85 // errno.h:166:1:
|
||||
ECAPMODE = 94 // errno.h:180:1:
|
||||
ECHILD = 10 // errno.h:60:1:
|
||||
ECONNABORTED = 53 // errno.h:119:1:
|
||||
ECONNREFUSED = 61 // errno.h:127:1:
|
||||
ECONNRESET = 54 // errno.h:120:1:
|
||||
EDEADLK = 11 // errno.h:61:1:
|
||||
EDESTADDRREQ = 39 // errno.h:102:1:
|
||||
EDOM = 33 // errno.h:90:1:
|
||||
EDOOFUS = 88 // errno.h:170:1:
|
||||
EDQUOT = 69 // errno.h:144:1:
|
||||
EEXIST = 17 // errno.h:70:1:
|
||||
EFAULT = 14 // errno.h:65:1:
|
||||
EFBIG = 27 // errno.h:82:1:
|
||||
EFTYPE = 79 // errno.h:160:1:
|
||||
EHOSTDOWN = 64 // errno.h:135:1:
|
||||
EHOSTUNREACH = 65 // errno.h:136:1:
|
||||
EIDRM = 82 // errno.h:163:1:
|
||||
EILSEQ = 86 // errno.h:167:1:
|
||||
EINPROGRESS = 36 // errno.h:97:1:
|
||||
EINTEGRITY = 97 // errno.h:183:1:
|
||||
EINTR = 4 // errno.h:54:1:
|
||||
EINVAL = 22 // errno.h:75:1:
|
||||
EIO = 5 // errno.h:55:1:
|
||||
EISCONN = 56 // errno.h:122:1:
|
||||
EISDIR = 21 // errno.h:74:1:
|
||||
ELAST = 97 // errno.h:187:1:
|
||||
ELOOP = 62 // errno.h:129:1:
|
||||
EMFILE = 24 // errno.h:77:1:
|
||||
EMLINK = 31 // errno.h:86:1:
|
||||
EMSGSIZE = 40 // errno.h:103:1:
|
||||
EMULTIHOP = 90 // errno.h:174:1:
|
||||
ENAMETOOLONG = 63 // errno.h:131:1:
|
||||
ENEEDAUTH = 81 // errno.h:162:1:
|
||||
ENETDOWN = 50 // errno.h:116:1:
|
||||
ENETRESET = 52 // errno.h:118:1:
|
||||
ENETUNREACH = 51 // errno.h:117:1:
|
||||
ENFILE = 23 // errno.h:76:1:
|
||||
ENOATTR = 87 // errno.h:168:1:
|
||||
ENOBUFS = 55 // errno.h:121:1:
|
||||
ENODEV = 19 // errno.h:72:1:
|
||||
ENOENT = 2 // errno.h:52:1:
|
||||
ENOEXEC = 8 // errno.h:58:1:
|
||||
ENOLCK = 77 // errno.h:156:1:
|
||||
ENOLINK = 91 // errno.h:175:1:
|
||||
ENOMEM = 12 // errno.h:63:1:
|
||||
ENOMSG = 83 // errno.h:164:1:
|
||||
ENOPROTOOPT = 42 // errno.h:105:1:
|
||||
ENOSPC = 28 // errno.h:83:1:
|
||||
ENOSYS = 78 // errno.h:157:1:
|
||||
ENOTBLK = 15 // errno.h:67:1:
|
||||
ENOTCAPABLE = 93 // errno.h:179:1:
|
||||
ENOTCONN = 57 // errno.h:123:1:
|
||||
ENOTDIR = 20 // errno.h:73:1:
|
||||
ENOTEMPTY = 66 // errno.h:138:1:
|
||||
ENOTRECOVERABLE = 95 // errno.h:181:1:
|
||||
ENOTSOCK = 38 // errno.h:101:1:
|
||||
ENOTSUP = 45 // errno.h:109:1:
|
||||
ENOTTY = 25 // errno.h:78:1:
|
||||
ENXIO = 6 // errno.h:56:1:
|
||||
EOPNOTSUPP = 45 // errno.h:108:1:
|
||||
EOVERFLOW = 84 // errno.h:165:1:
|
||||
EOWNERDEAD = 96 // errno.h:182:1:
|
||||
EPERM = 1 // errno.h:51:1:
|
||||
EPFNOSUPPORT = 46 // errno.h:110:1:
|
||||
EPIPE = 32 // errno.h:87:1:
|
||||
EPROCLIM = 67 // errno.h:142:1:
|
||||
EPROCUNAVAIL = 76 // errno.h:153:1:
|
||||
EPROGMISMATCH = 75 // errno.h:152:1:
|
||||
EPROGUNAVAIL = 74 // errno.h:151:1:
|
||||
EPROTO = 92 // errno.h:176:1:
|
||||
EPROTONOSUPPORT = 43 // errno.h:106:1:
|
||||
EPROTOTYPE = 41 // errno.h:104:1:
|
||||
ERANGE = 34 // errno.h:91:1:
|
||||
EREMOTE = 71 // errno.h:148:1:
|
||||
EROFS = 30 // errno.h:85:1:
|
||||
ERPCMISMATCH = 73 // errno.h:150:1:
|
||||
ESHUTDOWN = 58 // errno.h:124:1:
|
||||
ESOCKTNOSUPPORT = 44 // errno.h:107:1:
|
||||
ESPIPE = 29 // errno.h:84:1:
|
||||
ESRCH = 3 // errno.h:53:1:
|
||||
ESTALE = 70 // errno.h:147:1:
|
||||
ETIMEDOUT = 60 // errno.h:126:1:
|
||||
ETOOMANYREFS = 59 // errno.h:125:1:
|
||||
ETXTBSY = 26 // errno.h:80:1:
|
||||
EUSERS = 68 // errno.h:143:1:
|
||||
EWOULDBLOCK = 35 // errno.h:96:1:
|
||||
EXDEV = 18 // errno.h:71:1:
|
||||
X_ERRNO_T_DEFINED = 0 // errno.h:203:1:
|
||||
E2BIG = 7 // errno.h:48:1:
|
||||
EACCES = 13 // errno.h:55:1:
|
||||
EADDRINUSE = 48 // errno.h:103:1:
|
||||
EADDRNOTAVAIL = 49 // errno.h:104:1:
|
||||
EAFNOSUPPORT = 47 // errno.h:102:1:
|
||||
EAGAIN = 35 // errno.h:83:1:
|
||||
EALREADY = 37 // errno.h:86:1:
|
||||
EAUTH = 80 // errno.h:155:1:
|
||||
EBADF = 9 // errno.h:50:1:
|
||||
EBADMSG = 92 // errno.h:170:1:
|
||||
EBADRPC = 72 // errno.h:143:1:
|
||||
EBUSY = 16 // errno.h:60:1:
|
||||
ECANCELED = 88 // errno.h:166:1:
|
||||
ECHILD = 10 // errno.h:51:1:
|
||||
ECONNABORTED = 53 // errno.h:110:1:
|
||||
ECONNREFUSED = 61 // errno.h:120:1:
|
||||
ECONNRESET = 54 // errno.h:111:1:
|
||||
EDEADLK = 11 // errno.h:52:1:
|
||||
EDESTADDRREQ = 39 // errno.h:90:1:
|
||||
EDOM = 33 // errno.h:79:1:
|
||||
EDQUOT = 69 // errno.h:137:1:
|
||||
EEXIST = 17 // errno.h:61:1:
|
||||
EFAULT = 14 // errno.h:56:1:
|
||||
EFBIG = 27 // errno.h:71:1:
|
||||
EFTYPE = 79 // errno.h:154:1:
|
||||
EHOSTDOWN = 64 // errno.h:127:1:
|
||||
EHOSTUNREACH = 65 // errno.h:129:1:
|
||||
EIDRM = 89 // errno.h:167:1:
|
||||
EILSEQ = 84 // errno.h:160:1:
|
||||
EINPROGRESS = 36 // errno.h:85:1:
|
||||
EINTR = 4 // errno.h:45:1:
|
||||
EINVAL = 22 // errno.h:66:1:
|
||||
EIO = 5 // errno.h:46:1:
|
||||
EIPSEC = 82 // errno.h:157:1:
|
||||
EISCONN = 56 // errno.h:113:1:
|
||||
EISDIR = 21 // errno.h:65:1:
|
||||
ELAST = 95 // errno.h:175:1:
|
||||
ELOOP = 62 // errno.h:122:1:
|
||||
EMEDIUMTYPE = 86 // errno.h:163:1:
|
||||
EMFILE = 24 // errno.h:68:1:
|
||||
EMLINK = 31 // errno.h:75:1:
|
||||
EMSGSIZE = 40 // errno.h:91:1:
|
||||
ENAMETOOLONG = 63 // errno.h:123:1:
|
||||
ENEEDAUTH = 81 // errno.h:156:1:
|
||||
ENETDOWN = 50 // errno.h:107:1:
|
||||
ENETRESET = 52 // errno.h:109:1:
|
||||
ENETUNREACH = 51 // errno.h:108:1:
|
||||
ENFILE = 23 // errno.h:67:1:
|
||||
ENOATTR = 83 // errno.h:158:1:
|
||||
ENOBUFS = 55 // errno.h:112:1:
|
||||
ENODEV = 19 // errno.h:63:1:
|
||||
ENOENT = 2 // errno.h:43:1:
|
||||
ENOEXEC = 8 // errno.h:49:1:
|
||||
ENOLCK = 77 // errno.h:150:1:
|
||||
ENOMEDIUM = 85 // errno.h:162:1:
|
||||
ENOMEM = 12 // errno.h:54:1:
|
||||
ENOMSG = 90 // errno.h:168:1:
|
||||
ENOPROTOOPT = 42 // errno.h:93:1:
|
||||
ENOSPC = 28 // errno.h:72:1:
|
||||
ENOSYS = 78 // errno.h:151:1:
|
||||
ENOTBLK = 15 // errno.h:58:1:
|
||||
ENOTCONN = 57 // errno.h:114:1:
|
||||
ENOTDIR = 20 // errno.h:64:1:
|
||||
ENOTEMPTY = 66 // errno.h:130:1:
|
||||
ENOTRECOVERABLE = 93 // errno.h:171:1:
|
||||
ENOTSOCK = 38 // errno.h:89:1:
|
||||
ENOTSUP = 91 // errno.h:169:1:
|
||||
ENOTTY = 25 // errno.h:69:1:
|
||||
ENXIO = 6 // errno.h:47:1:
|
||||
EOPNOTSUPP = 45 // errno.h:98:1:
|
||||
EOVERFLOW = 87 // errno.h:165:1:
|
||||
EOWNERDEAD = 94 // errno.h:172:1:
|
||||
EPERM = 1 // errno.h:42:1:
|
||||
EPFNOSUPPORT = 46 // errno.h:100:1:
|
||||
EPIPE = 32 // errno.h:76:1:
|
||||
EPROCLIM = 67 // errno.h:134:1:
|
||||
EPROCUNAVAIL = 76 // errno.h:147:1:
|
||||
EPROGMISMATCH = 75 // errno.h:146:1:
|
||||
EPROGUNAVAIL = 74 // errno.h:145:1:
|
||||
EPROTO = 95 // errno.h:173:1:
|
||||
EPROTONOSUPPORT = 43 // errno.h:94:1:
|
||||
EPROTOTYPE = 41 // errno.h:92:1:
|
||||
ERANGE = 34 // errno.h:80:1:
|
||||
EREMOTE = 71 // errno.h:142:1:
|
||||
EROFS = 30 // errno.h:74:1:
|
||||
ERPCMISMATCH = 73 // errno.h:144:1:
|
||||
ESHUTDOWN = 58 // errno.h:116:1:
|
||||
ESOCKTNOSUPPORT = 44 // errno.h:96:1:
|
||||
ESPIPE = 29 // errno.h:73:1:
|
||||
ESRCH = 3 // errno.h:44:1:
|
||||
ESTALE = 70 // errno.h:140:1:
|
||||
ETIMEDOUT = 60 // errno.h:119:1:
|
||||
ETOOMANYREFS = 59 // errno.h:117:1:
|
||||
ETXTBSY = 26 // errno.h:70:1:
|
||||
EUSERS = 68 // errno.h:135:1:
|
||||
EWOULDBLOCK = 35 // errno.h:84:1:
|
||||
EXDEV = 18 // errno.h:62:1:
|
||||
X_ERRNO_H_ = 0 // errno.h:40:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_ILP32 = 1 // <predefined>:1:1:
|
||||
X_Nonnull = 0 // cdefs.h:790:1:
|
||||
X_Null_unspecified = 0 // cdefs.h:792:1:
|
||||
X_Nullable = 0 // cdefs.h:791:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_ERRNO_H_ = 0 // errno.h:41:1:
|
||||
I386 = 1 // <predefined>:335:1:
|
||||
Unix = 1 // <predefined>:336:1:
|
||||
I386 = 1 // <predefined>:339:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
@@ -136,23 +130,4 @@ type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// 11 was EAGAIN
|
||||
|
||||
// math software
|
||||
|
||||
// non-blocking and interrupt i/o
|
||||
|
||||
// ipc/network software -- argument errors
|
||||
|
||||
// ipc/network software -- operational errors
|
||||
|
||||
// should be rearranged
|
||||
|
||||
// quotas & mush
|
||||
|
||||
// Network File System
|
||||
|
||||
// ISO/IEC 9899:2011 K.3.2.2
|
||||
type Errno_t = int32 /* errno.h:204:13 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
||||
+1
-1
@@ -118,7 +118,7 @@ const (
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
|
||||
X_RET_PROTECTOR = 1 // <predefined>:2:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
Unix = 1 // <predefined>:344:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
+3
-3
@@ -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_openbsd_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_openbsd_arm64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
@@ -115,10 +115,10 @@ const (
|
||||
X_ERRNO_H_ = 0 // errno.h:40:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1:
|
||||
X_RET_PROTECTOR = 1 // <predefined>:2:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
Unix = 1 // <predefined>:360:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
+196
-183
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo errno\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno\errno_windows_386.go -pkgname errno', DO NOT EDIT.
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
@@ -15,168 +15,168 @@ var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
DUMMYSTRUCTNAME = 0
|
||||
DUMMYSTRUCTNAME1 = 0
|
||||
DUMMYSTRUCTNAME2 = 0
|
||||
DUMMYSTRUCTNAME3 = 0
|
||||
DUMMYSTRUCTNAME4 = 0
|
||||
DUMMYSTRUCTNAME5 = 0
|
||||
DUMMYUNIONNAME = 0
|
||||
DUMMYUNIONNAME1 = 0
|
||||
DUMMYUNIONNAME2 = 0
|
||||
DUMMYUNIONNAME3 = 0
|
||||
DUMMYUNIONNAME4 = 0
|
||||
DUMMYUNIONNAME5 = 0
|
||||
DUMMYUNIONNAME6 = 0
|
||||
DUMMYUNIONNAME7 = 0
|
||||
DUMMYUNIONNAME8 = 0
|
||||
DUMMYUNIONNAME9 = 0
|
||||
E2BIG = 7
|
||||
EACCES = 13
|
||||
EADDRINUSE = 100
|
||||
EADDRNOTAVAIL = 101
|
||||
EAFNOSUPPORT = 102
|
||||
EAGAIN = 11
|
||||
EALREADY = 103
|
||||
EBADF = 9
|
||||
EBADMSG = 104
|
||||
EBUSY = 16
|
||||
ECANCELED = 105
|
||||
ECHILD = 10
|
||||
ECONNABORTED = 106
|
||||
ECONNREFUSED = 107
|
||||
ECONNRESET = 108
|
||||
EDEADLK = 36
|
||||
EDEADLOCK = 36
|
||||
EDESTADDRREQ = 109
|
||||
EDOM = 33
|
||||
EEXIST = 17
|
||||
EFAULT = 14
|
||||
EFBIG = 27
|
||||
EHOSTUNREACH = 110
|
||||
EIDRM = 111
|
||||
EILSEQ = 42
|
||||
EINPROGRESS = 112
|
||||
EINTR = 4
|
||||
EINVAL = 22
|
||||
EIO = 5
|
||||
EISCONN = 113
|
||||
EISDIR = 21
|
||||
ELOOP = 114
|
||||
EMFILE = 24
|
||||
EMLINK = 31
|
||||
EMSGSIZE = 115
|
||||
ENAMETOOLONG = 38
|
||||
ENETDOWN = 116
|
||||
ENETRESET = 117
|
||||
ENETUNREACH = 118
|
||||
ENFILE = 23
|
||||
ENOBUFS = 119
|
||||
ENODATA = 120
|
||||
ENODEV = 19
|
||||
ENOENT = 2
|
||||
ENOEXEC = 8
|
||||
ENOFILE = 2
|
||||
ENOLCK = 39
|
||||
ENOLINK = 121
|
||||
ENOMEM = 12
|
||||
ENOMSG = 122
|
||||
ENOPROTOOPT = 123
|
||||
ENOSPC = 28
|
||||
ENOSR = 124
|
||||
ENOSTR = 125
|
||||
ENOSYS = 40
|
||||
ENOTCONN = 126
|
||||
ENOTDIR = 20
|
||||
ENOTEMPTY = 41
|
||||
ENOTRECOVERABLE = 127
|
||||
ENOTSOCK = 128
|
||||
ENOTSUP = 129
|
||||
ENOTTY = 25
|
||||
ENXIO = 6
|
||||
EOPNOTSUPP = 130
|
||||
EOVERFLOW = 132
|
||||
EOWNERDEAD = 133
|
||||
EPERM = 1
|
||||
EPIPE = 32
|
||||
EPROTO = 134
|
||||
EPROTONOSUPPORT = 135
|
||||
EPROTOTYPE = 136
|
||||
ERANGE = 34
|
||||
EROFS = 30
|
||||
ESPIPE = 29
|
||||
ESRCH = 3
|
||||
ETIME = 137
|
||||
ETIMEDOUT = 138
|
||||
ETXTBSY = 139
|
||||
EWOULDBLOCK = 140
|
||||
EXDEV = 18
|
||||
MINGW_DDK_H = 0
|
||||
MINGW_DDRAW_VERSION = 7
|
||||
MINGW_HAS_DDK_H = 1
|
||||
MINGW_HAS_DDRAW_H = 1
|
||||
MINGW_HAS_SECURE_API = 1
|
||||
MINGW_SDK_INIT = 0
|
||||
STRUNCATE = 80
|
||||
UNALIGNED = 0
|
||||
USE___UUIDOF = 0
|
||||
WIN32 = 1
|
||||
WINNT = 1
|
||||
X_AGLOBAL = 0
|
||||
X_ANONYMOUS_STRUCT = 0
|
||||
X_ANONYMOUS_UNION = 0
|
||||
X_ARGMAX = 100
|
||||
X_CONST_RETURN = 0
|
||||
X_CRTNOALIAS = 0
|
||||
X_CRTRESTRICT = 0
|
||||
X_CRT_ALTERNATIVE_IMPORTED = 0
|
||||
X_CRT_ERRNO_DEFINED = 0
|
||||
X_CRT_MANAGED_HEAP_DEPRECATE = 0
|
||||
X_CRT_PACKING = 8
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0
|
||||
X_DLL = 0
|
||||
X_ERRCODE_DEFINED = 0
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_INC_CRTDEFS = 0
|
||||
X_INC_CRTDEFS_MACRO = 0
|
||||
X_INC_ERRNO = 0
|
||||
X_INC_MINGW_SECAPI = 0
|
||||
X_INC_VADEFS = 0
|
||||
X_INC__MINGW_H = 0
|
||||
X_INT128_DEFINED = 0
|
||||
X_INTEGRAL_MAX_BITS = 64
|
||||
X_INTPTR_T_DEFINED = 0
|
||||
X_MT = 0
|
||||
X_M_IX86 = 600
|
||||
X_PGLOBAL = 0
|
||||
X_PTRDIFF_T_ = 0
|
||||
X_PTRDIFF_T_DEFINED = 0
|
||||
X_REENTRANT = 1
|
||||
X_RSIZE_T_DEFINED = 0
|
||||
X_SECURECRT_ERRCODE_VALUES_DEFINED = 0
|
||||
X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD
|
||||
X_SIZE_T_DEFINED = 0
|
||||
X_SSIZE_T_DEFINED = 0
|
||||
X_TAGLC_ID_DEFINED = 0
|
||||
X_THREADLOCALEINFO = 0
|
||||
X_TIME32_T_DEFINED = 0
|
||||
X_TIME64_T_DEFINED = 0
|
||||
X_TIME_T_DEFINED = 0
|
||||
X_UINTPTR_T_DEFINED = 0
|
||||
X_USE_32BIT_TIME_T = 0
|
||||
X_VA_LIST_DEFINED = 0
|
||||
X_W64 = 0
|
||||
X_WCHAR_T_DEFINED = 0
|
||||
X_WCTYPE_T_DEFINED = 0
|
||||
X_WIN32 = 1
|
||||
X_WIN32_WINNT = 0x502
|
||||
X_WINT_T = 0
|
||||
X_X86_ = 1
|
||||
I386 = 1
|
||||
DUMMYSTRUCTNAME = 0 // _mingw.h:519:1:
|
||||
DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1:
|
||||
DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1:
|
||||
DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1:
|
||||
DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1:
|
||||
DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1:
|
||||
DUMMYUNIONNAME = 0 // _mingw.h:497:1:
|
||||
DUMMYUNIONNAME1 = 0 // _mingw.h:498:1:
|
||||
DUMMYUNIONNAME2 = 0 // _mingw.h:499:1:
|
||||
DUMMYUNIONNAME3 = 0 // _mingw.h:500:1:
|
||||
DUMMYUNIONNAME4 = 0 // _mingw.h:501:1:
|
||||
DUMMYUNIONNAME5 = 0 // _mingw.h:502:1:
|
||||
DUMMYUNIONNAME6 = 0 // _mingw.h:503:1:
|
||||
DUMMYUNIONNAME7 = 0 // _mingw.h:504:1:
|
||||
DUMMYUNIONNAME8 = 0 // _mingw.h:505:1:
|
||||
DUMMYUNIONNAME9 = 0 // _mingw.h:506:1:
|
||||
E2BIG = 7 // errno.h:31:1:
|
||||
EACCES = 13 // errno.h:37:1:
|
||||
EADDRINUSE = 100 // errno.h:86:1:
|
||||
EADDRNOTAVAIL = 101 // errno.h:90:1:
|
||||
EAFNOSUPPORT = 102 // errno.h:82:1:
|
||||
EAGAIN = 11 // errno.h:35:1:
|
||||
EALREADY = 103 // errno.h:106:1:
|
||||
EBADF = 9 // errno.h:33:1:
|
||||
EBADMSG = 104 // errno.h:182:1:
|
||||
EBUSY = 16 // errno.h:39:1:
|
||||
ECANCELED = 105 // errno.h:154:1:
|
||||
ECHILD = 10 // errno.h:34:1:
|
||||
ECONNABORTED = 106 // errno.h:102:1:
|
||||
ECONNREFUSED = 107 // errno.h:110:1:
|
||||
ECONNRESET = 108 // errno.h:114:1:
|
||||
EDEADLK = 36 // errno.h:55:1:
|
||||
EDEADLOCK = 36 // errno.h:71:1:
|
||||
EDESTADDRREQ = 109 // errno.h:118:1:
|
||||
EDOM = 33 // errno.h:54:1:
|
||||
EEXIST = 17 // errno.h:40:1:
|
||||
EFAULT = 14 // errno.h:38:1:
|
||||
EFBIG = 27 // errno.h:48:1:
|
||||
EHOSTUNREACH = 110 // errno.h:122:1:
|
||||
EIDRM = 111 // errno.h:186:1:
|
||||
EILSEQ = 42 // errno.h:66:1:
|
||||
EINPROGRESS = 112 // errno.h:158:1:
|
||||
EINTR = 4 // errno.h:28:1:
|
||||
EINVAL = 22 // errno.h:64:1:
|
||||
EIO = 5 // errno.h:29:1:
|
||||
EISCONN = 113 // errno.h:94:1:
|
||||
EISDIR = 21 // errno.h:44:1:
|
||||
ELOOP = 114 // errno.h:227:1:
|
||||
EMFILE = 24 // errno.h:46:1:
|
||||
EMLINK = 31 // errno.h:52:1:
|
||||
EMSGSIZE = 115 // errno.h:126:1:
|
||||
ENAMETOOLONG = 38 // errno.h:56:1:
|
||||
ENETDOWN = 116 // errno.h:130:1:
|
||||
ENETRESET = 117 // errno.h:134:1:
|
||||
ENETUNREACH = 118 // errno.h:138:1:
|
||||
ENFILE = 23 // errno.h:45:1:
|
||||
ENOBUFS = 119 // errno.h:98:1:
|
||||
ENODATA = 120 // errno.h:190:1:
|
||||
ENODEV = 19 // errno.h:42:1:
|
||||
ENOENT = 2 // errno.h:25:1:
|
||||
ENOEXEC = 8 // errno.h:32:1:
|
||||
ENOFILE = 2 // errno.h:26:1:
|
||||
ENOLCK = 39 // errno.h:57:1:
|
||||
ENOLINK = 121 // errno.h:194:1:
|
||||
ENOMEM = 12 // errno.h:36:1:
|
||||
ENOMSG = 122 // errno.h:198:1:
|
||||
ENOPROTOOPT = 123 // errno.h:142:1:
|
||||
ENOSPC = 28 // errno.h:49:1:
|
||||
ENOSR = 124 // errno.h:202:1:
|
||||
ENOSTR = 125 // errno.h:206:1:
|
||||
ENOSYS = 40 // errno.h:58:1:
|
||||
ENOTCONN = 126 // errno.h:150:1:
|
||||
ENOTDIR = 20 // errno.h:43:1:
|
||||
ENOTEMPTY = 41 // errno.h:59:1:
|
||||
ENOTRECOVERABLE = 127 // errno.h:210:1:
|
||||
ENOTSOCK = 128 // errno.h:146:1:
|
||||
ENOTSUP = 129 // errno.h:76:1:
|
||||
ENOTTY = 25 // errno.h:47:1:
|
||||
ENXIO = 6 // errno.h:30:1:
|
||||
EOPNOTSUPP = 130 // errno.h:162:1:
|
||||
EOVERFLOW = 132 // errno.h:235:1:
|
||||
EOWNERDEAD = 133 // errno.h:170:1:
|
||||
EPERM = 1 // errno.h:24:1:
|
||||
EPIPE = 32 // errno.h:53:1:
|
||||
EPROTO = 134 // errno.h:174:1:
|
||||
EPROTONOSUPPORT = 135 // errno.h:178:1:
|
||||
EPROTOTYPE = 136 // errno.h:231:1:
|
||||
ERANGE = 34 // errno.h:65:1:
|
||||
EROFS = 30 // errno.h:51:1:
|
||||
ESPIPE = 29 // errno.h:50:1:
|
||||
ESRCH = 3 // errno.h:27:1:
|
||||
ETIME = 137 // errno.h:214:1:
|
||||
ETIMEDOUT = 138 // errno.h:223:1:
|
||||
ETXTBSY = 139 // errno.h:218:1:
|
||||
EWOULDBLOCK = 140 // errno.h:166:1:
|
||||
EXDEV = 18 // errno.h:41:1:
|
||||
MINGW_DDK_H = 0 // _mingw_ddk.h:2:1:
|
||||
MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1:
|
||||
MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1:
|
||||
MINGW_SDK_INIT = 0 // _mingw.h:598:1:
|
||||
STRUNCATE = 80 // errno.h:67:1:
|
||||
UNALIGNED = 0 // _mingw.h:384:1:
|
||||
USE___UUIDOF = 0 // _mingw.h:77:1:
|
||||
WIN32 = 1 // <predefined>:258:1:
|
||||
WINNT = 1 // <predefined>:306:1:
|
||||
X_AGLOBAL = 0 // _mingw.h:346:1:
|
||||
X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1:
|
||||
X_ANONYMOUS_UNION = 0 // _mingw.h:473:1:
|
||||
X_ARGMAX = 100 // _mingw.h:402:1:
|
||||
X_CONST_RETURN = 0 // _mingw.h:377:1:
|
||||
X_CRTNOALIAS = 0 // corecrt.h:29:1:
|
||||
X_CRTRESTRICT = 0 // corecrt.h:33:1:
|
||||
X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1:
|
||||
X_CRT_ERRNO_DEFINED = 0 // errno.h:16:1:
|
||||
X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1:
|
||||
X_CRT_PACKING = 8 // corecrt.h:14:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1:
|
||||
X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1:
|
||||
X_DLL = 0 // _mingw.h:326:1:
|
||||
X_ERRCODE_DEFINED = 0 // corecrt.h:117:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_ILP32 = 1 // <predefined>:211:1:
|
||||
X_INC_CORECRT = 0 // corecrt.h:8:1:
|
||||
X_INC_CRTDEFS = 0 // crtdefs.h:8:1:
|
||||
X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1:
|
||||
X_INC_ERRNO = 0 // errno.h:7:1:
|
||||
X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1:
|
||||
X_INC_VADEFS = 0 // vadefs.h:7:1:
|
||||
X_INC__MINGW_H = 0 // _mingw.h:8:1:
|
||||
X_INT128_DEFINED = 0 // _mingw.h:237:1:
|
||||
X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1:
|
||||
X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1:
|
||||
X_MT = 0 // _mingw.h:330:1:
|
||||
X_M_IX86 = 600 // _mingw_mac.h:54:1:
|
||||
X_PGLOBAL = 0 // _mingw.h:342:1:
|
||||
X_PTRDIFF_T_ = 0 // corecrt.h:90:1:
|
||||
X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1:
|
||||
X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1:
|
||||
X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 // errno.h:63:1:
|
||||
X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1:
|
||||
X_SIZE_T_DEFINED = 0 // corecrt.h:37:1:
|
||||
X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1:
|
||||
X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1:
|
||||
X_THREADLOCALEINFO = 0 // corecrt.h:456:1:
|
||||
X_TIME32_T_DEFINED = 0 // corecrt.h:122:1:
|
||||
X_TIME64_T_DEFINED = 0 // corecrt.h:127:1:
|
||||
X_TIME_T_DEFINED = 0 // corecrt.h:139:1:
|
||||
X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1:
|
||||
X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1:
|
||||
X_VA_LIST_DEFINED = 0 // <builtin>:55:1:
|
||||
X_W64 = 0 // _mingw.h:296:1:
|
||||
X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1:
|
||||
X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1:
|
||||
X_WIN32 = 1 // <predefined>:164:1:
|
||||
X_WIN32_WINNT = 0x502 // _mingw.h:233:1:
|
||||
X_WINT_T = 0 // corecrt.h:110:1:
|
||||
X_X86_ = 1 // <predefined>:169:1:
|
||||
I386 = 1 // <predefined>:171:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
@@ -210,6 +210,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// This macro holds an monotonic increasing value, which indicates
|
||||
// a specific fix/patch is present on trunk. This value isn't related to
|
||||
// minor/major version-macros. It is increased on demand, if a big
|
||||
@@ -230,6 +235,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
// MinGW-w64 has some additional C99 printf/scanf feature support.
|
||||
// So we add some helper macros to ease recognition of them.
|
||||
|
||||
// If _FORTIFY_SOURCE is enabled, some inline functions may use
|
||||
// __builtin_va_arg_pack(). GCC may report an error if the address
|
||||
// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case.
|
||||
|
||||
// Enable workaround for ABI incompatibility on affected platforms
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
@@ -270,26 +281,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// for backward compatibility
|
||||
|
||||
type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
|
||||
|
||||
type Ssize_t = int32 /* crtdefs.h:47:13 */
|
||||
type Ssize_t = int32 /* corecrt.h:52:13 */
|
||||
|
||||
type Rsize_t = Size_t /* crtdefs.h:52:16 */
|
||||
type Rsize_t = Size_t /* corecrt.h:57:16 */
|
||||
|
||||
type Intptr_t = int32 /* crtdefs.h:64:13 */
|
||||
type Intptr_t = int32 /* corecrt.h:69:13 */
|
||||
|
||||
type Uintptr_t = uint32 /* crtdefs.h:77:22 */
|
||||
type Uintptr_t = uint32 /* corecrt.h:82:22 */
|
||||
|
||||
type Wint_t = uint16 /* crtdefs.h:106:24 */
|
||||
type Wctype_t = uint16 /* crtdefs.h:107:24 */
|
||||
type Wint_t = uint16 /* corecrt.h:111:24 */
|
||||
type Wctype_t = uint16 /* corecrt.h:112:24 */
|
||||
|
||||
type Errno_t = int32 /* crtdefs.h:113:13 */
|
||||
type Errno_t = int32 /* corecrt.h:118:13 */
|
||||
|
||||
type X__time32_t = int32 /* crtdefs.h:118:14 */
|
||||
type X__time32_t = int32 /* corecrt.h:123:14 */
|
||||
|
||||
type X__time64_t = int64 /* crtdefs.h:123:35 */
|
||||
type X__time64_t = int64 /* corecrt.h:128:35 */
|
||||
|
||||
type Time_t = X__time32_t /* crtdefs.h:136:20 */
|
||||
type Time_t = X__time32_t /* corecrt.h:141:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
Frefcount int32
|
||||
@@ -315,29 +328,29 @@ type Threadlocaleinfostruct = struct {
|
||||
Fpclmap uintptr
|
||||
Fpcumap uintptr
|
||||
Flc_time_curr uintptr
|
||||
} /* crtdefs.h:422:1 */
|
||||
} /* corecrt.h:435:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
|
||||
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
|
||||
type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */
|
||||
type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* crtdefs.h:428:9 */
|
||||
} /* corecrt.h:441:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */
|
||||
type X_locale_t = uintptr /* crtdefs.h:431:19 */
|
||||
type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */
|
||||
type X_locale_t = uintptr /* corecrt.h:444:19 */
|
||||
|
||||
type TagLC_ID = struct {
|
||||
FwLanguage uint16
|
||||
FwCountry uint16
|
||||
FwCodePage uint16
|
||||
} /* crtdefs.h:422:1 */
|
||||
} /* corecrt.h:435:1 */
|
||||
|
||||
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
|
||||
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
|
||||
type LC_ID = TagLC_ID /* corecrt.h:452:3 */
|
||||
type LPLC_ID = uintptr /* corecrt.h:452:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */
|
||||
|
||||
// Posix thread extensions.
|
||||
|
||||
|
||||
+2
@@ -212,6 +212,8 @@ func (t *TLS) Close() {
|
||||
|
||||
atomic.AddInt32(&tlsBalance, -1)
|
||||
}
|
||||
t.pthreadData.close(t)
|
||||
*t = TLS{}
|
||||
}
|
||||
|
||||
// Alloc allocates n bytes of thread-local storage. It must be paired with a
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
|
||||
+1
-1
@@ -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_freebsd_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_openbsd_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
|
||||
+1
-1
@@ -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_openbsd_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_openbsd_arm64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo fcntl\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl\fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
|
||||
+172
-172
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
@@ -15,177 +15,177 @@ var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
AT_EACCESS = 0x0010
|
||||
AT_FDCWD = -2
|
||||
AT_FDONLY = 0x0400
|
||||
AT_REALDEV = 0x0200
|
||||
AT_REMOVEDIR = 0x0080
|
||||
AT_SYMLINK_FOLLOW = 0x0040
|
||||
AT_SYMLINK_NOFOLLOW = 0x0020
|
||||
CPF_IGNORE_MODE = 0x0002
|
||||
CPF_MASK = 3
|
||||
CPF_OVERWRITE = 0x0001
|
||||
FAPPEND = 8
|
||||
FASYNC = 64
|
||||
FCNTL_FS_SPECIFIC_BASE = 0x00010000
|
||||
FD_CLOEXEC = 1
|
||||
FFDSYNC = 4194304
|
||||
FFSYNC = 128
|
||||
FNDELAY = 4
|
||||
FNONBLOCK = 4
|
||||
FREAD = 0x0001
|
||||
FWRITE = 0x0002
|
||||
F_ADDFILESIGS = 61
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 83
|
||||
F_ADDFILESIGS_RETURN = 97
|
||||
F_ADDSIGS = 59
|
||||
F_ALLOCATEALL = 0x00000004
|
||||
F_ALLOCATECONTIG = 0x00000002
|
||||
F_BARRIERFSYNC = 85
|
||||
F_CHECK_LV = 98
|
||||
F_CHKCLEAN = 41
|
||||
F_DUPFD = 0
|
||||
F_DUPFD_CLOEXEC = 67
|
||||
F_FINDSIGS = 78
|
||||
F_FLUSH_DATA = 40
|
||||
F_FREEZE_FS = 53
|
||||
F_FULLFSYNC = 51
|
||||
F_GETCODEDIR = 72
|
||||
F_GETFD = 1
|
||||
F_GETFL = 3
|
||||
F_GETLK = 7
|
||||
F_GETLKPID = 66
|
||||
F_GETNOSIGPIPE = 74
|
||||
F_GETOWN = 5
|
||||
F_GETPATH = 50
|
||||
F_GETPATH_MTMINFO = 71
|
||||
F_GETPATH_NOFIRMLINK = 102
|
||||
F_GETPROTECTIONCLASS = 63
|
||||
F_GETPROTECTIONLEVEL = 77
|
||||
F_GLOBAL_NOCACHE = 55
|
||||
F_LOG2PHYS = 49
|
||||
F_LOG2PHYS_EXT = 65
|
||||
F_NOCACHE = 48
|
||||
F_NODIRECT = 62
|
||||
F_PATHPKG_CHECK = 52
|
||||
F_PEOFPOSMODE = 3
|
||||
F_PREALLOCATE = 42
|
||||
F_PUNCHHOLE = 99
|
||||
F_RDADVISE = 44
|
||||
F_RDAHEAD = 45
|
||||
F_RDLCK = 1
|
||||
F_SETBACKINGSTORE = 70
|
||||
F_SETFD = 2
|
||||
F_SETFL = 4
|
||||
F_SETLK = 8
|
||||
F_SETLKW = 9
|
||||
F_SETLKWTIMEOUT = 10
|
||||
F_SETNOSIGPIPE = 73
|
||||
F_SETOWN = 6
|
||||
F_SETPROTECTIONCLASS = 64
|
||||
F_SETSIZE = 43
|
||||
F_SINGLE_WRITER = 76
|
||||
F_SPECULATIVE_READ = 101
|
||||
F_THAW_FS = 54
|
||||
F_TRANSCODEKEY = 75
|
||||
F_TRIM_ACTIVE_FILE = 100
|
||||
F_UNLCK = 2
|
||||
F_VOLPOSMODE = 4
|
||||
F_WRLCK = 3
|
||||
LOCK_EX = 0x02
|
||||
LOCK_NB = 0x04
|
||||
LOCK_SH = 0x01
|
||||
LOCK_UN = 0x08
|
||||
O_ACCMODE = 0x0003
|
||||
O_ALERT = 0x20000000
|
||||
O_APPEND = 0x0008
|
||||
O_ASYNC = 0x0040
|
||||
O_CLOEXEC = 0x1000000
|
||||
O_CREAT = 0x0200
|
||||
O_DIRECTORY = 0x100000
|
||||
O_DP_GETRAWENCRYPTED = 0x0001
|
||||
O_DP_GETRAWUNENCRYPTED = 0x0002
|
||||
O_DSYNC = 0x400000
|
||||
O_EVTONLY = 0x8000
|
||||
O_EXCL = 0x0800
|
||||
O_EXLOCK = 0x0020
|
||||
O_FSYNC = 128
|
||||
O_NDELAY = 4
|
||||
O_NOCTTY = 0x20000
|
||||
O_NOFOLLOW = 0x0100
|
||||
O_NONBLOCK = 0x0004
|
||||
O_POPUP = 0x80000000
|
||||
O_RDONLY = 0x0000
|
||||
O_RDWR = 0x0002
|
||||
O_SHLOCK = 0x0010
|
||||
O_SYMLINK = 0x200000
|
||||
O_SYNC = 0x0080
|
||||
O_TRUNC = 0x0400
|
||||
O_WRONLY = 0x0001
|
||||
SEEK_CUR = 1
|
||||
SEEK_DATA = 4
|
||||
SEEK_END = 2
|
||||
SEEK_HOLE = 3
|
||||
SEEK_SET = 0
|
||||
S_IEXEC = 64
|
||||
S_IFBLK = 0060000
|
||||
S_IFCHR = 0020000
|
||||
S_IFDIR = 0040000
|
||||
S_IFIFO = 0010000
|
||||
S_IFLNK = 0120000
|
||||
S_IFMT = 0170000
|
||||
S_IFREG = 0100000
|
||||
S_IFSOCK = 0140000
|
||||
S_IFWHT = 0160000
|
||||
S_IREAD = 256
|
||||
S_IRGRP = 0000040
|
||||
S_IROTH = 0000004
|
||||
S_IRUSR = 0000400
|
||||
S_IRWXG = 0000070
|
||||
S_IRWXO = 0000007
|
||||
S_IRWXU = 0000700
|
||||
S_ISGID = 0002000
|
||||
S_ISTXT = 512
|
||||
S_ISUID = 0004000
|
||||
S_ISVTX = 0001000
|
||||
S_IWGRP = 0000020
|
||||
S_IWOTH = 0000002
|
||||
S_IWRITE = 128
|
||||
S_IWUSR = 0000200
|
||||
S_IXGRP = 0000010
|
||||
S_IXOTH = 0000001
|
||||
S_IXUSR = 0000100
|
||||
X_BSD_I386__TYPES_H_ = 0
|
||||
X_BSD_MACHINE_TYPES_H_ = 0
|
||||
X_BSD_MACHINE__TYPES_H_ = 0
|
||||
X_CDEFS_H_ = 0
|
||||
X_DARWIN_FEATURE_64_BIT_INODE = 1
|
||||
X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1
|
||||
X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3
|
||||
X_FILESEC_T = 0
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_INT16_T = 0
|
||||
X_INT32_T = 0
|
||||
X_INT64_T = 0
|
||||
X_INT8_T = 0
|
||||
X_INTPTR_T = 0
|
||||
X_LP64 = 1
|
||||
X_MACHTYPES_H_ = 0
|
||||
X_MODE_T = 0
|
||||
X_Nonnull = 0
|
||||
X_Null_unspecified = 0
|
||||
X_Nullable = 0
|
||||
X_OFF_T = 0
|
||||
X_PID_T = 0
|
||||
X_SIZE_T = 0
|
||||
X_SYS_FCNTL_H_ = 0
|
||||
X_SYS__PTHREAD_TYPES_H_ = 0
|
||||
X_SYS__TYPES_H_ = 0
|
||||
X_UINTPTR_T = 0
|
||||
X_U_INT16_T = 0
|
||||
X_U_INT32_T = 0
|
||||
X_U_INT64_T = 0
|
||||
X_U_INT8_T = 0
|
||||
AT_EACCESS = 0x0010 // fcntl.h:138:1:
|
||||
AT_FDCWD = -2 // fcntl.h:133:1:
|
||||
AT_FDONLY = 0x0400 // fcntl.h:144:1:
|
||||
AT_REALDEV = 0x0200 // fcntl.h:143:1:
|
||||
AT_REMOVEDIR = 0x0080 // fcntl.h:141:1:
|
||||
AT_SYMLINK_FOLLOW = 0x0040 // fcntl.h:140:1:
|
||||
AT_SYMLINK_NOFOLLOW = 0x0020 // fcntl.h:139:1:
|
||||
CPF_IGNORE_MODE = 0x0002 // fcntl.h:201:1:
|
||||
CPF_MASK = 3 // fcntl.h:202:1:
|
||||
CPF_OVERWRITE = 0x0001 // fcntl.h:200:1:
|
||||
FAPPEND = 8 // fcntl.h:186:1:
|
||||
FASYNC = 64 // fcntl.h:187:1:
|
||||
FCNTL_FS_SPECIFIC_BASE = 0x00010000 // fcntl.h:297:1:
|
||||
FD_CLOEXEC = 1 // fcntl.h:306:1:
|
||||
FFDSYNC = 4194304 // fcntl.h:189:1:
|
||||
FFSYNC = 128 // fcntl.h:188:1:
|
||||
FNDELAY = 4 // fcntl.h:191:1:
|
||||
FNONBLOCK = 4 // fcntl.h:190:1:
|
||||
FREAD = 0x0001 // fcntl.h:110:1:
|
||||
FWRITE = 0x0002 // fcntl.h:111:1:
|
||||
F_ADDFILESIGS = 61 // fcntl.h:246:1:
|
||||
F_ADDFILESIGS_FOR_DYLD_SIM = 83 // fcntl.h:279:1:
|
||||
F_ADDFILESIGS_RETURN = 97 // fcntl.h:285:1:
|
||||
F_ADDSIGS = 59 // fcntl.h:243:1:
|
||||
F_ALLOCATEALL = 0x00000004 // fcntl.h:330:1:
|
||||
F_ALLOCATECONTIG = 0x00000002 // fcntl.h:329:1:
|
||||
F_BARRIERFSYNC = 85 // fcntl.h:282:1:
|
||||
F_CHECK_LV = 98 // fcntl.h:286:1:
|
||||
F_CHKCLEAN = 41 // fcntl.h:225:1:
|
||||
F_DUPFD = 0 // fcntl.h:210:1:
|
||||
F_DUPFD_CLOEXEC = 67 // fcntl.h:302:1:
|
||||
F_FINDSIGS = 78 // fcntl.h:276:1:
|
||||
F_FLUSH_DATA = 40 // fcntl.h:224:1:
|
||||
F_FREEZE_FS = 53 // fcntl.h:238:1:
|
||||
F_FULLFSYNC = 51 // fcntl.h:236:1:
|
||||
F_GETCODEDIR = 72 // fcntl.h:264:1:
|
||||
F_GETFD = 1 // fcntl.h:211:1:
|
||||
F_GETFL = 3 // fcntl.h:213:1:
|
||||
F_GETLK = 7 // fcntl.h:217:1:
|
||||
F_GETLKPID = 66 // fcntl.h:256:1:
|
||||
F_GETNOSIGPIPE = 74 // fcntl.h:267:1:
|
||||
F_GETOWN = 5 // fcntl.h:215:1:
|
||||
F_GETPATH = 50 // fcntl.h:235:1:
|
||||
F_GETPATH_MTMINFO = 71 // fcntl.h:262:1:
|
||||
F_GETPATH_NOFIRMLINK = 102 // fcntl.h:294:1:
|
||||
F_GETPROTECTIONCLASS = 63 // fcntl.h:251:1:
|
||||
F_GETPROTECTIONLEVEL = 77 // fcntl.h:274:1:
|
||||
F_GLOBAL_NOCACHE = 55 // fcntl.h:240:1:
|
||||
F_LOG2PHYS = 49 // fcntl.h:234:1:
|
||||
F_LOG2PHYS_EXT = 65 // fcntl.h:254:1:
|
||||
F_NOCACHE = 48 // fcntl.h:233:1:
|
||||
F_NODIRECT = 62 // fcntl.h:248:1:
|
||||
F_PATHPKG_CHECK = 52 // fcntl.h:237:1:
|
||||
F_PEOFPOSMODE = 3 // fcntl.h:334:1:
|
||||
F_PREALLOCATE = 42 // fcntl.h:226:1:
|
||||
F_PUNCHHOLE = 99 // fcntl.h:288:1:
|
||||
F_RDADVISE = 44 // fcntl.h:228:1:
|
||||
F_RDAHEAD = 45 // fcntl.h:229:1:
|
||||
F_RDLCK = 1 // fcntl.h:309:1:
|
||||
F_SETBACKINGSTORE = 70 // fcntl.h:261:1:
|
||||
F_SETFD = 2 // fcntl.h:212:1:
|
||||
F_SETFL = 4 // fcntl.h:214:1:
|
||||
F_SETLK = 8 // fcntl.h:218:1:
|
||||
F_SETLKW = 9 // fcntl.h:219:1:
|
||||
F_SETLKWTIMEOUT = 10 // fcntl.h:221:1:
|
||||
F_SETNOSIGPIPE = 73 // fcntl.h:266:1:
|
||||
F_SETOWN = 6 // fcntl.h:216:1:
|
||||
F_SETPROTECTIONCLASS = 64 // fcntl.h:252:1:
|
||||
F_SETSIZE = 43 // fcntl.h:227:1:
|
||||
F_SINGLE_WRITER = 76 // fcntl.h:271:1:
|
||||
F_SPECULATIVE_READ = 101 // fcntl.h:292:1:
|
||||
F_THAW_FS = 54 // fcntl.h:239:1:
|
||||
F_TRANSCODEKEY = 75 // fcntl.h:269:1:
|
||||
F_TRIM_ACTIVE_FILE = 100 // fcntl.h:290:1:
|
||||
F_UNLCK = 2 // fcntl.h:310:1:
|
||||
F_VOLPOSMODE = 4 // fcntl.h:336:1:
|
||||
F_WRLCK = 3 // fcntl.h:311:1:
|
||||
LOCK_EX = 0x02 // fcntl.h:421:1:
|
||||
LOCK_NB = 0x04 // fcntl.h:422:1:
|
||||
LOCK_SH = 0x01 // fcntl.h:420:1:
|
||||
LOCK_UN = 0x08 // fcntl.h:423:1:
|
||||
O_ACCMODE = 0x0003 // fcntl.h:99:1:
|
||||
O_ALERT = 0x20000000 // fcntl.h:502:1:
|
||||
O_APPEND = 0x0008 // fcntl.h:114:1:
|
||||
O_ASYNC = 0x0040 // fcntl.h:121:1:
|
||||
O_CLOEXEC = 0x1000000 // fcntl.h:165:1:
|
||||
O_CREAT = 0x0200 // fcntl.h:125:1:
|
||||
O_DIRECTORY = 0x100000 // fcntl.h:157:1:
|
||||
O_DP_GETRAWENCRYPTED = 0x0001 // fcntl.h:174:1:
|
||||
O_DP_GETRAWUNENCRYPTED = 0x0002 // fcntl.h:175:1:
|
||||
O_DSYNC = 0x400000 // _o_dsync.h:29:1:
|
||||
O_EVTONLY = 0x8000 // fcntl.h:149:1:
|
||||
O_EXCL = 0x0800 // fcntl.h:127:1:
|
||||
O_EXLOCK = 0x0020 // fcntl.h:120:1:
|
||||
O_FSYNC = 128 // fcntl.h:122:1:
|
||||
O_NDELAY = 4 // fcntl.h:192:1:
|
||||
O_NOCTTY = 0x20000 // fcntl.h:153:1:
|
||||
O_NOFOLLOW = 0x0100 // fcntl.h:123:1:
|
||||
O_NONBLOCK = 0x0004 // fcntl.h:113:1:
|
||||
O_POPUP = 0x80000000 // fcntl.h:501:1:
|
||||
O_RDONLY = 0x0000 // fcntl.h:96:1:
|
||||
O_RDWR = 0x0002 // fcntl.h:98:1:
|
||||
O_SHLOCK = 0x0010 // fcntl.h:119:1:
|
||||
O_SYMLINK = 0x200000 // fcntl.h:158:1:
|
||||
O_SYNC = 0x0080 // _o_sync.h:29:1:
|
||||
O_TRUNC = 0x0400 // fcntl.h:126:1:
|
||||
O_WRONLY = 0x0001 // fcntl.h:97:1:
|
||||
SEEK_CUR = 1 // _seek_set.h:34:1:
|
||||
SEEK_DATA = 4 // _seek_set.h:44:1:
|
||||
SEEK_END = 2 // _seek_set.h:35:1:
|
||||
SEEK_HOLE = 3 // _seek_set.h:40:1:
|
||||
SEEK_SET = 0 // _seek_set.h:33:1:
|
||||
S_IEXEC = 64 // _s_ifmt.h:72:1:
|
||||
S_IFBLK = 0060000 // _s_ifmt.h:39:1:
|
||||
S_IFCHR = 0020000 // _s_ifmt.h:37:1:
|
||||
S_IFDIR = 0040000 // _s_ifmt.h:38:1:
|
||||
S_IFIFO = 0010000 // _s_ifmt.h:36:1:
|
||||
S_IFLNK = 0120000 // _s_ifmt.h:41:1:
|
||||
S_IFMT = 0170000 // _s_ifmt.h:35:1:
|
||||
S_IFREG = 0100000 // _s_ifmt.h:40:1:
|
||||
S_IFSOCK = 0140000 // _s_ifmt.h:42:1:
|
||||
S_IFWHT = 0160000 // _s_ifmt.h:44:1:
|
||||
S_IREAD = 256 // _s_ifmt.h:70:1:
|
||||
S_IRGRP = 0000040 // _s_ifmt.h:55:1:
|
||||
S_IROTH = 0000004 // _s_ifmt.h:60:1:
|
||||
S_IRUSR = 0000400 // _s_ifmt.h:50:1:
|
||||
S_IRWXG = 0000070 // _s_ifmt.h:54:1:
|
||||
S_IRWXO = 0000007 // _s_ifmt.h:59:1:
|
||||
S_IRWXU = 0000700 // _s_ifmt.h:49:1:
|
||||
S_ISGID = 0002000 // _s_ifmt.h:65:1:
|
||||
S_ISTXT = 512 // _s_ifmt.h:69:1:
|
||||
S_ISUID = 0004000 // _s_ifmt.h:64:1:
|
||||
S_ISVTX = 0001000 // _s_ifmt.h:66:1:
|
||||
S_IWGRP = 0000020 // _s_ifmt.h:56:1:
|
||||
S_IWOTH = 0000002 // _s_ifmt.h:61:1:
|
||||
S_IWRITE = 128 // _s_ifmt.h:71:1:
|
||||
S_IWUSR = 0000200 // _s_ifmt.h:51:1:
|
||||
S_IXGRP = 0000010 // _s_ifmt.h:57:1:
|
||||
S_IXOTH = 0000001 // _s_ifmt.h:62:1:
|
||||
S_IXUSR = 0000100 // _s_ifmt.h:52:1:
|
||||
X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1:
|
||||
X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1:
|
||||
X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1:
|
||||
X_CDEFS_H_ = 0 // cdefs.h:68:1:
|
||||
X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1:
|
||||
X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1:
|
||||
X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1:
|
||||
X_FILESEC_T = 0 // _filesec_t.h:29:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_INT16_T = 0 // _int16_t.h:29:1:
|
||||
X_INT32_T = 0 // _int32_t.h:29:1:
|
||||
X_INT64_T = 0 // _int64_t.h:29:1:
|
||||
X_INT8_T = 0 // _int8_t.h:29:1:
|
||||
X_INTPTR_T = 0 // _intptr_t.h:29:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_MACHTYPES_H_ = 0 // types.h:67:1:
|
||||
X_MODE_T = 0 // _mode_t.h:29:1:
|
||||
X_Nonnull = 0 // cdefs.h:243:1:
|
||||
X_Null_unspecified = 0 // cdefs.h:246:1:
|
||||
X_Nullable = 0 // cdefs.h:240:1:
|
||||
X_OFF_T = 0 // _off_t.h:29:1:
|
||||
X_PID_T = 0 // _pid_t.h:29:1:
|
||||
X_SIZE_T = 0 // _size_t.h:29:1:
|
||||
X_SYS_FCNTL_H_ = 0 // fcntl.h:71:1:
|
||||
X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:30:1:
|
||||
X_UINTPTR_T = 0 // _uintptr_t.h:29:1:
|
||||
X_U_INT16_T = 0 // _u_int16_t.h:29:1:
|
||||
X_U_INT32_T = 0 // _u_int32_t.h:29:1:
|
||||
X_U_INT64_T = 0 // _u_int64_t.h:29:1:
|
||||
X_U_INT8_T = 0 // _u_int8_t.h:29:1:
|
||||
)
|
||||
|
||||
const ( /* fcntl.h:512:1: */
|
||||
|
||||
+510
-460
File diff suppressed because it is too large.
Load diff
+28
-30
@@ -74,8 +74,8 @@ const (
|
||||
PDP_ENDIAN = 3412 // endian.h:46:1:
|
||||
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:58:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:158:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
|
||||
X_INT32_T_DEFINED_ = 0 // types.h:94:1:
|
||||
@@ -87,14 +87,14 @@ const (
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:193:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
|
||||
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:168:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:167:1:
|
||||
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
|
||||
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
|
||||
X_RET_PROTECTOR = 1 // <predefined>:2:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:173:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:178:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:49:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
|
||||
@@ -102,13 +102,13 @@ const (
|
||||
X_SYS_TYPES_H_ = 0 // types.h:41:1:
|
||||
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:188:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:183:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
|
||||
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
|
||||
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
|
||||
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
|
||||
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
Unix = 1 // <predefined>:344:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
@@ -333,7 +333,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// Default values.
|
||||
|
||||
// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
@@ -503,7 +503,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// get the correct setting direction for the platform and sets internal
|
||||
// ('__' prefix) macros appropriately.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
@@ -663,18 +663,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family
|
||||
type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
|
||||
type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
|
||||
type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
|
||||
type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset
|
||||
type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds
|
||||
type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:76:3 */
|
||||
} /* _types.h:75:3 */
|
||||
|
||||
// Tell sys/endian.h we have MD variants of the swap macros.
|
||||
|
||||
@@ -756,27 +755,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
|
||||
type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
|
||||
type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
|
||||
type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
|
||||
type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset
|
||||
type Uid_t = X__uid_t /* types.h:148:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count
|
||||
type Uid_t = X__uid_t /* types.h:147:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:159:19 */
|
||||
type Clock_t = X__clock_t /* types.h:158:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:164:21 */
|
||||
type Clockid_t = X__clockid_t /* types.h:163:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:169:18 */
|
||||
type Pid_t = X__pid_t /* types.h:168:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:179:19 */
|
||||
type Ssize_t = X__ssize_t /* types.h:178:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:184:18 */
|
||||
type Time_t = X__time_t /* types.h:183:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:189:19 */
|
||||
type Timer_t = X__timer_t /* types.h:188:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:194:18 */
|
||||
type Off_t = X__off_t /* types.h:193:18 */
|
||||
|
||||
// Major, minor numbers, dev_t's.
|
||||
|
||||
|
||||
+83
-87
@@ -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_openbsd_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_openbsd_arm64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
@@ -73,9 +73,9 @@ const (
|
||||
O_WRONLY = 0x0001 // fcntl.h:63:1:
|
||||
PDP_ENDIAN = 3412 // endian.h:46:1:
|
||||
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:58:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:158:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:60:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
|
||||
X_INT32_T_DEFINED_ = 0 // types.h:94:1:
|
||||
@@ -83,32 +83,32 @@ const (
|
||||
X_INT8_T_DEFINED_ = 0 // types.h:74:1:
|
||||
X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:193:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1:
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:57:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
|
||||
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:168:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:167:1:
|
||||
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
|
||||
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
|
||||
X_RET_PROTECTOR = 1 // <predefined>:2:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:173:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:178:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:49:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:54:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
|
||||
X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1:
|
||||
X_SYS_TYPES_H_ = 0 // types.h:41:1:
|
||||
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:188:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:183:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
|
||||
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
|
||||
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
|
||||
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
|
||||
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
Unix = 1 // <predefined>:360:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
@@ -206,10 +206,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $
|
||||
|
||||
// Written by J.T. Conklin <[email protected]> 01/17/95.
|
||||
// Public domain.
|
||||
// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $
|
||||
|
||||
// Macro to test if we're using a specific version of gcc or later.
|
||||
|
||||
@@ -333,7 +330,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// Default values.
|
||||
|
||||
// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
@@ -503,7 +500,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// get the correct setting direction for the platform and sets internal
|
||||
// ('__' prefix) macros appropriately.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
@@ -535,8 +532,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
//
|
||||
// @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
|
||||
// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $
|
||||
|
||||
// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
@@ -578,66 +574,68 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// (within reasonable limits).
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
type X__int8_t = int8 /* _types.h:61:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:62:24 */
|
||||
type X__int16_t = int16 /* _types.h:63:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:64:25 */
|
||||
type X__int32_t = int32 /* _types.h:65:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:66:23 */
|
||||
type X__int64_t = int64 /* _types.h:67:20 */
|
||||
type X__uint64_t = uint64 /* _types.h:68:28 */
|
||||
type X__int8_t = int8 /* _types.h:60:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:61:24 */
|
||||
type X__int16_t = int16 /* _types.h:62:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:63:25 */
|
||||
type X__int32_t = int32 /* _types.h:64:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:65:23 */
|
||||
// LONGLONG
|
||||
type X__int64_t = int64 /* _types.h:67:20 */
|
||||
// LONGLONG
|
||||
type X__uint64_t = uint64 /* _types.h:69:28 */
|
||||
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
type X__int_least8_t = X__int8_t /* _types.h:71:19 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:73:20 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:75:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:77:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */
|
||||
type X__int_least8_t = X__int8_t /* _types.h:72:19 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:74:20 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:76:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:78:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */
|
||||
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:81:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:83:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:85:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:87:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:82:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:84:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:86:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:88:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */
|
||||
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
type X__intptr_t = int64 /* _types.h:103:16 */
|
||||
type X__uintptr_t = uint64 /* _types.h:104:24 */
|
||||
type X__intptr_t = int64 /* _types.h:104:16 */
|
||||
type X__uintptr_t = uint64 /* _types.h:105:24 */
|
||||
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
type X__intmax_t = X__int64_t /* _types.h:107:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:108:21 */
|
||||
type X__intmax_t = X__int64_t /* _types.h:108:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:109:21 */
|
||||
|
||||
// Register size
|
||||
type X__register_t = int64 /* _types.h:111:16 */
|
||||
type X__register_t = int64 /* _types.h:112:16 */
|
||||
|
||||
// VM system types
|
||||
type X__vaddr_t = uint64 /* _types.h:114:24 */
|
||||
type X__paddr_t = uint64 /* _types.h:115:24 */
|
||||
type X__vsize_t = uint64 /* _types.h:116:24 */
|
||||
type X__psize_t = uint64 /* _types.h:117:24 */
|
||||
type X__vaddr_t = uint64 /* _types.h:115:24 */
|
||||
type X__paddr_t = uint64 /* _types.h:116:24 */
|
||||
type X__vsize_t = uint64 /* _types.h:117:24 */
|
||||
type X__psize_t = uint64 /* _types.h:118:24 */
|
||||
|
||||
// Standard system types
|
||||
type X__double_t = float64 /* _types.h:120:18 */
|
||||
type X__float_t = float32 /* _types.h:121:17 */
|
||||
type X__ptrdiff_t = int64 /* _types.h:122:16 */
|
||||
type X__size_t = uint64 /* _types.h:123:24 */
|
||||
type X__ssize_t = int64 /* _types.h:124:16 */
|
||||
type X__va_list = X__builtin_va_list /* _types.h:126:27 */
|
||||
type X__double_t = float64 /* _types.h:121:18 */
|
||||
type X__float_t = float32 /* _types.h:122:17 */
|
||||
type X__ptrdiff_t = int64 /* _types.h:123:16 */
|
||||
type X__size_t = uint64 /* _types.h:124:24 */
|
||||
type X__ssize_t = int64 /* _types.h:125:16 */
|
||||
type X__va_list = X__builtin_va_list /* _types.h:127:27 */
|
||||
|
||||
// Wide character support types
|
||||
type X__wchar_t = int32 /* _types.h:133:15 */
|
||||
type X__wint_t = int32 /* _types.h:135:15 */
|
||||
type X__rune_t = int32 /* _types.h:136:15 */
|
||||
type X__wctrans_t = uintptr /* _types.h:137:14 */
|
||||
type X__wctype_t = uintptr /* _types.h:138:14 */
|
||||
type X__wchar_t = int32 /* _types.h:137:15 */
|
||||
type X__wint_t = int32 /* _types.h:140:15 */
|
||||
type X__rune_t = int32 /* _types.h:141:15 */
|
||||
type X__wctrans_t = uintptr /* _types.h:142:14 */
|
||||
type X__wctype_t = uintptr /* _types.h:143:14 */
|
||||
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O
|
||||
@@ -663,18 +661,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family
|
||||
type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
|
||||
type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
|
||||
type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
|
||||
type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset
|
||||
type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds
|
||||
type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:76:3 */
|
||||
} /* _types.h:75:3 */
|
||||
|
||||
// Tell sys/endian.h we have MD variants of the swap macros.
|
||||
|
||||
@@ -756,27 +753,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
|
||||
type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
|
||||
type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
|
||||
type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
|
||||
type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset
|
||||
type Uid_t = X__uid_t /* types.h:148:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count
|
||||
type Uid_t = X__uid_t /* types.h:147:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:159:19 */
|
||||
type Clock_t = X__clock_t /* types.h:158:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:164:21 */
|
||||
type Clockid_t = X__clockid_t /* types.h:163:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:169:18 */
|
||||
type Pid_t = X__pid_t /* types.h:168:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:179:19 */
|
||||
type Ssize_t = X__ssize_t /* types.h:178:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:184:18 */
|
||||
type Time_t = X__time_t /* types.h:183:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:189:19 */
|
||||
type Timer_t = X__timer_t /* types.h:188:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:194:18 */
|
||||
type Off_t = X__off_t /* types.h:193:18 */
|
||||
|
||||
// Major, minor numbers, dev_t's.
|
||||
|
||||
|
||||
+176
-163
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo fcntl\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl\fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
@@ -15,148 +15,148 @@ var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
DUMMYSTRUCTNAME = 0
|
||||
DUMMYSTRUCTNAME1 = 0
|
||||
DUMMYSTRUCTNAME2 = 0
|
||||
DUMMYSTRUCTNAME3 = 0
|
||||
DUMMYSTRUCTNAME4 = 0
|
||||
DUMMYSTRUCTNAME5 = 0
|
||||
DUMMYUNIONNAME = 0
|
||||
DUMMYUNIONNAME1 = 0
|
||||
DUMMYUNIONNAME2 = 0
|
||||
DUMMYUNIONNAME3 = 0
|
||||
DUMMYUNIONNAME4 = 0
|
||||
DUMMYUNIONNAME5 = 0
|
||||
DUMMYUNIONNAME6 = 0
|
||||
DUMMYUNIONNAME7 = 0
|
||||
DUMMYUNIONNAME8 = 0
|
||||
DUMMYUNIONNAME9 = 0
|
||||
F_OK = 0
|
||||
MINGW_DDK_H = 0
|
||||
MINGW_DDRAW_VERSION = 7
|
||||
MINGW_HAS_DDK_H = 1
|
||||
MINGW_HAS_DDRAW_H = 1
|
||||
MINGW_HAS_SECURE_API = 1
|
||||
MINGW_SDK_INIT = 0
|
||||
O_ACCMODE = 3
|
||||
O_APPEND = 8
|
||||
O_BINARY = 32768
|
||||
O_CREAT = 256
|
||||
O_EXCL = 1024
|
||||
O_NOINHERIT = 128
|
||||
O_RANDOM = 16
|
||||
O_RAW = 32768
|
||||
O_RDONLY = 0
|
||||
O_RDWR = 2
|
||||
O_SEQUENTIAL = 32
|
||||
O_TEMPORARY = 64
|
||||
O_TEXT = 16384
|
||||
O_TRUNC = 512
|
||||
O_WRONLY = 1
|
||||
R_OK = 4
|
||||
UNALIGNED = 0
|
||||
USE___UUIDOF = 0
|
||||
WIN32 = 1
|
||||
WINNT = 1
|
||||
W_OK = 2
|
||||
X_OK = 1
|
||||
X_AGLOBAL = 0
|
||||
X_ANONYMOUS_STRUCT = 0
|
||||
X_ANONYMOUS_UNION = 0
|
||||
X_ARGMAX = 100
|
||||
X_A_ARCH = 0x20
|
||||
X_A_HIDDEN = 0x02
|
||||
X_A_NORMAL = 0x00
|
||||
X_A_RDONLY = 0x01
|
||||
X_A_SUBDIR = 0x10
|
||||
X_A_SYSTEM = 0x04
|
||||
X_CONST_RETURN = 0
|
||||
X_CRTNOALIAS = 0
|
||||
X_CRTRESTRICT = 0
|
||||
X_CRT_ALTERNATIVE_IMPORTED = 0
|
||||
X_CRT_DIRECTORY_DEFINED = 0
|
||||
X_CRT_MANAGED_HEAP_DEPRECATE = 0
|
||||
X_CRT_MEMORY_DEFINED = 0
|
||||
X_CRT_PACKING = 8
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0
|
||||
X_DLL = 0
|
||||
X_ERRCODE_DEFINED = 0
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_FILE_OFFSET_BITS_SET_LSEEK = 0
|
||||
X_FILE_OFFSET_BITS_SET_OFFT = 0
|
||||
X_FINDDATA_T_DEFINED = 0
|
||||
X_FSIZE_T_DEFINED = 0
|
||||
X_INC_CRTDEFS = 0
|
||||
X_INC_CRTDEFS_MACRO = 0
|
||||
X_INC_FCNTL = 0
|
||||
X_INC_MINGW_SECAPI = 0
|
||||
X_INC_STRING = 0
|
||||
X_INC_STRING_S = 0
|
||||
X_INC_VADEFS = 0
|
||||
X_INC__MINGW_H = 0
|
||||
X_INT128_DEFINED = 0
|
||||
X_INTEGRAL_MAX_BITS = 64
|
||||
X_INTPTR_T_DEFINED = 0
|
||||
X_IO_H_ = 0
|
||||
X_MT = 0
|
||||
X_M_IX86 = 600
|
||||
X_NLSCMPERROR = 2147483647
|
||||
X_NLSCMP_DEFINED = 0
|
||||
X_OFF64_T_DEFINED = 0
|
||||
X_OFF_T_ = 0
|
||||
X_OFF_T_DEFINED = 0
|
||||
X_O_ACCMODE = 3
|
||||
X_O_APPEND = 0x0008
|
||||
X_O_BINARY = 0x8000
|
||||
X_O_CREAT = 0x0100
|
||||
X_O_EXCL = 0x0400
|
||||
X_O_NOINHERIT = 0x0080
|
||||
X_O_RANDOM = 0x0010
|
||||
X_O_RAW = 32768
|
||||
X_O_RDONLY = 0x0000
|
||||
X_O_RDWR = 0x0002
|
||||
X_O_SEQUENTIAL = 0x0020
|
||||
X_O_SHORT_LIVED = 0x1000
|
||||
X_O_TEMPORARY = 0x0040
|
||||
X_O_TEXT = 0x4000
|
||||
X_O_TRUNC = 0x0200
|
||||
X_O_U16TEXT = 0x20000
|
||||
X_O_U8TEXT = 0x40000
|
||||
X_O_WRONLY = 0x0001
|
||||
X_O_WTEXT = 0x10000
|
||||
X_PGLOBAL = 0
|
||||
X_PTRDIFF_T_ = 0
|
||||
X_PTRDIFF_T_DEFINED = 0
|
||||
X_REENTRANT = 1
|
||||
X_RSIZE_T_DEFINED = 0
|
||||
X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD
|
||||
X_SIZE_T_DEFINED = 0
|
||||
X_SSIZE_T_DEFINED = 0
|
||||
X_TAGLC_ID_DEFINED = 0
|
||||
X_THREADLOCALEINFO = 0
|
||||
X_TIME32_T_DEFINED = 0
|
||||
X_TIME64_T_DEFINED = 0
|
||||
X_TIME_T_DEFINED = 0
|
||||
X_UINTPTR_T_DEFINED = 0
|
||||
X_USE_32BIT_TIME_T = 0
|
||||
X_VA_LIST_DEFINED = 0
|
||||
X_W64 = 0
|
||||
X_WCHAR_T_DEFINED = 0
|
||||
X_WCTYPE_T_DEFINED = 0
|
||||
X_WConst_return = 0
|
||||
X_WFINDDATA_T_DEFINED = 0
|
||||
X_WIN32 = 1
|
||||
X_WIN32_WINNT = 0x502
|
||||
X_WINT_T = 0
|
||||
X_WIO_DEFINED = 0
|
||||
X_WSTRING_DEFINED = 0
|
||||
X_WSTRING_S_DEFINED = 0
|
||||
X_X86_ = 1
|
||||
I386 = 1
|
||||
DUMMYSTRUCTNAME = 0 // _mingw.h:519:1:
|
||||
DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1:
|
||||
DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1:
|
||||
DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1:
|
||||
DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1:
|
||||
DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1:
|
||||
DUMMYUNIONNAME = 0 // _mingw.h:497:1:
|
||||
DUMMYUNIONNAME1 = 0 // _mingw.h:498:1:
|
||||
DUMMYUNIONNAME2 = 0 // _mingw.h:499:1:
|
||||
DUMMYUNIONNAME3 = 0 // _mingw.h:500:1:
|
||||
DUMMYUNIONNAME4 = 0 // _mingw.h:501:1:
|
||||
DUMMYUNIONNAME5 = 0 // _mingw.h:502:1:
|
||||
DUMMYUNIONNAME6 = 0 // _mingw.h:503:1:
|
||||
DUMMYUNIONNAME7 = 0 // _mingw.h:504:1:
|
||||
DUMMYUNIONNAME8 = 0 // _mingw.h:505:1:
|
||||
DUMMYUNIONNAME9 = 0 // _mingw.h:506:1:
|
||||
F_OK = 0 // io.h:182:1:
|
||||
MINGW_DDK_H = 0 // _mingw_ddk.h:2:1:
|
||||
MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1:
|
||||
MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1:
|
||||
MINGW_SDK_INIT = 0 // _mingw.h:598:1:
|
||||
O_ACCMODE = 3 // fcntl.h:50:1:
|
||||
O_APPEND = 8 // fcntl.h:39:1:
|
||||
O_BINARY = 32768 // fcntl.h:44:1:
|
||||
O_CREAT = 256 // fcntl.h:40:1:
|
||||
O_EXCL = 1024 // fcntl.h:42:1:
|
||||
O_NOINHERIT = 128 // fcntl.h:47:1:
|
||||
O_RANDOM = 16 // fcntl.h:49:1:
|
||||
O_RAW = 32768 // fcntl.h:45:1:
|
||||
O_RDONLY = 0 // fcntl.h:36:1:
|
||||
O_RDWR = 2 // fcntl.h:38:1:
|
||||
O_SEQUENTIAL = 32 // fcntl.h:48:1:
|
||||
O_TEMPORARY = 64 // fcntl.h:46:1:
|
||||
O_TEXT = 16384 // fcntl.h:43:1:
|
||||
O_TRUNC = 512 // fcntl.h:41:1:
|
||||
O_WRONLY = 1 // fcntl.h:37:1:
|
||||
R_OK = 4 // io.h:185:1:
|
||||
UNALIGNED = 0 // _mingw.h:384:1:
|
||||
USE___UUIDOF = 0 // _mingw.h:77:1:
|
||||
WIN32 = 1 // <predefined>:258:1:
|
||||
WINNT = 1 // <predefined>:306:1:
|
||||
W_OK = 2 // io.h:184:1:
|
||||
X_OK = 1 // io.h:183:1:
|
||||
X_AGLOBAL = 0 // _mingw.h:346:1:
|
||||
X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1:
|
||||
X_ANONYMOUS_UNION = 0 // _mingw.h:473:1:
|
||||
X_ARGMAX = 100 // _mingw.h:402:1:
|
||||
X_A_ARCH = 0x20 // io.h:156:1:
|
||||
X_A_HIDDEN = 0x02 // io.h:153:1:
|
||||
X_A_NORMAL = 0x00 // io.h:151:1:
|
||||
X_A_RDONLY = 0x01 // io.h:152:1:
|
||||
X_A_SUBDIR = 0x10 // io.h:155:1:
|
||||
X_A_SYSTEM = 0x04 // io.h:154:1:
|
||||
X_CONST_RETURN = 0 // _mingw.h:377:1:
|
||||
X_CRTNOALIAS = 0 // corecrt.h:29:1:
|
||||
X_CRTRESTRICT = 0 // corecrt.h:33:1:
|
||||
X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1:
|
||||
X_CRT_DIRECTORY_DEFINED = 0 // io.h:214:1:
|
||||
X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1:
|
||||
X_CRT_MEMORY_DEFINED = 0 // string.h:44:1:
|
||||
X_CRT_PACKING = 8 // corecrt.h:14:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1:
|
||||
X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1:
|
||||
X_DLL = 0 // _mingw.h:326:1:
|
||||
X_ERRCODE_DEFINED = 0 // corecrt.h:117:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_FILE_OFFSET_BITS_SET_LSEEK = 0 // io.h:350:1:
|
||||
X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1:
|
||||
X_FINDDATA_T_DEFINED = 0 // io.h:89:1:
|
||||
X_FSIZE_T_DEFINED = 0 // io.h:30:1:
|
||||
X_ILP32 = 1 // <predefined>:211:1:
|
||||
X_INC_CORECRT = 0 // corecrt.h:8:1:
|
||||
X_INC_CRTDEFS = 0 // crtdefs.h:8:1:
|
||||
X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1:
|
||||
X_INC_FCNTL = 0 // fcntl.h:11:1:
|
||||
X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1:
|
||||
X_INC_STRING = 0 // string.h:7:1:
|
||||
X_INC_STRING_S = 0 // string_s.h:7:1:
|
||||
X_INC_VADEFS = 0 // vadefs.h:7:1:
|
||||
X_INC__MINGW_H = 0 // _mingw.h:8:1:
|
||||
X_INT128_DEFINED = 0 // _mingw.h:237:1:
|
||||
X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1:
|
||||
X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1:
|
||||
X_IO_H_ = 0 // io.h:7:1:
|
||||
X_MT = 0 // _mingw.h:330:1:
|
||||
X_M_IX86 = 600 // _mingw_mac.h:54:1:
|
||||
X_NLSCMPERROR = 2147483647 // string.h:26:1:
|
||||
X_NLSCMP_DEFINED = 0 // string.h:25:1:
|
||||
X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1:
|
||||
X_OFF_T_ = 0 // _mingw_off_t.h:4:1:
|
||||
X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1:
|
||||
X_O_ACCMODE = 3 // fcntl.h:25:1:
|
||||
X_O_APPEND = 0x0008 // fcntl.h:16:1:
|
||||
X_O_BINARY = 0x8000 // fcntl.h:21:1:
|
||||
X_O_CREAT = 0x0100 // fcntl.h:17:1:
|
||||
X_O_EXCL = 0x0400 // fcntl.h:19:1:
|
||||
X_O_NOINHERIT = 0x0080 // fcntl.h:28:1:
|
||||
X_O_RANDOM = 0x0010 // fcntl.h:33:1:
|
||||
X_O_RAW = 32768 // fcntl.h:27:1:
|
||||
X_O_RDONLY = 0x0000 // fcntl.h:13:1:
|
||||
X_O_RDWR = 0x0002 // fcntl.h:15:1:
|
||||
X_O_SEQUENTIAL = 0x0020 // fcntl.h:32:1:
|
||||
X_O_SHORT_LIVED = 0x1000 // fcntl.h:30:1:
|
||||
X_O_TEMPORARY = 0x0040 // fcntl.h:29:1:
|
||||
X_O_TEXT = 0x4000 // fcntl.h:20:1:
|
||||
X_O_TRUNC = 0x0200 // fcntl.h:18:1:
|
||||
X_O_U16TEXT = 0x20000 // fcntl.h:23:1:
|
||||
X_O_U8TEXT = 0x40000 // fcntl.h:24:1:
|
||||
X_O_WRONLY = 0x0001 // fcntl.h:14:1:
|
||||
X_O_WTEXT = 0x10000 // fcntl.h:22:1:
|
||||
X_PGLOBAL = 0 // _mingw.h:342:1:
|
||||
X_PTRDIFF_T_ = 0 // corecrt.h:90:1:
|
||||
X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1:
|
||||
X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1:
|
||||
X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1:
|
||||
X_SIZE_T_DEFINED = 0 // corecrt.h:37:1:
|
||||
X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1:
|
||||
X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1:
|
||||
X_THREADLOCALEINFO = 0 // corecrt.h:456:1:
|
||||
X_TIME32_T_DEFINED = 0 // corecrt.h:122:1:
|
||||
X_TIME64_T_DEFINED = 0 // corecrt.h:127:1:
|
||||
X_TIME_T_DEFINED = 0 // corecrt.h:139:1:
|
||||
X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1:
|
||||
X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1:
|
||||
X_VA_LIST_DEFINED = 0 // <builtin>:55:1:
|
||||
X_W64 = 0 // _mingw.h:296:1:
|
||||
X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1:
|
||||
X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1:
|
||||
X_WConst_return = 0 // string.h:41:1:
|
||||
X_WFINDDATA_T_DEFINED = 0 // io.h:148:1:
|
||||
X_WIN32 = 1 // <predefined>:164:1:
|
||||
X_WIN32_WINNT = 0x502 // _mingw.h:233:1:
|
||||
X_WINT_T = 0 // corecrt.h:110:1:
|
||||
X_WIO_DEFINED = 0 // io.h:295:1:
|
||||
X_WSTRING_DEFINED = 0 // string.h:129:1:
|
||||
X_WSTRING_S_DEFINED = 0 // string_s.h:48:1:
|
||||
X_X86_ = 1 // <predefined>:169:1:
|
||||
I386 = 1 // <predefined>:171:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
@@ -189,6 +189,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// This macro holds an monotonic increasing value, which indicates
|
||||
// a specific fix/patch is present on trunk. This value isn't related to
|
||||
// minor/major version-macros. It is increased on demand, if a big
|
||||
@@ -209,6 +214,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
// MinGW-w64 has some additional C99 printf/scanf feature support.
|
||||
// So we add some helper macros to ease recognition of them.
|
||||
|
||||
// If _FORTIFY_SOURCE is enabled, some inline functions may use
|
||||
// __builtin_va_arg_pack(). GCC may report an error if the address
|
||||
// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case.
|
||||
|
||||
// Enable workaround for ABI incompatibility on affected platforms
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
@@ -249,26 +260,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// for backward compatibility
|
||||
|
||||
type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
|
||||
|
||||
type Ssize_t = int32 /* crtdefs.h:47:13 */
|
||||
type Ssize_t = int32 /* corecrt.h:52:13 */
|
||||
|
||||
type Rsize_t = Size_t /* crtdefs.h:52:16 */
|
||||
type Rsize_t = Size_t /* corecrt.h:57:16 */
|
||||
|
||||
type Intptr_t = int32 /* crtdefs.h:64:13 */
|
||||
type Intptr_t = int32 /* corecrt.h:69:13 */
|
||||
|
||||
type Uintptr_t = uint32 /* crtdefs.h:77:22 */
|
||||
type Uintptr_t = uint32 /* corecrt.h:82:22 */
|
||||
|
||||
type Wint_t = uint16 /* crtdefs.h:106:24 */
|
||||
type Wctype_t = uint16 /* crtdefs.h:107:24 */
|
||||
type Wint_t = uint16 /* corecrt.h:111:24 */
|
||||
type Wctype_t = uint16 /* corecrt.h:112:24 */
|
||||
|
||||
type Errno_t = int32 /* crtdefs.h:113:13 */
|
||||
type Errno_t = int32 /* corecrt.h:118:13 */
|
||||
|
||||
type X__time32_t = int32 /* crtdefs.h:118:14 */
|
||||
type X__time32_t = int32 /* corecrt.h:123:14 */
|
||||
|
||||
type X__time64_t = int64 /* crtdefs.h:123:35 */
|
||||
type X__time64_t = int64 /* corecrt.h:128:35 */
|
||||
|
||||
type Time_t = X__time32_t /* crtdefs.h:136:20 */
|
||||
type Time_t = X__time32_t /* corecrt.h:141:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
Frefcount int32
|
||||
@@ -294,29 +307,29 @@ type Threadlocaleinfostruct = struct {
|
||||
Fpclmap uintptr
|
||||
Fpcumap uintptr
|
||||
Flc_time_curr uintptr
|
||||
} /* crtdefs.h:422:1 */
|
||||
} /* corecrt.h:435:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
|
||||
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
|
||||
type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */
|
||||
type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* crtdefs.h:428:9 */
|
||||
} /* corecrt.h:441:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */
|
||||
type X_locale_t = uintptr /* crtdefs.h:431:19 */
|
||||
type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */
|
||||
type X_locale_t = uintptr /* corecrt.h:444:19 */
|
||||
|
||||
type TagLC_ID = struct {
|
||||
FwLanguage uint16
|
||||
FwCountry uint16
|
||||
FwCodePage uint16
|
||||
} /* crtdefs.h:422:1 */
|
||||
} /* corecrt.h:435:1 */
|
||||
|
||||
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
|
||||
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
|
||||
type LC_ID = TagLC_ID /* corecrt.h:452:3 */
|
||||
type LPLC_ID = uintptr /* corecrt.h:452:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */
|
||||
type X_fsize_t = uint32 /* io.h:29:25 */
|
||||
|
||||
type X_finddata32_t = struct {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT.
|
||||
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT.
|
||||
|
||||
package fts
|
||||
|
||||
|
||||
+1
-1
@@ -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_freebsd_386.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_openbsd_386.go -pkgname fts', DO NOT EDIT.
|
||||
|
||||
package fts
|
||||
|
||||
|
||||
+1
-1
@@ -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_openbsd_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_openbsd_arm64.go -pkgname fts', DO NOT EDIT.
|
||||
|
||||
package fts
|
||||
|
||||
|
||||
+180
-180
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo fts/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT.
|
||||
// Code generated by 'ccgo fts/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT.
|
||||
|
||||
package fts
|
||||
|
||||
@@ -15,185 +15,185 @@ var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
ACCESSPERMS = 511
|
||||
ALLPERMS = 4095
|
||||
BIG_ENDIAN = 4321
|
||||
BYTE_ORDER = 1234
|
||||
DEFFILEMODE = 438
|
||||
EF_IS_PURGEABLE = 0x00000008
|
||||
EF_IS_SPARSE = 0x00000010
|
||||
EF_IS_SYNC_ROOT = 0x00000004
|
||||
EF_MAY_SHARE_BLOCKS = 0x00000001
|
||||
EF_NO_XATTRS = 0x00000002
|
||||
FD_SETSIZE = 1024
|
||||
FTS_AGAIN = 1
|
||||
FTS_BLOCK_COMPAR = 0x80000000
|
||||
FTS_COMFOLLOW = 0x001
|
||||
FTS_COMFOLLOWDIR = 0x400
|
||||
FTS_D = 1
|
||||
FTS_DC = 2
|
||||
FTS_DEFAULT = 3
|
||||
FTS_DNR = 4
|
||||
FTS_DONTCHDIR = 0x01
|
||||
FTS_DOT = 5
|
||||
FTS_DP = 6
|
||||
FTS_ERR = 7
|
||||
FTS_F = 8
|
||||
FTS_FOLLOW = 2
|
||||
FTS_INIT = 9
|
||||
FTS_ISW = 0x04
|
||||
FTS_LOGICAL = 0x002
|
||||
FTS_MAXLEVEL = 0x7fffffff
|
||||
FTS_NAMEONLY = 0x100
|
||||
FTS_NOCHDIR = 0x004
|
||||
FTS_NOINSTR = 3
|
||||
FTS_NOSTAT = 0x008
|
||||
FTS_NOSTAT_TYPE = 0x800
|
||||
FTS_NS = 10
|
||||
FTS_NSOK = 11
|
||||
FTS_OPTIONMASK = 0xcff
|
||||
FTS_PHYSICAL = 0x010
|
||||
FTS_ROOTLEVEL = 0
|
||||
FTS_ROOTPARENTLEVEL = -1
|
||||
FTS_SEEDOT = 0x020
|
||||
FTS_SKIP = 4
|
||||
FTS_SL = 12
|
||||
FTS_SLNONE = 13
|
||||
FTS_STOP = 0x200
|
||||
FTS_SYMFOLLOW = 0x02
|
||||
FTS_W = 14
|
||||
FTS_WHITEOUT = 0x080
|
||||
FTS_XDEV = 0x040
|
||||
LITTLE_ENDIAN = 1234
|
||||
NBBY = 8
|
||||
PDP_ENDIAN = 3412
|
||||
SF_APPEND = 0x00040000
|
||||
SF_ARCHIVED = 0x00010000
|
||||
SF_DATALESS = 0x40000000
|
||||
SF_FIRMLINK = 0x00800000
|
||||
SF_IMMUTABLE = 0x00020000
|
||||
SF_NOUNLINK = 0x00100000
|
||||
SF_RESTRICTED = 0x00080000
|
||||
SF_SETTABLE = 0x3fff0000
|
||||
SF_SUPPORTED = 0x009f0000
|
||||
SF_SYNTHETIC = 0xc0000000
|
||||
S_BLKSIZE = 512
|
||||
S_IEXEC = 64
|
||||
S_IFBLK = 0060000
|
||||
S_IFCHR = 0020000
|
||||
S_IFDIR = 0040000
|
||||
S_IFIFO = 0010000
|
||||
S_IFLNK = 0120000
|
||||
S_IFMT = 0170000
|
||||
S_IFREG = 0100000
|
||||
S_IFSOCK = 0140000
|
||||
S_IFWHT = 0160000
|
||||
S_IREAD = 256
|
||||
S_IRGRP = 0000040
|
||||
S_IROTH = 0000004
|
||||
S_IRUSR = 0000400
|
||||
S_IRWXG = 0000070
|
||||
S_IRWXO = 0000007
|
||||
S_IRWXU = 0000700
|
||||
S_ISGID = 0002000
|
||||
S_ISTXT = 512
|
||||
S_ISUID = 0004000
|
||||
S_ISVTX = 0001000
|
||||
S_IWGRP = 0000020
|
||||
S_IWOTH = 0000002
|
||||
S_IWRITE = 128
|
||||
S_IWUSR = 0000200
|
||||
S_IXGRP = 0000010
|
||||
S_IXOTH = 0000001
|
||||
S_IXUSR = 0000100
|
||||
UF_APPEND = 0x00000004
|
||||
UF_COMPRESSED = 0x00000020
|
||||
UF_DATAVAULT = 0x00000080
|
||||
UF_HIDDEN = 0x00008000
|
||||
UF_IMMUTABLE = 0x00000002
|
||||
UF_NODUMP = 0x00000001
|
||||
UF_OPAQUE = 0x00000008
|
||||
UF_SETTABLE = 0x0000ffff
|
||||
UF_TRACKED = 0x00000040
|
||||
UTIME_NOW = -1
|
||||
UTIME_OMIT = -2
|
||||
X_BLKCNT_T = 0
|
||||
X_BLKSIZE_T = 0
|
||||
X_BSD_I386__TYPES_H_ = 0
|
||||
X_BSD_MACHINE_ENDIAN_H_ = 0
|
||||
X_BSD_MACHINE_TYPES_H_ = 0
|
||||
X_BSD_MACHINE__TYPES_H_ = 0
|
||||
X_CADDR_T = 0
|
||||
X_CDEFS_H_ = 0
|
||||
X_CLOCK_T = 0
|
||||
X_DARWIN_FEATURE_64_BIT_INODE = 1
|
||||
X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1
|
||||
X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3
|
||||
X_DEV_T = 0
|
||||
X_ERRNO_T = 0
|
||||
X_FD_SET = 0
|
||||
X_FILESEC_T = 0
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_FSBLKCNT_T = 0
|
||||
X_FSFILCNT_T = 0
|
||||
X_FTS_H_ = 0
|
||||
X_GID_T = 0
|
||||
X_I386__ENDIAN_H_ = 0
|
||||
X_ID_T = 0
|
||||
X_INO64_T = 0
|
||||
X_INO_T = 0
|
||||
X_INT16_T = 0
|
||||
X_INT32_T = 0
|
||||
X_INT64_T = 0
|
||||
X_INT8_T = 0
|
||||
X_INTPTR_T = 0
|
||||
X_IN_ADDR_T = 0
|
||||
X_IN_PORT_T = 0
|
||||
X_KEY_T = 0
|
||||
X_LP64 = 1
|
||||
X_MACHTYPES_H_ = 0
|
||||
X_MODE_T = 0
|
||||
X_NLINK_T = 0
|
||||
X_Nonnull = 0
|
||||
X_Null_unspecified = 0
|
||||
X_Nullable = 0
|
||||
X_OFF_T = 0
|
||||
X_OS__OSBYTEORDERI386_H = 0
|
||||
X_OS__OSBYTEORDER_H = 0
|
||||
X_PID_T = 0
|
||||
X_PTHREAD_ATTR_T = 0
|
||||
X_PTHREAD_CONDATTR_T = 0
|
||||
X_PTHREAD_COND_T = 0
|
||||
X_PTHREAD_KEY_T = 0
|
||||
X_PTHREAD_MUTEXATTR_T = 0
|
||||
X_PTHREAD_MUTEX_T = 0
|
||||
X_PTHREAD_ONCE_T = 0
|
||||
X_PTHREAD_RWLOCKATTR_T = 0
|
||||
X_PTHREAD_RWLOCK_T = 0
|
||||
X_PTHREAD_T = 0
|
||||
X_QUAD_HIGHWORD = 1
|
||||
X_QUAD_LOWWORD = 0
|
||||
X_RSIZE_T = 0
|
||||
X_SIZE_T = 0
|
||||
X_SSIZE_T = 0
|
||||
X_SUSECONDS_T = 0
|
||||
X_SYS_STAT_H_ = 0
|
||||
X_SYS_TYPES_H_ = 0
|
||||
X_SYS__ENDIAN_H_ = 0
|
||||
X_SYS__PTHREAD_TYPES_H_ = 0
|
||||
X_SYS__TYPES_H_ = 0
|
||||
X_TIME_T = 0
|
||||
X_UID_T = 0
|
||||
X_UINTPTR_T = 0
|
||||
X_USECONDS_T = 0
|
||||
X_U_CHAR = 0
|
||||
X_U_INT = 0
|
||||
X_U_INT16_T = 0
|
||||
X_U_INT32_T = 0
|
||||
X_U_INT64_T = 0
|
||||
X_U_INT8_T = 0
|
||||
X_U_LONG = 0
|
||||
X_U_SHORT = 0
|
||||
ACCESSPERMS = 511 // stat.h:297:1:
|
||||
ALLPERMS = 4095 // stat.h:299:1:
|
||||
BIG_ENDIAN = 4321 // endian.h:94:1:
|
||||
BYTE_ORDER = 1234 // endian.h:97:1:
|
||||
DEFFILEMODE = 438 // stat.h:301:1:
|
||||
EF_IS_PURGEABLE = 0x00000008 // stat.h:370:1:
|
||||
EF_IS_SPARSE = 0x00000010 // stat.h:371:1:
|
||||
EF_IS_SYNC_ROOT = 0x00000004 // stat.h:369:1:
|
||||
EF_MAY_SHARE_BLOCKS = 0x00000001 // stat.h:367:1:
|
||||
EF_NO_XATTRS = 0x00000002 // stat.h:368:1:
|
||||
FD_SETSIZE = 1024 // _fd_setsize.h:29:1:
|
||||
FTS_AGAIN = 1 // fts.h:156:1:
|
||||
FTS_BLOCK_COMPAR = 0x80000000 // fts.h:108:1:
|
||||
FTS_COMFOLLOW = 0x001 // fts.h:89:1:
|
||||
FTS_COMFOLLOWDIR = 0x400 // fts.h:97:1:
|
||||
FTS_D = 1 // fts.h:135:1:
|
||||
FTS_DC = 2 // fts.h:136:1:
|
||||
FTS_DEFAULT = 3 // fts.h:137:1:
|
||||
FTS_DNR = 4 // fts.h:138:1:
|
||||
FTS_DONTCHDIR = 0x01 // fts.h:151:1:
|
||||
FTS_DOT = 5 // fts.h:139:1:
|
||||
FTS_DP = 6 // fts.h:140:1:
|
||||
FTS_ERR = 7 // fts.h:141:1:
|
||||
FTS_F = 8 // fts.h:142:1:
|
||||
FTS_FOLLOW = 2 // fts.h:157:1:
|
||||
FTS_INIT = 9 // fts.h:143:1:
|
||||
FTS_ISW = 0x04 // fts.h:153:1:
|
||||
FTS_LOGICAL = 0x002 // fts.h:90:1:
|
||||
FTS_MAXLEVEL = 0x7fffffff // fts.h:132:1:
|
||||
FTS_NAMEONLY = 0x100 // fts.h:105:1:
|
||||
FTS_NOCHDIR = 0x004 // fts.h:91:1:
|
||||
FTS_NOINSTR = 3 // fts.h:158:1:
|
||||
FTS_NOSTAT = 0x008 // fts.h:92:1:
|
||||
FTS_NOSTAT_TYPE = 0x800 // fts.h:101:1:
|
||||
FTS_NS = 10 // fts.h:144:1:
|
||||
FTS_NSOK = 11 // fts.h:145:1:
|
||||
FTS_OPTIONMASK = 0xcff // fts.h:102:1:
|
||||
FTS_PHYSICAL = 0x010 // fts.h:93:1:
|
||||
FTS_ROOTLEVEL = 0 // fts.h:131:1:
|
||||
FTS_ROOTPARENTLEVEL = -1 // fts.h:130:1:
|
||||
FTS_SEEDOT = 0x020 // fts.h:94:1:
|
||||
FTS_SKIP = 4 // fts.h:159:1:
|
||||
FTS_SL = 12 // fts.h:146:1:
|
||||
FTS_SLNONE = 13 // fts.h:147:1:
|
||||
FTS_STOP = 0x200 // fts.h:106:1:
|
||||
FTS_SYMFOLLOW = 0x02 // fts.h:152:1:
|
||||
FTS_W = 14 // fts.h:148:1:
|
||||
FTS_WHITEOUT = 0x080 // fts.h:96:1:
|
||||
FTS_XDEV = 0x040 // fts.h:95:1:
|
||||
LITTLE_ENDIAN = 1234 // endian.h:93:1:
|
||||
NBBY = 8 // types.h:186:1:
|
||||
PDP_ENDIAN = 3412 // endian.h:95:1:
|
||||
SF_APPEND = 0x00040000 // stat.h:340:1:
|
||||
SF_ARCHIVED = 0x00010000 // stat.h:338:1:
|
||||
SF_DATALESS = 0x40000000 // stat.h:359:1:
|
||||
SF_FIRMLINK = 0x00800000 // stat.h:351:1:
|
||||
SF_IMMUTABLE = 0x00020000 // stat.h:339:1:
|
||||
SF_NOUNLINK = 0x00100000 // stat.h:342:1:
|
||||
SF_RESTRICTED = 0x00080000 // stat.h:341:1:
|
||||
SF_SETTABLE = 0x3fff0000 // stat.h:336:1:
|
||||
SF_SUPPORTED = 0x009f0000 // stat.h:335:1:
|
||||
SF_SYNTHETIC = 0xc0000000 // stat.h:337:1:
|
||||
S_BLKSIZE = 512 // stat.h:303:1:
|
||||
S_IEXEC = 64 // _s_ifmt.h:72:1:
|
||||
S_IFBLK = 0060000 // _s_ifmt.h:39:1:
|
||||
S_IFCHR = 0020000 // _s_ifmt.h:37:1:
|
||||
S_IFDIR = 0040000 // _s_ifmt.h:38:1:
|
||||
S_IFIFO = 0010000 // _s_ifmt.h:36:1:
|
||||
S_IFLNK = 0120000 // _s_ifmt.h:41:1:
|
||||
S_IFMT = 0170000 // _s_ifmt.h:35:1:
|
||||
S_IFREG = 0100000 // _s_ifmt.h:40:1:
|
||||
S_IFSOCK = 0140000 // _s_ifmt.h:42:1:
|
||||
S_IFWHT = 0160000 // _s_ifmt.h:44:1:
|
||||
S_IREAD = 256 // _s_ifmt.h:70:1:
|
||||
S_IRGRP = 0000040 // _s_ifmt.h:55:1:
|
||||
S_IROTH = 0000004 // _s_ifmt.h:60:1:
|
||||
S_IRUSR = 0000400 // _s_ifmt.h:50:1:
|
||||
S_IRWXG = 0000070 // _s_ifmt.h:54:1:
|
||||
S_IRWXO = 0000007 // _s_ifmt.h:59:1:
|
||||
S_IRWXU = 0000700 // _s_ifmt.h:49:1:
|
||||
S_ISGID = 0002000 // _s_ifmt.h:65:1:
|
||||
S_ISTXT = 512 // _s_ifmt.h:69:1:
|
||||
S_ISUID = 0004000 // _s_ifmt.h:64:1:
|
||||
S_ISVTX = 0001000 // _s_ifmt.h:66:1:
|
||||
S_IWGRP = 0000020 // _s_ifmt.h:56:1:
|
||||
S_IWOTH = 0000002 // _s_ifmt.h:61:1:
|
||||
S_IWRITE = 128 // _s_ifmt.h:71:1:
|
||||
S_IWUSR = 0000200 // _s_ifmt.h:51:1:
|
||||
S_IXGRP = 0000010 // _s_ifmt.h:57:1:
|
||||
S_IXOTH = 0000001 // _s_ifmt.h:62:1:
|
||||
S_IXUSR = 0000100 // _s_ifmt.h:52:1:
|
||||
UF_APPEND = 0x00000004 // stat.h:313:1:
|
||||
UF_COMPRESSED = 0x00000020 // stat.h:320:1:
|
||||
UF_DATAVAULT = 0x00000080 // stat.h:326:1:
|
||||
UF_HIDDEN = 0x00008000 // stat.h:330:1:
|
||||
UF_IMMUTABLE = 0x00000002 // stat.h:312:1:
|
||||
UF_NODUMP = 0x00000001 // stat.h:311:1:
|
||||
UF_OPAQUE = 0x00000008 // stat.h:314:1:
|
||||
UF_SETTABLE = 0x0000ffff // stat.h:310:1:
|
||||
UF_TRACKED = 0x00000040 // stat.h:324:1:
|
||||
UTIME_NOW = -1 // stat.h:393:1:
|
||||
UTIME_OMIT = -2 // stat.h:394:1:
|
||||
X_BLKCNT_T = 0 // _blkcnt_t.h:29:1:
|
||||
X_BLKSIZE_T = 0 // _blksize_t.h:29:1:
|
||||
X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1:
|
||||
X_BSD_MACHINE_ENDIAN_H_ = 0 // endian.h:32:1:
|
||||
X_BSD_MACHINE_TYPES_H_ = 0 // types.h:32:1:
|
||||
X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1:
|
||||
X_CADDR_T = 0 // _caddr_t.h:29:1:
|
||||
X_CDEFS_H_ = 0 // cdefs.h:68:1:
|
||||
X_CLOCK_T = 0 // _clock_t.h:29:1:
|
||||
X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1:
|
||||
X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1:
|
||||
X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1:
|
||||
X_DEV_T = 0 // _dev_t.h:29:1:
|
||||
X_ERRNO_T = 0 // _errno_t.h:29:1:
|
||||
X_FD_SET = 0 // _fd_def.h:29:1:
|
||||
X_FILESEC_T = 0 // _filesec_t.h:29:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_FSBLKCNT_T = 0 // _fsblkcnt_t.h:29:1:
|
||||
X_FSFILCNT_T = 0 // _fsfilcnt_t.h:29:1:
|
||||
X_FTS_H_ = 0 // fts.h:59:1:
|
||||
X_GID_T = 0 // _gid_t.h:29:1:
|
||||
X_I386__ENDIAN_H_ = 0 // endian.h:67:1:
|
||||
X_ID_T = 0 // _id_t.h:29:1:
|
||||
X_INO64_T = 0 // _ino64_t.h:29:1:
|
||||
X_INO_T = 0 // _ino_t.h:29:1:
|
||||
X_INT16_T = 0 // _int16_t.h:29:1:
|
||||
X_INT32_T = 0 // _int32_t.h:29:1:
|
||||
X_INT64_T = 0 // _int64_t.h:29:1:
|
||||
X_INT8_T = 0 // _int8_t.h:29:1:
|
||||
X_INTPTR_T = 0 // _intptr_t.h:29:1:
|
||||
X_IN_ADDR_T = 0 // _in_addr_t.h:29:1:
|
||||
X_IN_PORT_T = 0 // _in_port_t.h:29:1:
|
||||
X_KEY_T = 0 // _key_t.h:29:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_MACHTYPES_H_ = 0 // types.h:67:1:
|
||||
X_MODE_T = 0 // _mode_t.h:29:1:
|
||||
X_NLINK_T = 0 // _nlink_t.h:29:1:
|
||||
X_Nonnull = 0 // cdefs.h:243:1:
|
||||
X_Null_unspecified = 0 // cdefs.h:246:1:
|
||||
X_Nullable = 0 // cdefs.h:240:1:
|
||||
X_OFF_T = 0 // _off_t.h:29:1:
|
||||
X_OS__OSBYTEORDERI386_H = 0 // _OSByteOrder.h:30:1:
|
||||
X_OS__OSBYTEORDER_H = 0 // _OSByteOrder.h:30:1:
|
||||
X_PID_T = 0 // _pid_t.h:29:1:
|
||||
X_PTHREAD_ATTR_T = 0 // _pthread_attr_t.h:29:1:
|
||||
X_PTHREAD_CONDATTR_T = 0 // _pthread_condattr_t.h:29:1:
|
||||
X_PTHREAD_COND_T = 0 // _pthread_cond_t.h:29:1:
|
||||
X_PTHREAD_KEY_T = 0 // _pthread_key_t.h:29:1:
|
||||
X_PTHREAD_MUTEXATTR_T = 0 // _pthread_mutexattr_t.h:29:1:
|
||||
X_PTHREAD_MUTEX_T = 0 // _pthread_mutex_t.h:29:1:
|
||||
X_PTHREAD_ONCE_T = 0 // _pthread_once_t.h:29:1:
|
||||
X_PTHREAD_RWLOCKATTR_T = 0 // _pthread_rwlockattr_t.h:29:1:
|
||||
X_PTHREAD_RWLOCK_T = 0 // _pthread_rwlock_t.h:29:1:
|
||||
X_PTHREAD_T = 0 // _pthread_t.h:29:1:
|
||||
X_QUAD_HIGHWORD = 1 // endian.h:78:1:
|
||||
X_QUAD_LOWWORD = 0 // endian.h:79:1:
|
||||
X_RSIZE_T = 0 // _rsize_t.h:29:1:
|
||||
X_SIZE_T = 0 // _size_t.h:29:1:
|
||||
X_SSIZE_T = 0 // _ssize_t.h:29:1:
|
||||
X_SUSECONDS_T = 0 // _suseconds_t.h:29:1:
|
||||
X_SYS_STAT_H_ = 0 // stat.h:71:1:
|
||||
X_SYS_TYPES_H_ = 0 // types.h:70:1:
|
||||
X_SYS__ENDIAN_H_ = 0 // _endian.h:91:1:
|
||||
X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:30:1:
|
||||
X_TIME_T = 0 // _time_t.h:29:1:
|
||||
X_UID_T = 0 // _uid_t.h:29:1:
|
||||
X_UINTPTR_T = 0 // _uintptr_t.h:29:1:
|
||||
X_USECONDS_T = 0 // _useconds_t.h:29:1:
|
||||
X_U_CHAR = 0 // _u_char.h:29:1:
|
||||
X_U_INT = 0 // _u_int.h:29:1:
|
||||
X_U_INT16_T = 0 // _u_int16_t.h:29:1:
|
||||
X_U_INT32_T = 0 // _u_int32_t.h:29:1:
|
||||
X_U_INT64_T = 0 // _u_int64_t.h:29:1:
|
||||
X_U_INT8_T = 0 // _u_int8_t.h:29:1:
|
||||
X_U_LONG = 0 // types.h:89:1:
|
||||
X_U_SHORT = 0 // _u_short.h:29:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
+1
@@ -1889,6 +1889,7 @@ type Timezone = struct {
|
||||
|
||||
// hide bintime for _STANDALONE because this header is used for hpcboot.exe,
|
||||
// which is built with compilers which don't recognize LL suffix.
|
||||
//
|
||||
// http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html
|
||||
type Bintime = struct {
|
||||
Fsec Time_t
|
||||
|
||||
+1
@@ -1864,6 +1864,7 @@ type Timezone = struct {
|
||||
|
||||
// hide bintime for _STANDALONE because this header is used for hpcboot.exe,
|
||||
// which is built with compilers which don't recognize LL suffix.
|
||||
//
|
||||
// http://mail-index.NetBSD.org/tech-userlevel/2008/02/27/msg000181.html
|
||||
type Bintime = struct {
|
||||
Fsec Time_t
|
||||
|
||||
+594
-1699
File diff suppressed because it is too large.
Load diff
+32
-34
@@ -118,8 +118,8 @@ const (
|
||||
UTIME_OMIT = -1 // stat.h:189:1:
|
||||
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:58:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:158:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_FTS_H_ = 0 // fts.h:36:1:
|
||||
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
|
||||
@@ -133,16 +133,16 @@ const (
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:193:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
|
||||
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:168:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:167:1:
|
||||
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
|
||||
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
|
||||
X_RET_PROTECTOR = 1 // <predefined>:2:1:
|
||||
X_SELECT_DEFINED_ = 0 // select.h:126:1:
|
||||
X_SIGSET_T_DEFINED_ = 0 // select.h:121:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:173:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:178:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:49:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
|
||||
@@ -153,16 +153,16 @@ const (
|
||||
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
|
||||
X_SYS__TIME_H_ = 0 // _time.h:33:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:188:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
|
||||
X_TIMESPEC_DECLARED = 0 // select.h:48:1:
|
||||
X_TIMEVAL_DECLARED = 0 // select.h:40:1:
|
||||
X_TIME_H_ = 0 // time.h:42:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:183:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
|
||||
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
|
||||
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
|
||||
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
|
||||
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
Unix = 1 // <predefined>:344:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
@@ -183,7 +183,7 @@ type X__uint128_t = struct {
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
@@ -480,7 +480,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// get the correct setting direction for the platform and sets internal
|
||||
// ('__' prefix) macros appropriately.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
@@ -640,18 +640,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family
|
||||
type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
|
||||
type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
|
||||
type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
|
||||
type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset
|
||||
type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds
|
||||
type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:76:3 */
|
||||
} /* _types.h:75:3 */
|
||||
|
||||
// Tell sys/endian.h we have MD variants of the swap macros.
|
||||
|
||||
@@ -733,31 +732,30 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
|
||||
type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
|
||||
type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
|
||||
type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
|
||||
type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset
|
||||
type Uid_t = X__uid_t /* types.h:148:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count
|
||||
type Uid_t = X__uid_t /* types.h:147:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:159:19 */
|
||||
type Clock_t = X__clock_t /* types.h:158:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:164:21 */
|
||||
type Clockid_t = X__clockid_t /* types.h:163:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:169:18 */
|
||||
type Pid_t = X__pid_t /* types.h:168:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:179:19 */
|
||||
type Ssize_t = X__ssize_t /* types.h:178:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:184:18 */
|
||||
type Time_t = X__time_t /* types.h:183:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:189:19 */
|
||||
type Timer_t = X__timer_t /* types.h:188:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:194:18 */
|
||||
type Off_t = X__off_t /* types.h:193:18 */
|
||||
|
||||
// Major, minor numbers, dev_t's.
|
||||
|
||||
// $OpenBSD: stat.h,v 1.28 2015/04/04 18:06:08 jca Exp $
|
||||
// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $
|
||||
// $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $
|
||||
|
||||
// -
|
||||
@@ -795,7 +793,7 @@ type Off_t = X__off_t /* types.h:194:18 */
|
||||
//
|
||||
// @(#)stat.h 8.9 (Berkeley) 8/17/94
|
||||
|
||||
// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $
|
||||
// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $
|
||||
// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $
|
||||
|
||||
// Copyright (c) 1982, 1986, 1993
|
||||
@@ -859,7 +857,7 @@ type Off_t = X__off_t /* types.h:194:18 */
|
||||
//
|
||||
// @(#)select.h 8.2 (Berkeley) 1/4/94
|
||||
|
||||
// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
@@ -1031,7 +1029,7 @@ type Clockinfo = struct {
|
||||
// Written by Todd C. Miller, September 9, 2016
|
||||
// Public domain.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
|
||||
+87
-91
@@ -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_openbsd_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_openbsd_arm64.go -pkgname fts', DO NOT EDIT.
|
||||
|
||||
package fts
|
||||
|
||||
@@ -117,9 +117,9 @@ const (
|
||||
UTIME_NOW = -2 // stat.h:188:1:
|
||||
UTIME_OMIT = -1 // stat.h:189:1:
|
||||
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:58:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:158:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:60:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_FTS_H_ = 0 // fts.h:36:1:
|
||||
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
|
||||
@@ -129,21 +129,21 @@ const (
|
||||
X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
|
||||
X_LOCALE_T_DEFINED_ = 0 // time.h:106:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:193:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1:
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:57:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
|
||||
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:168:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:167:1:
|
||||
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
|
||||
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
|
||||
X_RET_PROTECTOR = 1 // <predefined>:2:1:
|
||||
X_SELECT_DEFINED_ = 0 // select.h:126:1:
|
||||
X_SIGSET_T_DEFINED_ = 0 // select.h:121:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:173:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:178:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:49:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:54:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
|
||||
X_SYS_SELECT_H_ = 0 // select.h:35:1:
|
||||
@@ -153,16 +153,16 @@ const (
|
||||
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
|
||||
X_SYS__TIME_H_ = 0 // _time.h:33:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:188:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
|
||||
X_TIMESPEC_DECLARED = 0 // select.h:48:1:
|
||||
X_TIMEVAL_DECLARED = 0 // select.h:40:1:
|
||||
X_TIME_H_ = 0 // time.h:42:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:183:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
|
||||
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
|
||||
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
|
||||
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
|
||||
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
Unix = 1 // <predefined>:360:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
@@ -183,7 +183,7 @@ type X__uint128_t = struct {
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
@@ -256,10 +256,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $
|
||||
|
||||
// Written by J.T. Conklin <[email protected]> 01/17/95.
|
||||
// Public domain.
|
||||
// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $
|
||||
|
||||
// Macro to test if we're using a specific version of gcc or later.
|
||||
|
||||
@@ -480,7 +477,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// get the correct setting direction for the platform and sets internal
|
||||
// ('__' prefix) macros appropriately.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
@@ -512,8 +509,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
//
|
||||
// @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
|
||||
// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $
|
||||
|
||||
// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
@@ -555,66 +551,68 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// (within reasonable limits).
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
type X__int8_t = int8 /* _types.h:61:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:62:24 */
|
||||
type X__int16_t = int16 /* _types.h:63:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:64:25 */
|
||||
type X__int32_t = int32 /* _types.h:65:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:66:23 */
|
||||
type X__int64_t = int64 /* _types.h:67:20 */
|
||||
type X__uint64_t = uint64 /* _types.h:68:28 */
|
||||
type X__int8_t = int8 /* _types.h:60:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:61:24 */
|
||||
type X__int16_t = int16 /* _types.h:62:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:63:25 */
|
||||
type X__int32_t = int32 /* _types.h:64:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:65:23 */
|
||||
// LONGLONG
|
||||
type X__int64_t = int64 /* _types.h:67:20 */
|
||||
// LONGLONG
|
||||
type X__uint64_t = uint64 /* _types.h:69:28 */
|
||||
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
type X__int_least8_t = X__int8_t /* _types.h:71:19 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:73:20 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:75:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:77:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */
|
||||
type X__int_least8_t = X__int8_t /* _types.h:72:19 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:74:20 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:76:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:78:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */
|
||||
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:81:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:83:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:85:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:87:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:82:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:84:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:86:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:88:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */
|
||||
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
type X__intptr_t = int64 /* _types.h:103:16 */
|
||||
type X__uintptr_t = uint64 /* _types.h:104:24 */
|
||||
type X__intptr_t = int64 /* _types.h:104:16 */
|
||||
type X__uintptr_t = uint64 /* _types.h:105:24 */
|
||||
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
type X__intmax_t = X__int64_t /* _types.h:107:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:108:21 */
|
||||
type X__intmax_t = X__int64_t /* _types.h:108:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:109:21 */
|
||||
|
||||
// Register size
|
||||
type X__register_t = int64 /* _types.h:111:16 */
|
||||
type X__register_t = int64 /* _types.h:112:16 */
|
||||
|
||||
// VM system types
|
||||
type X__vaddr_t = uint64 /* _types.h:114:24 */
|
||||
type X__paddr_t = uint64 /* _types.h:115:24 */
|
||||
type X__vsize_t = uint64 /* _types.h:116:24 */
|
||||
type X__psize_t = uint64 /* _types.h:117:24 */
|
||||
type X__vaddr_t = uint64 /* _types.h:115:24 */
|
||||
type X__paddr_t = uint64 /* _types.h:116:24 */
|
||||
type X__vsize_t = uint64 /* _types.h:117:24 */
|
||||
type X__psize_t = uint64 /* _types.h:118:24 */
|
||||
|
||||
// Standard system types
|
||||
type X__double_t = float64 /* _types.h:120:18 */
|
||||
type X__float_t = float32 /* _types.h:121:17 */
|
||||
type X__ptrdiff_t = int64 /* _types.h:122:16 */
|
||||
type X__size_t = uint64 /* _types.h:123:24 */
|
||||
type X__ssize_t = int64 /* _types.h:124:16 */
|
||||
type X__va_list = X__builtin_va_list /* _types.h:126:27 */
|
||||
type X__double_t = float64 /* _types.h:121:18 */
|
||||
type X__float_t = float32 /* _types.h:122:17 */
|
||||
type X__ptrdiff_t = int64 /* _types.h:123:16 */
|
||||
type X__size_t = uint64 /* _types.h:124:24 */
|
||||
type X__ssize_t = int64 /* _types.h:125:16 */
|
||||
type X__va_list = X__builtin_va_list /* _types.h:127:27 */
|
||||
|
||||
// Wide character support types
|
||||
type X__wchar_t = int32 /* _types.h:133:15 */
|
||||
type X__wint_t = int32 /* _types.h:135:15 */
|
||||
type X__rune_t = int32 /* _types.h:136:15 */
|
||||
type X__wctrans_t = uintptr /* _types.h:137:14 */
|
||||
type X__wctype_t = uintptr /* _types.h:138:14 */
|
||||
type X__wchar_t = int32 /* _types.h:137:15 */
|
||||
type X__wint_t = int32 /* _types.h:140:15 */
|
||||
type X__rune_t = int32 /* _types.h:141:15 */
|
||||
type X__wctrans_t = uintptr /* _types.h:142:14 */
|
||||
type X__wctype_t = uintptr /* _types.h:143:14 */
|
||||
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O
|
||||
@@ -640,18 +638,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family
|
||||
type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
|
||||
type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
|
||||
type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
|
||||
type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset
|
||||
type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds
|
||||
type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:76:3 */
|
||||
} /* _types.h:75:3 */
|
||||
|
||||
// Tell sys/endian.h we have MD variants of the swap macros.
|
||||
|
||||
@@ -733,31 +730,30 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
|
||||
type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
|
||||
type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
|
||||
type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
|
||||
type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset
|
||||
type Uid_t = X__uid_t /* types.h:148:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count
|
||||
type Uid_t = X__uid_t /* types.h:147:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:159:19 */
|
||||
type Clock_t = X__clock_t /* types.h:158:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:164:21 */
|
||||
type Clockid_t = X__clockid_t /* types.h:163:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:169:18 */
|
||||
type Pid_t = X__pid_t /* types.h:168:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:179:19 */
|
||||
type Ssize_t = X__ssize_t /* types.h:178:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:184:18 */
|
||||
type Time_t = X__time_t /* types.h:183:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:189:19 */
|
||||
type Timer_t = X__timer_t /* types.h:188:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:194:18 */
|
||||
type Off_t = X__off_t /* types.h:193:18 */
|
||||
|
||||
// Major, minor numbers, dev_t's.
|
||||
|
||||
// $OpenBSD: stat.h,v 1.28 2015/04/04 18:06:08 jca Exp $
|
||||
// $OpenBSD: stat.h,v 1.29 2022/01/11 23:59:55 jsg Exp $
|
||||
// $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $
|
||||
|
||||
// -
|
||||
@@ -795,7 +791,7 @@ type Off_t = X__off_t /* types.h:194:18 */
|
||||
//
|
||||
// @(#)stat.h 8.9 (Berkeley) 8/17/94
|
||||
|
||||
// $OpenBSD: time.h,v 1.61 2021/06/19 13:49:39 cheloha Exp $
|
||||
// $OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $
|
||||
// $NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $
|
||||
|
||||
// Copyright (c) 1982, 1986, 1993
|
||||
@@ -859,7 +855,7 @@ type Off_t = X__off_t /* types.h:194:18 */
|
||||
//
|
||||
// @(#)select.h 8.2 (Berkeley) 1/4/94
|
||||
|
||||
// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
@@ -1031,7 +1027,7 @@ type Clockinfo = struct {
|
||||
// Written by Todd C. Miller, September 9, 2016
|
||||
// Public domain.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT.
|
||||
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT.
|
||||
|
||||
package grp
|
||||
|
||||
|
||||
+1
-1
@@ -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_freebsd_386.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_openbsd_386.go -pkgname grp', DO NOT EDIT.
|
||||
|
||||
package grp
|
||||
|
||||
|
||||
+1
-1
@@ -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_openbsd_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_openbsd_arm64.go -pkgname grp', DO NOT EDIT.
|
||||
|
||||
package grp
|
||||
|
||||
|
||||
+22
-22
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo grp/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT.
|
||||
// Code generated by 'ccgo grp/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT.
|
||||
|
||||
package grp
|
||||
|
||||
@@ -15,27 +15,27 @@ var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
X_BSD_I386__TYPES_H_ = 0
|
||||
X_BSD_MACHINE__TYPES_H_ = 0
|
||||
X_CDEFS_H_ = 0
|
||||
X_DARWIN_FEATURE_64_BIT_INODE = 1
|
||||
X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1
|
||||
X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_FORTIFY_SOURCE = 2
|
||||
X_GID_T = 0
|
||||
X_GRP_H_ = 0
|
||||
X_LP64 = 1
|
||||
X_Nonnull = 0
|
||||
X_Null_unspecified = 0
|
||||
X_Nullable = 0
|
||||
X_PATH_GROUP = "/etc/group"
|
||||
X_SIZE_T = 0
|
||||
X_SYS__PTHREAD_TYPES_H_ = 0
|
||||
X_SYS__TYPES_H_ = 0
|
||||
X_UUID_STRING_T = 0
|
||||
X_UUID_T = 0
|
||||
X_UUID_UUID_H = 0
|
||||
X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1:
|
||||
X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1:
|
||||
X_CDEFS_H_ = 0 // cdefs.h:68:1:
|
||||
X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1:
|
||||
X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1:
|
||||
X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_FORTIFY_SOURCE = 2 // _types.h:65:1:
|
||||
X_GID_T = 0 // _gid_t.h:29:1:
|
||||
X_GRP_H_ = 0 // grp.h:43:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_Nonnull = 0 // cdefs.h:243:1:
|
||||
X_Null_unspecified = 0 // cdefs.h:246:1:
|
||||
X_Nullable = 0 // cdefs.h:240:1:
|
||||
X_PATH_GROUP = "/etc/group" // grp.h:50:1:
|
||||
X_SIZE_T = 0 // _size_t.h:29:1:
|
||||
X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:30:1:
|
||||
X_UUID_STRING_T = 0 // uuid.h:42:1:
|
||||
X_UUID_T = 0 // _uuid_t.h:29:1:
|
||||
X_UUID_UUID_H = 0 // uuid.h:36:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
+435
-354
@@ -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_freebsd_386.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_openbsd_386.go -pkgname grp', DO NOT EDIT.
|
||||
|
||||
package grp
|
||||
|
||||
@@ -15,21 +15,48 @@ var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
BIG_ENDIAN = 4321 // endian.h:45:1:
|
||||
BYTE_ORDER = 1234 // endian.h:47:1:
|
||||
LITTLE_ENDIAN = 1234 // endian.h:44:1:
|
||||
PDP_ENDIAN = 3412 // endian.h:46:1:
|
||||
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:58:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_GID_T_DECLARED = 0 // grp.h:50:1:
|
||||
X_GRP_H_ = 0 // grp.h:41:1:
|
||||
X_ILP32 = 1 // <predefined>:1:1:
|
||||
X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:42:1:
|
||||
X_Nonnull = 0 // cdefs.h:790:1:
|
||||
X_Null_unspecified = 0 // cdefs.h:792:1:
|
||||
X_Nullable = 0 // cdefs.h:791:1:
|
||||
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
|
||||
X_INT32_T_DEFINED_ = 0 // types.h:94:1:
|
||||
X_INT64_T_DEFINED_ = 0 // types.h:104:1:
|
||||
X_INT8_T_DEFINED_ = 0 // types.h:74:1:
|
||||
X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
|
||||
X_PATH_GROUP = "/etc/group" // grp.h:46:1:
|
||||
X_SIZE_T_DECLARED = 0 // grp.h:55:1:
|
||||
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:167:1:
|
||||
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
|
||||
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:49:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:32:1:
|
||||
I386 = 1 // <predefined>:335:1:
|
||||
Unix = 1 // <predefined>:336:1:
|
||||
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
|
||||
X_SYS_TYPES_H_ = 0 // types.h:41:1:
|
||||
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
|
||||
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
|
||||
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
|
||||
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
|
||||
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
|
||||
I386 = 1 // <predefined>:339:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
@@ -41,9 +68,10 @@ type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// $OpenBSD: grp.h,v 1.13 2018/09/13 12:31:15 millert Exp $
|
||||
// $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd Exp $
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1989, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
@@ -77,11 +105,48 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)grp.h 8.2 (Berkeley) 1/21/94
|
||||
// $FreeBSD$
|
||||
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Copyright (c) 1982, 1986, 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)types.h 8.4 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
|
||||
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
|
||||
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
@@ -112,63 +177,39 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
// $FreeBSD$
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// Testing against Clang-specific extensions.
|
||||
// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $
|
||||
|
||||
// This code has been put in place to help reduce the addition of
|
||||
// compiler specific defines in FreeBSD code. It helps to aid in
|
||||
// having a compiler-agnostic source tree.
|
||||
|
||||
// Compiler memory barriers, specific to gcc and clang.
|
||||
|
||||
// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced
|
||||
// Written by J.T. Conklin <[email protected]> 01/17/95.
|
||||
// Public domain.
|
||||
|
||||
// Macro to test if we're using a specific version of gcc or later.
|
||||
|
||||
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
|
||||
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
|
||||
// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
|
||||
// mode -- there must be no spaces between its arguments, and for nested
|
||||
// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also
|
||||
// concatenate double-quoted strings produced by the __STRING macro, but
|
||||
// this only works with ANSI C.
|
||||
//
|
||||
// __XSTRING is like __STRING, but it expands any macros in its argument
|
||||
// first. It is only available with ANSI C.
|
||||
// The __CONCAT macro is a bit tricky -- make sure you don't put spaces
|
||||
// in between its arguments. Do not use __CONCAT on double-quoted strings,
|
||||
// such as those from the __STRING macro: to concatenate strings just put
|
||||
// them next to each other.
|
||||
|
||||
// Compiler-dependent macros to help declare dead (non-returning) and
|
||||
// pure (no side effects) functions, and unused variables. They are
|
||||
// null except for versions of gcc that are known to support the features
|
||||
// properly (old versions of gcc-2 supported the dead and pure features
|
||||
// in a different (wrong) way). If we do not provide an implementation
|
||||
// for a given compiler, let the compile fail if it is told to use
|
||||
// a feature that we cannot live without.
|
||||
// GCC1 and some versions of GCC2 declare dead (non-returning) and
|
||||
// pure (no side effects) functions using "volatile" and "const";
|
||||
// unfortunately, these then cause warnings under "-ansi -pedantic".
|
||||
// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these
|
||||
// work for GNU C++ (modulo a slight glitch in the C++ grammar in
|
||||
// the distribution version of 2.5.5).
|
||||
|
||||
// Keywords added in C11.
|
||||
// __returns_twice makes the compiler not assume the function
|
||||
// only returns once. This affects registerisation of variables:
|
||||
// even local variables need to be in memory across such a call.
|
||||
// Example: setjmp()
|
||||
|
||||
// Emulation of C11 _Generic(). Unlike the previously defined C11
|
||||
// keywords, it is not possible to implement this using exactly the same
|
||||
// syntax. Therefore implement something similar under the name
|
||||
// __generic(). Unlike _Generic(), this macro can only distinguish
|
||||
// between a single type, so it requires nested invocations to
|
||||
// distinguish multiple cases.
|
||||
|
||||
// C99 Static array indices in function parameter declarations. Syntax such as:
|
||||
// void bar(int myArray[static 10]);
|
||||
// is allowed in C99 but not in C++. Define __min_size appropriately so
|
||||
// headers using it can be compiled in either language. Use like this:
|
||||
// void bar(int myArray[__min_size(10)]);
|
||||
|
||||
// XXX: should use `#if __STDC_VERSION__ < 199901'.
|
||||
|
||||
// C++11 exposes a load of C99 stuff
|
||||
|
||||
// GCC 2.95 provides `__restrict' as an extension to C90 to support the
|
||||
// C99-specific `restrict' type qualifier. We happen to use `__restrict' as
|
||||
// a way to define the `restrict' type qualifier without disturbing older
|
||||
// software that is unaware of C99 keywords.
|
||||
// __only_inline makes the compiler only use this function definition
|
||||
// for inlining; references that can't be inlined will be left as
|
||||
// external references instead of generating a local copy. The
|
||||
// matching library should include a simple extern definition for
|
||||
// the function to handle those references. c.f. ctype.h
|
||||
|
||||
// GNU C version 2.96 adds explicit branch prediction so that
|
||||
// the CPU back-end can hint the processor and also so that
|
||||
@@ -197,118 +238,78 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// basic block reordering that this affects can often generate
|
||||
// larger code.
|
||||
|
||||
// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
|
||||
// require it.
|
||||
// Delete pseudo-keywords wherever they are not available or needed.
|
||||
|
||||
// Given the pointer x to the member m of the struct s, return
|
||||
// a pointer to the containing structure. When using GCC, we first
|
||||
// assign pointer x to a local variable, to check that its type is
|
||||
// compatible with member m.
|
||||
// The __packed macro indicates that a variable or structure members
|
||||
// should have the smallest possible alignment, despite any host CPU
|
||||
// alignment requirements.
|
||||
//
|
||||
// The __aligned(x) macro specifies the minimum alignment of a
|
||||
// variable or structure.
|
||||
//
|
||||
// These macros together are useful for describing the layout and
|
||||
// alignment of messages exchanged with hardware or other systems.
|
||||
|
||||
// Compiler-dependent macros to declare that functions take printf-like
|
||||
// or scanf-like arguments. They are null except for versions of gcc
|
||||
// that are known to support the features properly (old versions of gcc-2
|
||||
// didn't permit keeping the keywords out of the application namespace).
|
||||
// "The nice thing about standards is that there are so many to choose from."
|
||||
// There are a number of "feature test macros" specified by (different)
|
||||
// standards that determine which interfaces and types the header files
|
||||
// should expose.
|
||||
//
|
||||
// Because of inconsistencies in these macros, we define our own
|
||||
// set in the private name space that end in _VISIBLE. These are
|
||||
// always defined and so headers can test their values easily.
|
||||
// Things can get tricky when multiple feature macros are defined.
|
||||
// We try to take the union of all the features requested.
|
||||
//
|
||||
// The following macros are guaranteed to have a value after cdefs.h
|
||||
// has been included:
|
||||
// __POSIX_VISIBLE
|
||||
// __XPG_VISIBLE
|
||||
// __ISO_C_VISIBLE
|
||||
// __BSD_VISIBLE
|
||||
|
||||
// Compiler-dependent macros that rely on FreeBSD-specific extensions.
|
||||
// X/Open Portability Guides and Single Unix Specifications.
|
||||
// _XOPEN_SOURCE XPG3
|
||||
// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
|
||||
// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
|
||||
// _XOPEN_SOURCE == 500 XPG5
|
||||
// _XOPEN_SOURCE == 520 XPG5v2
|
||||
// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI
|
||||
// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI
|
||||
//
|
||||
// The XPG spec implies a specific value for _POSIX_C_SOURCE.
|
||||
|
||||
// Embed the rcs id of a source file in the resulting library. Note that in
|
||||
// more recent ELF binutils, we use .ident allowing the ID to be stripped.
|
||||
// Usage:
|
||||
// __FBSDID("$FreeBSD$");
|
||||
// POSIX macros, these checks must follow the XOPEN ones above.
|
||||
//
|
||||
// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE)
|
||||
// _POSIX_C_SOURCE == 1 1003.1-1990
|
||||
// _POSIX_C_SOURCE == 2 1003.2-1992
|
||||
// _POSIX_C_SOURCE == 199309L 1003.1b-1993
|
||||
// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
|
||||
// and the omnibus ISO/IEC 9945-1:1996
|
||||
// _POSIX_C_SOURCE == 200112L 1003.1-2001
|
||||
// _POSIX_C_SOURCE == 200809L 1003.1-2008
|
||||
//
|
||||
// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
|
||||
// this may be overridden by the _ISOC99_SOURCE macro later.
|
||||
|
||||
// _ANSI_SOURCE means to expose ANSI C89 interfaces only.
|
||||
// If the user defines it in addition to one of the POSIX or XOPEN
|
||||
// macros, assume the POSIX/XOPEN macro(s) should take precedence.
|
||||
|
||||
// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
|
||||
// override any of the other macros since they are non-exclusive.
|
||||
|
||||
// Finally deal with BSD-specific interfaces that are not covered
|
||||
// by any standards. We expose these when none of the POSIX or XPG
|
||||
// macros is defined or if the user explicitly asks for them.
|
||||
|
||||
// Default values.
|
||||
|
||||
// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
|
||||
|
||||
// -
|
||||
// The following definitions are an extension of the behavior originally
|
||||
// implemented in <sys/_posix.h>, but with a different level of granularity.
|
||||
// POSIX.1 requires that the macros we test be defined before any standard
|
||||
// header file is included.
|
||||
//
|
||||
// Here's a quick run-down of the versions:
|
||||
// defined(_POSIX_SOURCE) 1003.1-1988
|
||||
// _POSIX_C_SOURCE == 1 1003.1-1990
|
||||
// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
|
||||
// _POSIX_C_SOURCE == 199309 1003.1b-1993
|
||||
// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
|
||||
// and the omnibus ISO/IEC 9945-1: 1996
|
||||
// _POSIX_C_SOURCE == 200112 1003.1-2001
|
||||
// _POSIX_C_SOURCE == 200809 1003.1-2008
|
||||
//
|
||||
// In addition, the X/Open Portability Guide, which is now the Single UNIX
|
||||
// Specification, defines a feature-test macro which indicates the version of
|
||||
// that specification, and which subsumes _POSIX_C_SOURCE.
|
||||
//
|
||||
// Our macros begin with two underscores to avoid namespace screwage.
|
||||
|
||||
// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1.
|
||||
|
||||
// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2.
|
||||
|
||||
// Deal with various X/Open Portability Guides and Single UNIX Spec.
|
||||
|
||||
// Deal with all versions of POSIX. The ordering relative to the tests above is
|
||||
// important.
|
||||
// -
|
||||
// Deal with _ANSI_SOURCE:
|
||||
// If it is defined, and no other compilation environment is explicitly
|
||||
// requested, then define our internal feature-test macros to zero. This
|
||||
// makes no difference to the preprocessor (undefined symbols in preprocessing
|
||||
// expressions are defined to have value zero), but makes it more convenient for
|
||||
// a test program to print out the values.
|
||||
//
|
||||
// If a program mistakenly defines _ANSI_SOURCE and some other macro such as
|
||||
// _POSIX_C_SOURCE, we will assume that it wants the broader compilation
|
||||
// environment (and in fact we will never get here).
|
||||
|
||||
// User override __EXT1_VISIBLE
|
||||
|
||||
// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h
|
||||
// translates them to __ARM_ARCH and the modern feature symbols defined by ARM.
|
||||
|
||||
// Nullability qualifiers: currently only supported by Clang.
|
||||
|
||||
// Type Safety Checking
|
||||
//
|
||||
// Clang provides additional attributes to enable checking type safety
|
||||
// properties that cannot be enforced by the C type system.
|
||||
|
||||
// Lock annotations.
|
||||
//
|
||||
// Clang provides support for doing basic thread-safety tests at
|
||||
// compile-time, by marking which locks will/should be held when
|
||||
// entering/leaving a functions.
|
||||
//
|
||||
// Furthermore, it is also possible to annotate variables and structure
|
||||
// members to enforce that they are only accessed when certain locks are
|
||||
// held.
|
||||
|
||||
// Structure implements a lock.
|
||||
|
||||
// Function acquires an exclusive or shared lock.
|
||||
|
||||
// Function attempts to acquire an exclusive or shared lock.
|
||||
|
||||
// Function releases a lock.
|
||||
|
||||
// Function asserts that an exclusive or shared lock is held.
|
||||
|
||||
// Function requires that an exclusive or shared lock is or is not held.
|
||||
|
||||
// Function should not be analyzed.
|
||||
|
||||
// Function or variable should not be sanitized, e.g., by AddressSanitizer.
|
||||
// GCC has the nosanitize attribute, but as a function attribute only, and
|
||||
// warns on use as a variable attribute.
|
||||
|
||||
// Guard variables and structure members by lock.
|
||||
|
||||
// Alignment builtins for better type checking and improved code generation.
|
||||
// Provide fallback versions for other compilers (GCC/Clang < 10):
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
//
|
||||
// Copyright (c) 2002 Mike Barcroft <[email protected]>
|
||||
// All rights reserved.
|
||||
// Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
@@ -319,23 +320,28 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// $FreeBSD$
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Public definitions for little- and big-endian systems.
|
||||
// This file should be included as <endian.h> in userspace and as
|
||||
// <sys/endian.h> in the kernel.
|
||||
//
|
||||
// System headers that need endian information but that can't or don't
|
||||
// want to export the public names here should include <sys/_endian.h>
|
||||
// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
|
||||
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
|
||||
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
@@ -366,19 +372,12 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
// $FreeBSD$
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $
|
||||
|
||||
// -
|
||||
// This file is in the public domain.
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-4-Clause
|
||||
//
|
||||
// Copyright (c) 2002 Mike Barcroft <[email protected]>
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
@@ -388,38 +387,26 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. All advertising materials mentioning features or use of this software
|
||||
// must display the following acknowledgement:
|
||||
// This product includes software developed by the University of
|
||||
// California, Berkeley and its contributors.
|
||||
// 4. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
// From: @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
// $FreeBSD$
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Internal endianness macros. This pulls in <machine/endian.h> to
|
||||
// get the correct setting direction for the platform and sets internal
|
||||
// ('__' prefix) macros appropriately.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// This file is in the public domain.
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1988, 1993
|
||||
// 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
|
||||
@@ -446,162 +433,256 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)limits.h 8.3 (Berkeley) 1/4/94
|
||||
// $FreeBSD$
|
||||
// @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
|
||||
// According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
// #if preprocessing directives. Additionally, the expression must have the
|
||||
// same type as would an expression that is an object of the corresponding
|
||||
// type converted according to the integral promotions. The subtraction for
|
||||
// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $
|
||||
|
||||
// max value for an unsigned long long
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
// @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
|
||||
// Minimum signal stack size.
|
||||
|
||||
// Basic types upon which most other types are built.
|
||||
type X__int8_t = int8 /* _types.h:55:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:56:24 */
|
||||
type X__int16_t = int16 /* _types.h:57:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:58:25 */
|
||||
type X__int32_t = int32 /* _types.h:59:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:60:23 */
|
||||
|
||||
type X__int64_t = int64 /* _types.h:66:20 */
|
||||
// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
|
||||
// value for all data types (int, long, ...). The result is an
|
||||
// unsigned long and must be cast to any desired pointer type.
|
||||
//
|
||||
// _ALIGNED_POINTER is a boolean macro that checks whether an address
|
||||
// is valid to fetch data elements of type t from on this architecture.
|
||||
// This does not reflect the optimal alignment, just the possibility
|
||||
// (within reasonable limits).
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
type X__int8_t = int8 /* _types.h:61:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:62:24 */
|
||||
type X__int16_t = int16 /* _types.h:63:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:64:25 */
|
||||
type X__int32_t = int32 /* _types.h:65:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:66:23 */
|
||||
type X__int64_t = int64 /* _types.h:67:20 */
|
||||
type X__uint64_t = uint64 /* _types.h:68:28 */
|
||||
|
||||
// Standard type definitions.
|
||||
type X__clock_t = uint32 /* _types.h:84:23 */
|
||||
type X__critical_t = X__int32_t /* _types.h:85:19 */
|
||||
type X__double_t = float64 /* _types.h:87:21 */
|
||||
type X__float_t = float64 /* _types.h:88:21 */
|
||||
type X__intfptr_t = X__int32_t /* _types.h:90:19 */
|
||||
type X__intptr_t = X__int32_t /* _types.h:91:19 */
|
||||
type X__intmax_t = X__int64_t /* _types.h:93:19 */
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:94:19 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:95:19 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:96:19 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:97:19 */
|
||||
type X__int_least8_t = X__int8_t /* _types.h:98:18 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:99:19 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:100:19 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:101:19 */
|
||||
type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */
|
||||
type X__register_t = X__int32_t /* _types.h:113:19 */
|
||||
type X__segsz_t = X__int32_t /* _types.h:114:19 */
|
||||
type X__size_t = X__uint32_t /* _types.h:115:20 */
|
||||
type X__ssize_t = X__int32_t /* _types.h:116:19 */
|
||||
type X__time_t = X__int32_t /* _types.h:117:19 */
|
||||
type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */
|
||||
type X__uintptr_t = X__uint32_t /* _types.h:119:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:121:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */
|
||||
type X__u_register_t = X__uint32_t /* _types.h:136:20 */
|
||||
type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */
|
||||
type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */
|
||||
type X__vm_size_t = X__uint32_t /* _types.h:139:20 */
|
||||
type X___wchar_t = int32 /* _types.h:141:14 */
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
type X__int_least8_t = X__int8_t /* _types.h:71:19 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:73:20 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:75:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:77:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */
|
||||
|
||||
// Standard type definitions.
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count
|
||||
type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()...
|
||||
type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags
|
||||
type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */
|
||||
type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */
|
||||
type X__gid_t = X__uint32_t /* _types.h:46:20 */
|
||||
type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t
|
||||
type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number
|
||||
type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC)
|
||||
type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP)
|
||||
type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions
|
||||
type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions
|
||||
type X__nl_item = int32 /* _types.h:53:14 */
|
||||
type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count
|
||||
type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset
|
||||
type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias)
|
||||
type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group]
|
||||
type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally
|
||||
// signed, because of legacy code
|
||||
// that uses -1 for RLIM_INFINITY
|
||||
type X__sa_family_t = X__uint8_t /* _types.h:61:19 */
|
||||
type X__socklen_t = X__uint32_t /* _types.h:62:20 */
|
||||
type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed)
|
||||
type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()...
|
||||
type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()...
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */
|
||||
type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned)
|
||||
type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset.
|
||||
type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset.
|
||||
type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier.
|
||||
type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:81:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:83:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:85:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:87:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */
|
||||
|
||||
// Unusual type definitions.
|
||||
// rune_t is declared to be an “int” instead of the more natural
|
||||
// “unsigned long” or “long”. Two things are happening here. It is not
|
||||
// unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
|
||||
// it looks like 10646 will be a 31 bit standard. This means that if your
|
||||
// ints cannot hold 32 bits, you will be in trouble. The reason an int was
|
||||
// chosen over a long is that the is*() and to*() routines take ints (says
|
||||
// ANSI C), but they use __ct_rune_t instead of int.
|
||||
//
|
||||
// NOTE: rune_t is not covered by ANSI nor other standards, and should not
|
||||
// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and
|
||||
// rune_t must be the same type. Also, wint_t should be able to hold all
|
||||
// members of the largest character set plus one extra value (WEOF), and
|
||||
// must be at least 16 bits.
|
||||
type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs
|
||||
type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above)
|
||||
type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above)
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
type X__intptr_t = int32 /* _types.h:103:16 */
|
||||
type X__uintptr_t = uint32 /* _types.h:104:24 */
|
||||
|
||||
// Clang already provides these types as built-ins, but only in C++ mode.
|
||||
type X__char16_t = X__uint_least16_t /* _types.h:97:26 */
|
||||
type X__char32_t = X__uint_least32_t /* _types.h:98:26 */
|
||||
// In C++11, char16_t and char32_t are built-in types.
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
type X__intmax_t = X__int64_t /* _types.h:107:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:108:21 */
|
||||
|
||||
type X__max_align_t = struct {
|
||||
F__max_align1 int64
|
||||
F__max_align2 float64
|
||||
} /* _types.h:111:3 */
|
||||
// Register size
|
||||
type X__register_t = int32 /* _types.h:111:16 */
|
||||
|
||||
type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number
|
||||
// VM system types
|
||||
type X__vaddr_t = uint32 /* _types.h:114:24 */
|
||||
type X__paddr_t = uint32 /* _types.h:115:24 */
|
||||
type X__vsize_t = uint32 /* _types.h:116:24 */
|
||||
type X__psize_t = uint32 /* _types.h:117:24 */
|
||||
|
||||
type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number
|
||||
// Standard system types
|
||||
type X__double_t = float64 /* _types.h:120:22 */
|
||||
type X__float_t = float64 /* _types.h:121:22 */
|
||||
type X__ptrdiff_t = int32 /* _types.h:122:16 */
|
||||
type X__size_t = uint32 /* _types.h:123:24 */
|
||||
type X__ssize_t = int32 /* _types.h:124:16 */
|
||||
type X__va_list = X__builtin_va_list /* _types.h:126:27 */
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state during multibyte
|
||||
// stream conversions.
|
||||
// Wide character support types
|
||||
type X__wchar_t = int32 /* _types.h:133:15 */
|
||||
type X__wint_t = int32 /* _types.h:135:15 */
|
||||
type X__rune_t = int32 /* _types.h:136:15 */
|
||||
type X__wctrans_t = uintptr /* _types.h:137:14 */
|
||||
type X__wctype_t = uintptr /* _types.h:138:14 */
|
||||
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O
|
||||
type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC
|
||||
type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers
|
||||
type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id
|
||||
type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number
|
||||
type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number
|
||||
type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count
|
||||
type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count
|
||||
type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id
|
||||
type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid
|
||||
type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address
|
||||
type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type
|
||||
type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number
|
||||
type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC)
|
||||
type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions
|
||||
type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count
|
||||
type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size
|
||||
type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id
|
||||
type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit
|
||||
type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type
|
||||
type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
|
||||
type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
|
||||
type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed)
|
||||
type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint32
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:124:3 */
|
||||
} /* _types.h:75:3 */
|
||||
|
||||
type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */
|
||||
// Tell sys/endian.h we have MD variants of the swap macros.
|
||||
|
||||
// Types for varargs. These are all provided by builtin types these
|
||||
// days, so centralize their definition.
|
||||
type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc
|
||||
type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers
|
||||
// Note that these macros evaluate their arguments several times.
|
||||
|
||||
// When the following macro is defined, the system uses 64-bit inode numbers.
|
||||
// Programs can use this to avoid including <sys/param.h>, with its associated
|
||||
// namespace pollution.
|
||||
// Public names
|
||||
|
||||
type Gid_t = X__gid_t /* grp.h:49:18 */
|
||||
// These are specified to be function-like macros to match the spec
|
||||
|
||||
// POSIX names
|
||||
|
||||
// original BSD names
|
||||
|
||||
// these were exposed here before
|
||||
|
||||
// ancient stuff
|
||||
|
||||
type U_char = uint8 /* types.h:51:23 */
|
||||
type U_short = uint16 /* types.h:52:24 */
|
||||
type U_int = uint32 /* types.h:53:22 */
|
||||
type U_long = uint32 /* types.h:54:23 */
|
||||
|
||||
type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility
|
||||
type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility
|
||||
type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility
|
||||
type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility
|
||||
|
||||
type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id
|
||||
type Register_t = X__register_t /* types.h:62:22 */ // register-sized type
|
||||
|
||||
// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE
|
||||
// but the rest of the includes are not ready for that yet.
|
||||
|
||||
type Int8_t = X__int8_t /* types.h:75:19 */
|
||||
|
||||
type Uint8_t = X__uint8_t /* types.h:80:20 */
|
||||
|
||||
type Int16_t = X__int16_t /* types.h:85:20 */
|
||||
|
||||
type Uint16_t = X__uint16_t /* types.h:90:21 */
|
||||
|
||||
type Int32_t = X__int32_t /* types.h:95:20 */
|
||||
|
||||
type Uint32_t = X__uint32_t /* types.h:100:21 */
|
||||
|
||||
type Int64_t = X__int64_t /* types.h:105:20 */
|
||||
|
||||
type Uint64_t = X__uint64_t /* types.h:110:21 */
|
||||
|
||||
// BSD-style unsigned bits types
|
||||
type U_int8_t = X__uint8_t /* types.h:114:19 */
|
||||
type U_int16_t = X__uint16_t /* types.h:115:20 */
|
||||
type U_int32_t = X__uint32_t /* types.h:116:20 */
|
||||
type U_int64_t = X__uint64_t /* types.h:117:20 */
|
||||
|
||||
// quads, deprecated in favor of 64 bit int types
|
||||
type Quad_t = X__int64_t /* types.h:120:19 */
|
||||
type U_quad_t = X__uint64_t /* types.h:121:20 */
|
||||
|
||||
// VM system types
|
||||
type Vaddr_t = X__vaddr_t /* types.h:125:19 */
|
||||
type Paddr_t = X__paddr_t /* types.h:126:19 */
|
||||
type Vsize_t = X__vsize_t /* types.h:127:19 */
|
||||
type Psize_t = X__psize_t /* types.h:128:19 */
|
||||
|
||||
// Standard system types
|
||||
type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file
|
||||
type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O
|
||||
type Caddr_t = uintptr /* types.h:134:14 */ // core address
|
||||
type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address
|
||||
type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address
|
||||
type Dev_t = X__dev_t /* types.h:137:18 */ // device number
|
||||
type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number
|
||||
type Gid_t = X__gid_t /* types.h:139:18 */ // group id
|
||||
type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid
|
||||
type Ino_t = X__ino_t /* types.h:141:18 */ // inode number
|
||||
type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC)
|
||||
type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
|
||||
type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
|
||||
type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
|
||||
type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
|
||||
type Uid_t = X__uid_t /* types.h:147:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:158:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:163:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:168:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:178:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:183:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:188:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:193:18 */
|
||||
|
||||
// Major, minor numbers, dev_t's.
|
||||
|
||||
type Group = struct {
|
||||
Fgr_name uintptr
|
||||
Fgr_passwd uintptr
|
||||
Fgr_gid Gid_t
|
||||
Fgr_mem uintptr
|
||||
} /* grp.h:58:1 */
|
||||
} /* grp.h:50:1 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
||||
+28
-30
@@ -21,8 +21,8 @@ const (
|
||||
PDP_ENDIAN = 3412 // endian.h:46:1:
|
||||
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:58:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:158:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_GRP_H_ = 0 // grp.h:41:1:
|
||||
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
|
||||
@@ -35,28 +35,28 @@ const (
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:193:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
|
||||
X_PATH_GROUP = "/etc/group" // grp.h:46:1:
|
||||
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:168:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:167:1:
|
||||
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
|
||||
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
|
||||
X_RET_PROTECTOR = 1 // <predefined>:2:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:173:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:178:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:49:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
|
||||
X_SYS_TYPES_H_ = 0 // types.h:41:1:
|
||||
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:188:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:183:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
|
||||
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
|
||||
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
|
||||
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
|
||||
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
Unix = 1 // <predefined>:344:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
@@ -115,7 +115,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
//
|
||||
// @(#)grp.h 8.2 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
@@ -412,7 +412,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// get the correct setting direction for the platform and sets internal
|
||||
// ('__' prefix) macros appropriately.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
@@ -572,18 +572,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family
|
||||
type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
|
||||
type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
|
||||
type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
|
||||
type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset
|
||||
type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds
|
||||
type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:76:3 */
|
||||
} /* _types.h:75:3 */
|
||||
|
||||
// Tell sys/endian.h we have MD variants of the swap macros.
|
||||
|
||||
@@ -665,27 +664,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
|
||||
type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
|
||||
type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
|
||||
type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
|
||||
type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset
|
||||
type Uid_t = X__uid_t /* types.h:148:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count
|
||||
type Uid_t = X__uid_t /* types.h:147:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:159:19 */
|
||||
type Clock_t = X__clock_t /* types.h:158:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:164:21 */
|
||||
type Clockid_t = X__clockid_t /* types.h:163:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:169:18 */
|
||||
type Pid_t = X__pid_t /* types.h:168:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:179:19 */
|
||||
type Ssize_t = X__ssize_t /* types.h:178:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:184:18 */
|
||||
type Time_t = X__time_t /* types.h:183:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:189:19 */
|
||||
type Timer_t = X__timer_t /* types.h:188:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:194:18 */
|
||||
type Off_t = X__off_t /* types.h:193:18 */
|
||||
|
||||
// Major, minor numbers, dev_t's.
|
||||
|
||||
|
||||
+83
-87
@@ -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_openbsd_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_openbsd_arm64.go -pkgname grp', DO NOT EDIT.
|
||||
|
||||
package grp
|
||||
|
||||
@@ -20,9 +20,9 @@ const (
|
||||
LITTLE_ENDIAN = 1234 // endian.h:44:1:
|
||||
PDP_ENDIAN = 3412 // endian.h:46:1:
|
||||
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:58:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:163:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:158:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:60:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_GRP_H_ = 0 // grp.h:41:1:
|
||||
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
|
||||
@@ -31,32 +31,32 @@ const (
|
||||
X_INT8_T_DEFINED_ = 0 // types.h:74:1:
|
||||
X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:193:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1:
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:57:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
|
||||
X_PATH_GROUP = "/etc/group" // grp.h:46:1:
|
||||
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:168:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:167:1:
|
||||
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
|
||||
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
|
||||
X_RET_PROTECTOR = 1 // <predefined>:2:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:173:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:178:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:49:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:54:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
|
||||
X_SYS_TYPES_H_ = 0 // types.h:41:1:
|
||||
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:188:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:183:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
|
||||
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
|
||||
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
|
||||
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
|
||||
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
Unix = 1 // <predefined>:360:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
@@ -115,7 +115,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
//
|
||||
// @(#)grp.h 8.2 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
@@ -188,10 +188,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $
|
||||
|
||||
// Written by J.T. Conklin <[email protected]> 01/17/95.
|
||||
// Public domain.
|
||||
// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $
|
||||
|
||||
// Macro to test if we're using a specific version of gcc or later.
|
||||
|
||||
@@ -412,7 +409,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// get the correct setting direction for the platform and sets internal
|
||||
// ('__' prefix) macros appropriately.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
@@ -444,8 +441,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
//
|
||||
// @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
|
||||
// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $
|
||||
|
||||
// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
@@ -487,66 +483,68 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
||||
// (within reasonable limits).
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
type X__int8_t = int8 /* _types.h:61:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:62:24 */
|
||||
type X__int16_t = int16 /* _types.h:63:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:64:25 */
|
||||
type X__int32_t = int32 /* _types.h:65:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:66:23 */
|
||||
type X__int64_t = int64 /* _types.h:67:20 */
|
||||
type X__uint64_t = uint64 /* _types.h:68:28 */
|
||||
type X__int8_t = int8 /* _types.h:60:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:61:24 */
|
||||
type X__int16_t = int16 /* _types.h:62:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:63:25 */
|
||||
type X__int32_t = int32 /* _types.h:64:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:65:23 */
|
||||
// LONGLONG
|
||||
type X__int64_t = int64 /* _types.h:67:20 */
|
||||
// LONGLONG
|
||||
type X__uint64_t = uint64 /* _types.h:69:28 */
|
||||
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
type X__int_least8_t = X__int8_t /* _types.h:71:19 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:73:20 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:75:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:77:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */
|
||||
type X__int_least8_t = X__int8_t /* _types.h:72:19 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:74:20 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:76:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:78:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */
|
||||
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:81:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:83:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:85:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:87:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:82:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:84:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:86:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:88:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */
|
||||
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
type X__intptr_t = int64 /* _types.h:103:16 */
|
||||
type X__uintptr_t = uint64 /* _types.h:104:24 */
|
||||
type X__intptr_t = int64 /* _types.h:104:16 */
|
||||
type X__uintptr_t = uint64 /* _types.h:105:24 */
|
||||
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
type X__intmax_t = X__int64_t /* _types.h:107:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:108:21 */
|
||||
type X__intmax_t = X__int64_t /* _types.h:108:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:109:21 */
|
||||
|
||||
// Register size
|
||||
type X__register_t = int64 /* _types.h:111:16 */
|
||||
type X__register_t = int64 /* _types.h:112:16 */
|
||||
|
||||
// VM system types
|
||||
type X__vaddr_t = uint64 /* _types.h:114:24 */
|
||||
type X__paddr_t = uint64 /* _types.h:115:24 */
|
||||
type X__vsize_t = uint64 /* _types.h:116:24 */
|
||||
type X__psize_t = uint64 /* _types.h:117:24 */
|
||||
type X__vaddr_t = uint64 /* _types.h:115:24 */
|
||||
type X__paddr_t = uint64 /* _types.h:116:24 */
|
||||
type X__vsize_t = uint64 /* _types.h:117:24 */
|
||||
type X__psize_t = uint64 /* _types.h:118:24 */
|
||||
|
||||
// Standard system types
|
||||
type X__double_t = float64 /* _types.h:120:18 */
|
||||
type X__float_t = float32 /* _types.h:121:17 */
|
||||
type X__ptrdiff_t = int64 /* _types.h:122:16 */
|
||||
type X__size_t = uint64 /* _types.h:123:24 */
|
||||
type X__ssize_t = int64 /* _types.h:124:16 */
|
||||
type X__va_list = X__builtin_va_list /* _types.h:126:27 */
|
||||
type X__double_t = float64 /* _types.h:121:18 */
|
||||
type X__float_t = float32 /* _types.h:122:17 */
|
||||
type X__ptrdiff_t = int64 /* _types.h:123:16 */
|
||||
type X__size_t = uint64 /* _types.h:124:24 */
|
||||
type X__ssize_t = int64 /* _types.h:125:16 */
|
||||
type X__va_list = X__builtin_va_list /* _types.h:127:27 */
|
||||
|
||||
// Wide character support types
|
||||
type X__wchar_t = int32 /* _types.h:133:15 */
|
||||
type X__wint_t = int32 /* _types.h:135:15 */
|
||||
type X__rune_t = int32 /* _types.h:136:15 */
|
||||
type X__wctrans_t = uintptr /* _types.h:137:14 */
|
||||
type X__wctype_t = uintptr /* _types.h:138:14 */
|
||||
type X__wchar_t = int32 /* _types.h:137:15 */
|
||||
type X__wint_t = int32 /* _types.h:140:15 */
|
||||
type X__rune_t = int32 /* _types.h:141:15 */
|
||||
type X__wctrans_t = uintptr /* _types.h:142:14 */
|
||||
type X__wctype_t = uintptr /* _types.h:143:14 */
|
||||
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O
|
||||
@@ -572,18 +570,17 @@ type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family
|
||||
type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
|
||||
type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
|
||||
type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
|
||||
type X__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset
|
||||
type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:67:20 */ // microseconds
|
||||
type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:76:3 */
|
||||
} /* _types.h:75:3 */
|
||||
|
||||
// Tell sys/endian.h we have MD variants of the swap macros.
|
||||
|
||||
@@ -665,27 +662,26 @@ type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
|
||||
type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
|
||||
type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
|
||||
type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
|
||||
type Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset
|
||||
type Uid_t = X__uid_t /* types.h:148:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count
|
||||
type Uid_t = X__uid_t /* types.h:147:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:159:19 */
|
||||
type Clock_t = X__clock_t /* types.h:158:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:164:21 */
|
||||
type Clockid_t = X__clockid_t /* types.h:163:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:169:18 */
|
||||
type Pid_t = X__pid_t /* types.h:168:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:179:19 */
|
||||
type Ssize_t = X__ssize_t /* types.h:178:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:184:18 */
|
||||
type Time_t = X__time_t /* types.h:183:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:189:19 */
|
||||
type Timer_t = X__timer_t /* types.h:188:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:194:18 */
|
||||
type Off_t = X__off_t /* types.h:193:18 */
|
||||
|
||||
// Major, minor numbers, dev_t's.
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo langinfo/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o langinfo/langinfo_darwin_amd64.go -pkgname langinfo', DO NOT EDIT.
|
||||
// Code generated by 'ccgo langinfo/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_darwin_amd64.go -pkgname langinfo', DO NOT EDIT.
|
||||
|
||||
package langinfo
|
||||
|
||||
|
||||
+1
-1
@@ -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_freebsd_386.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_openbsd_386.go -pkgname langinfo', DO NOT EDIT.
|
||||
|
||||
package langinfo
|
||||
|
||||
|
||||
+1
-1
@@ -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_openbsd_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_openbsd_arm64.go -pkgname langinfo', DO NOT EDIT.
|
||||
|
||||
package langinfo
|
||||
|
||||
|
||||
+75
-75
@@ -1,4 +1,4 @@
|
||||
// Code generated by 'ccgo langinfo/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o langinfo/langinfo_darwin_amd64.go -pkgname langinfo', DO NOT EDIT.
|
||||
// Code generated by 'ccgo langinfo/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o langinfo/langinfo_darwin_amd64.go -pkgname langinfo', DO NOT EDIT.
|
||||
|
||||
package langinfo
|
||||
|
||||
@@ -15,80 +15,80 @@ var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
ABDAY_1 = 14
|
||||
ABDAY_2 = 15
|
||||
ABDAY_3 = 16
|
||||
ABDAY_4 = 17
|
||||
ABDAY_5 = 18
|
||||
ABDAY_6 = 19
|
||||
ABDAY_7 = 20
|
||||
ABMON_1 = 33
|
||||
ABMON_10 = 42
|
||||
ABMON_11 = 43
|
||||
ABMON_12 = 44
|
||||
ABMON_2 = 34
|
||||
ABMON_3 = 35
|
||||
ABMON_4 = 36
|
||||
ABMON_5 = 37
|
||||
ABMON_6 = 38
|
||||
ABMON_7 = 39
|
||||
ABMON_8 = 40
|
||||
ABMON_9 = 41
|
||||
ALT_DIGITS = 49
|
||||
AM_STR = 5
|
||||
CODESET = 0
|
||||
CRNCYSTR = 56
|
||||
DAY_1 = 7
|
||||
DAY_2 = 8
|
||||
DAY_3 = 9
|
||||
DAY_4 = 10
|
||||
DAY_5 = 11
|
||||
DAY_6 = 12
|
||||
DAY_7 = 13
|
||||
D_FMT = 2
|
||||
D_MD_ORDER = 57
|
||||
D_T_FMT = 1
|
||||
ERA = 45
|
||||
ERA_D_FMT = 46
|
||||
ERA_D_T_FMT = 47
|
||||
ERA_T_FMT = 48
|
||||
MON_1 = 21
|
||||
MON_10 = 30
|
||||
MON_11 = 31
|
||||
MON_12 = 32
|
||||
MON_2 = 22
|
||||
MON_3 = 23
|
||||
MON_4 = 24
|
||||
MON_5 = 25
|
||||
MON_6 = 26
|
||||
MON_7 = 27
|
||||
MON_8 = 28
|
||||
MON_9 = 29
|
||||
NOEXPR = 53
|
||||
NOSTR = 55
|
||||
PM_STR = 6
|
||||
RADIXCHAR = 50
|
||||
THOUSEP = 51
|
||||
T_FMT = 3
|
||||
T_FMT_AMPM = 4
|
||||
YESEXPR = 52
|
||||
YESSTR = 54
|
||||
X_BSD_I386__TYPES_H_ = 0
|
||||
X_BSD_MACHINE__TYPES_H_ = 0
|
||||
X_CDEFS_H_ = 0
|
||||
X_DARWIN_FEATURE_64_BIT_INODE = 1
|
||||
X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1
|
||||
X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_FORTIFY_SOURCE = 2
|
||||
X_LANGINFO_H_ = 0
|
||||
X_LP64 = 1
|
||||
X_NL_ITEM = 0
|
||||
X_Nonnull = 0
|
||||
X_Null_unspecified = 0
|
||||
X_Nullable = 0
|
||||
X_SYS__PTHREAD_TYPES_H_ = 0
|
||||
X_SYS__TYPES_H_ = 0
|
||||
ABDAY_1 = 14 // langinfo.h:53:1:
|
||||
ABDAY_2 = 15 // langinfo.h:54:1:
|
||||
ABDAY_3 = 16 // langinfo.h:55:1:
|
||||
ABDAY_4 = 17 // langinfo.h:56:1:
|
||||
ABDAY_5 = 18 // langinfo.h:57:1:
|
||||
ABDAY_6 = 19 // langinfo.h:58:1:
|
||||
ABDAY_7 = 20 // langinfo.h:59:1:
|
||||
ABMON_1 = 33 // langinfo.h:76:1:
|
||||
ABMON_10 = 42 // langinfo.h:85:1:
|
||||
ABMON_11 = 43 // langinfo.h:86:1:
|
||||
ABMON_12 = 44 // langinfo.h:87:1:
|
||||
ABMON_2 = 34 // langinfo.h:77:1:
|
||||
ABMON_3 = 35 // langinfo.h:78:1:
|
||||
ABMON_4 = 36 // langinfo.h:79:1:
|
||||
ABMON_5 = 37 // langinfo.h:80:1:
|
||||
ABMON_6 = 38 // langinfo.h:81:1:
|
||||
ABMON_7 = 39 // langinfo.h:82:1:
|
||||
ABMON_8 = 40 // langinfo.h:83:1:
|
||||
ABMON_9 = 41 // langinfo.h:84:1:
|
||||
ALT_DIGITS = 49 // langinfo.h:93:1:
|
||||
AM_STR = 5 // langinfo.h:40:1:
|
||||
CODESET = 0 // langinfo.h:35:1:
|
||||
CRNCYSTR = 56 // langinfo.h:106:1:
|
||||
DAY_1 = 7 // langinfo.h:44:1:
|
||||
DAY_2 = 8 // langinfo.h:45:1:
|
||||
DAY_3 = 9 // langinfo.h:46:1:
|
||||
DAY_4 = 10 // langinfo.h:47:1:
|
||||
DAY_5 = 11 // langinfo.h:48:1:
|
||||
DAY_6 = 12 // langinfo.h:49:1:
|
||||
DAY_7 = 13 // langinfo.h:50:1:
|
||||
D_FMT = 2 // langinfo.h:37:1:
|
||||
D_MD_ORDER = 57 // langinfo.h:109:1:
|
||||
D_T_FMT = 1 // langinfo.h:36:1:
|
||||
ERA = 45 // langinfo.h:89:1:
|
||||
ERA_D_FMT = 46 // langinfo.h:90:1:
|
||||
ERA_D_T_FMT = 47 // langinfo.h:91:1:
|
||||
ERA_T_FMT = 48 // langinfo.h:92:1:
|
||||
MON_1 = 21 // langinfo.h:62:1:
|
||||
MON_10 = 30 // langinfo.h:71:1:
|
||||
MON_11 = 31 // langinfo.h:72:1:
|
||||
MON_12 = 32 // langinfo.h:73:1:
|
||||
MON_2 = 22 // langinfo.h:63:1:
|
||||
MON_3 = 23 // langinfo.h:64:1:
|
||||
MON_4 = 24 // langinfo.h:65:1:
|
||||
MON_5 = 25 // langinfo.h:66:1:
|
||||
MON_6 = 26 // langinfo.h:67:1:
|
||||
MON_7 = 27 // langinfo.h:68:1:
|
||||
MON_8 = 28 // langinfo.h:69:1:
|
||||
MON_9 = 29 // langinfo.h:70:1:
|
||||
NOEXPR = 53 // langinfo.h:99:1:
|
||||
NOSTR = 55 // langinfo.h:103:1:
|
||||
PM_STR = 6 // langinfo.h:41:1:
|
||||
RADIXCHAR = 50 // langinfo.h:95:1:
|
||||
THOUSEP = 51 // langinfo.h:96:1:
|
||||
T_FMT = 3 // langinfo.h:38:1:
|
||||
T_FMT_AMPM = 4 // langinfo.h:39:1:
|
||||
YESEXPR = 52 // langinfo.h:98:1:
|
||||
YESSTR = 54 // langinfo.h:102:1:
|
||||
X_BSD_I386__TYPES_H_ = 0 // _types.h:29:1:
|
||||
X_BSD_MACHINE__TYPES_H_ = 0 // _types.h:29:1:
|
||||
X_CDEFS_H_ = 0 // cdefs.h:68:1:
|
||||
X_DARWIN_FEATURE_64_BIT_INODE = 1 // cdefs.h:745:1:
|
||||
X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 // cdefs.h:771:1:
|
||||
X_DARWIN_FEATURE_UNIX_CONFORMANCE = 3 // cdefs.h:779:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_FORTIFY_SOURCE = 2 // _types.h:65:1:
|
||||
X_LANGINFO_H_ = 0 // langinfo.h:30:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_NL_ITEM = 0 // _nl_item.h:30:1:
|
||||
X_Nonnull = 0 // cdefs.h:243:1:
|
||||
X_Null_unspecified = 0 // cdefs.h:246:1:
|
||||
X_Nullable = 0 // cdefs.h:240:1:
|
||||
X_SYS__PTHREAD_TYPES_H_ = 0 // _pthread_types.h:30:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:30:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
Loaded 100 of 316 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user