#136: Start working on database persistence
This commit is contained in:
19
vendor/modernc.org/cc/v3/AUTHORS
generated
vendored
Normal file
19
vendor/modernc.org/cc/v3/AUTHORS
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# This file lists authors for copyright purposes. This file is distinct from
|
||||
# the CONTRIBUTORS files. See the latter for an explanation.
|
||||
#
|
||||
# Names should be added to this file as:
|
||||
# Name or Organization <email address>
|
||||
#
|
||||
# The email address is not required for organizations.
|
||||
#
|
||||
# Please keep the list sorted.
|
||||
|
||||
Dan Kortschak <dan.kortschak@adelaide.edu.au>
|
||||
Dan Peterson <danp@danp.net>
|
||||
Denys Smirnov <denis.smirnov.91@gmail.com>
|
||||
Jan Mercl <0xjnml@gmail.com>
|
||||
Maxim Kupriianov <max@kc.vc>
|
||||
Peter Waller <p@pwaller.net>
|
||||
Steffen Butzer <steffen(dot)butzer@outlook.com>
|
||||
Tommi Virtanen <tv@eagain.net>
|
||||
Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
18
vendor/modernc.org/cc/v3/CONTRIBUTORS
generated
vendored
Normal file
18
vendor/modernc.org/cc/v3/CONTRIBUTORS
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
# This file lists people who contributed code to this repository. The AUTHORS
|
||||
# file lists the copyright holders; this file lists people.
|
||||
#
|
||||
# Names should be added to this file like so:
|
||||
# Name <email address>
|
||||
#
|
||||
# Please keep the list sorted.
|
||||
|
||||
Dan Kortschak <dan.kortschak@adelaide.edu.au>
|
||||
Dan Peterson <danp@danp.net>
|
||||
Denys Smirnov <denis.smirnov.91@gmail.com>
|
||||
Jan Mercl <0xjnml@gmail.com>
|
||||
Maxim Kupriianov <max@kc.vc>
|
||||
Peter Waller <p@pwaller.net>
|
||||
Steffen Butzer <steffen(dot)butzer@outlook.com>
|
||||
Tommi Virtanen <tv@eagain.net>
|
||||
Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
||||
Zvi Effron <zeffron@cs.hmc.edu>
|
27
vendor/modernc.org/cc/v3/GO-LICENSE
generated
vendored
Normal file
27
vendor/modernc.org/cc/v3/GO-LICENSE
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
vendor/modernc.org/cc/v3/LICENSE
generated
vendored
Normal file
27
vendor/modernc.org/cc/v3/LICENSE
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Copyright (c) 2017 The CC Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the names of the authors nor the names of the
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
121
vendor/modernc.org/cc/v3/Makefile
generated
vendored
Normal file
121
vendor/modernc.org/cc/v3/Makefile
generated
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
# Copyright 2019 The CC Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file.
|
||||
|
||||
.PHONY: all bench clean cover cpu editor internalError later mem nuke todo edit devbench
|
||||
|
||||
grep=--include=*.go --include=*.l --include=*.y --include=*.yy
|
||||
ngrep='internalError\|TODOOK\|lexer\.go\|ast.go\|trigraphs\.go\|.*_string\.go\|stringer\.go\|testdata\/gcc'
|
||||
testlog=testdata/testlog-$(shell echo $$GOOS)-$(shell echo $$GOARCH)-on-$(shell go env GOOS)-$(shell go env GOARCH)
|
||||
|
||||
all: lexer.go
|
||||
LC_ALL=C make all_log 2>&1 | tee log
|
||||
|
||||
all_log:
|
||||
date
|
||||
go version
|
||||
uname -a
|
||||
./unconvert.sh
|
||||
gofmt -l -s -w *.go
|
||||
GOOS=darwin GOARCH=amd64 go build
|
||||
GOOS=darwin GOARCH=arm64 go build
|
||||
GOOS=linux GOARCH=386 go build
|
||||
GOOS=linux GOARCH=amd64 go build
|
||||
GOOS=linux GOARCH=arm go build
|
||||
GOOS=windows GOARCH=386 go build
|
||||
GOOS=windows GOARCH=amd64 go build
|
||||
go vet | grep -v $(ngrep) || true
|
||||
golint | grep -v $(ngrep) || true
|
||||
misspell *.go
|
||||
staticcheck | grep -v 'lexer\.go' || true
|
||||
pcregrep -nM 'FAIL|false|<nil>|:\n}' ast_test.go || true
|
||||
|
||||
test:
|
||||
go version | tee $(testlog)
|
||||
uname -a | tee -a $(testlog)
|
||||
go test -v -timeout 24h | tee -a $(testlog)
|
||||
grep -ni fail $(testlog) | tee -a $(testlog) || true
|
||||
LC_ALL=C date | tee -a $(testlog)
|
||||
grep -ni --color=always fail $(testlog) || true
|
||||
|
||||
test_linux_amd64:
|
||||
GOOS=linux GOARCH=amd64 make test
|
||||
|
||||
test_linux_386:
|
||||
GOOS=linux GOARCH=386 make test
|
||||
|
||||
test_linux_arm:
|
||||
GOOS=linux GOARCH=arm make test
|
||||
|
||||
test_linux_arm64:
|
||||
GOOS=linux GOARCH=arm64 make test
|
||||
|
||||
test_windows_amd64:
|
||||
go version
|
||||
go test -v -timeout 24h
|
||||
|
||||
test_windows386:
|
||||
go version
|
||||
go test -v -timeout 24h
|
||||
|
||||
build_all_targets:
|
||||
GOOS=darwin GOARCH=amd64 go build -v ./...
|
||||
GOOS=darwin GOARCH=arm64 go build -v ./...
|
||||
GOOS=linux GOARCH=386 go build -v ./...
|
||||
GOOS=linux GOARCH=amd64 go build -v ./...
|
||||
GOOS=linux GOARCH=arm go build -v ./...
|
||||
GOOS=linux GOARCH=arm64 go build -v ./...
|
||||
GOOS=windows GOARCH=386 go build -v ./...
|
||||
GOOS=windows GOARCH=amd64 go build -v ./...
|
||||
|
||||
devbench:
|
||||
date 2>&1 | tee log-devbench
|
||||
go test -timeout 24h -dev -run @ -bench . 2>&1 | tee -a log-devbench
|
||||
grep -n 'FAIL\|SKIP' log-devbench || true
|
||||
|
||||
bench:
|
||||
date 2>&1 | tee log-bench
|
||||
go test -timeout 24h -v -run '^[^E]' -bench . 2>&1 | tee -a log-bench
|
||||
grep -n 'FAIL\|SKIP' log-bench || true
|
||||
|
||||
clean:
|
||||
go clean
|
||||
rm -f *~ *.test *.out
|
||||
|
||||
cover:
|
||||
t=$(shell mktemp) ; go test -coverprofile $$t && go tool cover -html $$t && unlink $$t
|
||||
|
||||
cpu: clean
|
||||
go test -run @ -bench . -cpuprofile cpu.out
|
||||
go tool pprof -lines *.test cpu.out
|
||||
|
||||
edit:
|
||||
@touch log
|
||||
@if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile *.go & fi
|
||||
|
||||
editor: lexer.go
|
||||
gofmt -l -s -w *.go
|
||||
GO111MODULE=off go test -o /dev/null -c
|
||||
GO111MODULE=off go install 2>&1 | tee log
|
||||
|
||||
ast.go lexer.go stringer.go: lexer.l parser.yy enum.go
|
||||
go generate
|
||||
|
||||
later:
|
||||
@grep -n $(grep) LATER * || true
|
||||
@grep -n $(grep) MAYBE * || true
|
||||
|
||||
mem: clean
|
||||
# go test -v -run ParserCS -csmith 2m -memprofile mem.out -timeout 24h
|
||||
# go test -v -run @ -bench BenchmarkScanner -memprofile mem.out -timeout 24h
|
||||
go test -v -run TestTranslateSQLite -memprofile mem.out -timeout 24h
|
||||
go tool pprof -lines -web -alloc_space *.test mem.out
|
||||
|
||||
nuke: clean
|
||||
go clean -i
|
||||
|
||||
todo:
|
||||
@grep -nr $(grep) ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* * | grep -v $(ngrep) || true
|
||||
@grep -nr $(grep) 'TODO\|panic' * | grep -v $(ngrep) || true
|
||||
@grep -nr $(grep) BUG * | grep -v $(ngrep) || true
|
||||
@grep -nr $(grep) [^[:alpha:]]println * | grep -v $(ngrep) || true
|
11
vendor/modernc.org/cc/v3/README.md
generated
vendored
Normal file
11
vendor/modernc.org/cc/v3/README.md
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
# cc/v3
|
||||
|
||||
Package CC is a C99 compiler front end.
|
||||
|
||||
Most of the functionality is now working.
|
||||
|
||||
Installation
|
||||
|
||||
$ go get -u modernc.org/cc/v3
|
||||
|
||||
Documentation: [godoc.org/modernc.org/cc/v3](http://godoc.org/modernc.org/cc/v3)
|
1019
vendor/modernc.org/cc/v3/abi.go
generated
vendored
Normal file
1019
vendor/modernc.org/cc/v3/abi.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
335
vendor/modernc.org/cc/v3/abi_platforms.go
generated
vendored
Normal file
335
vendor/modernc.org/cc/v3/abi_platforms.go
generated
vendored
Normal file
@ -0,0 +1,335 @@
|
||||
package cc
|
||||
|
||||
import "encoding/binary"
|
||||
|
||||
// abiByteOrders contains byte order information for known architectures.
|
||||
var abiByteOrders = map[string]binary.ByteOrder{
|
||||
"amd64": binary.LittleEndian,
|
||||
"386": binary.LittleEndian,
|
||||
"arm": binary.LittleEndian,
|
||||
"arm64": binary.LittleEndian,
|
||||
"s390x": binary.BigEndian,
|
||||
}
|
||||
|
||||
// abiTypes contains size and alignment information for known OS/arch pairs.
|
||||
//
|
||||
// The content is generated by ./cmd/cabi/main.c.
|
||||
var abiTypes = map[[2]string]map[Kind]ABIType{
|
||||
// Linux, generated by GCC 8.3.0
|
||||
{"linux", "amd64"}: {
|
||||
Void: {1, 1, 1},
|
||||
Bool: {1, 1, 1},
|
||||
Char: {1, 1, 1},
|
||||
SChar: {1, 1, 1},
|
||||
UChar: {1, 1, 1},
|
||||
Short: {2, 2, 2},
|
||||
UShort: {2, 2, 2},
|
||||
Enum: {4, 4, 4},
|
||||
Int: {4, 4, 4},
|
||||
UInt: {4, 4, 4},
|
||||
Long: {8, 8, 8},
|
||||
ULong: {8, 8, 8},
|
||||
LongLong: {8, 8, 8},
|
||||
ULongLong: {8, 8, 8},
|
||||
Ptr: {8, 8, 8},
|
||||
Function: {8, 8, 8},
|
||||
Float: {4, 4, 4},
|
||||
Double: {8, 8, 8},
|
||||
LongDouble: {16, 16, 16},
|
||||
Int8: {1, 1, 1},
|
||||
UInt8: {1, 1, 1},
|
||||
Int16: {2, 2, 2},
|
||||
UInt16: {2, 2, 2},
|
||||
Int32: {4, 4, 4},
|
||||
UInt32: {4, 4, 4},
|
||||
Int64: {8, 8, 8},
|
||||
UInt64: {8, 8, 8},
|
||||
Int128: {16, 16, 16},
|
||||
UInt128: {16, 16, 16},
|
||||
Float32: {4, 4, 4},
|
||||
Float32x: {8, 8, 8},
|
||||
Float64: {8, 8, 8},
|
||||
Float64x: {16, 16, 16},
|
||||
Float128: {16, 16, 16},
|
||||
Decimal32: {4, 4, 4},
|
||||
Decimal64: {8, 8, 8},
|
||||
Decimal128: {16, 16, 16},
|
||||
},
|
||||
{"linux", "386"}: {
|
||||
Void: {1, 1, 1},
|
||||
Bool: {1, 1, 1},
|
||||
Char: {1, 1, 1},
|
||||
SChar: {1, 1, 1},
|
||||
UChar: {1, 1, 1},
|
||||
Short: {2, 2, 2},
|
||||
UShort: {2, 2, 2},
|
||||
Enum: {4, 4, 4},
|
||||
Int: {4, 4, 4},
|
||||
UInt: {4, 4, 4},
|
||||
Long: {4, 4, 4},
|
||||
ULong: {4, 4, 4},
|
||||
LongLong: {8, 4, 4},
|
||||
ULongLong: {8, 4, 4},
|
||||
Ptr: {4, 4, 4},
|
||||
Function: {4, 4, 4},
|
||||
Float: {4, 4, 4},
|
||||
Double: {8, 4, 4},
|
||||
LongDouble: {12, 4, 4},
|
||||
Int8: {1, 1, 1},
|
||||
UInt8: {1, 1, 1},
|
||||
Int16: {2, 2, 2},
|
||||
UInt16: {2, 2, 2},
|
||||
Int32: {4, 4, 4},
|
||||
UInt32: {4, 4, 4},
|
||||
Int64: {8, 4, 4},
|
||||
UInt64: {8, 4, 4},
|
||||
Float32: {4, 4, 4},
|
||||
Float32x: {8, 4, 4},
|
||||
Float64: {8, 4, 4},
|
||||
Float64x: {12, 4, 4},
|
||||
Float128: {16, 16, 16},
|
||||
Decimal32: {4, 4, 4},
|
||||
Decimal64: {8, 8, 8},
|
||||
Decimal128: {16, 16, 16},
|
||||
},
|
||||
{"linux", "arm"}: {
|
||||
Void: {1, 1, 1},
|
||||
Bool: {1, 1, 1},
|
||||
Char: {1, 1, 1},
|
||||
SChar: {1, 1, 1},
|
||||
UChar: {1, 1, 1},
|
||||
Short: {2, 2, 2},
|
||||
UShort: {2, 2, 2},
|
||||
Enum: {4, 4, 4},
|
||||
Int: {4, 4, 4},
|
||||
UInt: {4, 4, 4},
|
||||
Long: {4, 4, 4},
|
||||
ULong: {4, 4, 4},
|
||||
LongLong: {8, 8, 8},
|
||||
ULongLong: {8, 8, 8},
|
||||
Ptr: {4, 4, 4},
|
||||
Function: {4, 4, 4},
|
||||
Float: {4, 4, 4},
|
||||
Double: {8, 8, 8},
|
||||
LongDouble: {8, 8, 8},
|
||||
Int8: {1, 1, 1},
|
||||
UInt8: {1, 1, 1},
|
||||
Int16: {2, 2, 2},
|
||||
UInt16: {2, 2, 2},
|
||||
Int32: {4, 4, 4},
|
||||
UInt32: {4, 4, 4},
|
||||
Int64: {8, 8, 8},
|
||||
UInt64: {8, 8, 8},
|
||||
},
|
||||
{"linux", "arm64"}: {
|
||||
Void: {1, 1, 1},
|
||||
Bool: {1, 1, 1},
|
||||
Char: {1, 1, 1},
|
||||
SChar: {1, 1, 1},
|
||||
UChar: {1, 1, 1},
|
||||
Short: {2, 2, 2},
|
||||
UShort: {2, 2, 2},
|
||||
Enum: {4, 4, 4},
|
||||
Int: {4, 4, 4},
|
||||
UInt: {4, 4, 4},
|
||||
Long: {8, 8, 8},
|
||||
ULong: {8, 8, 8},
|
||||
LongLong: {8, 8, 8},
|
||||
ULongLong: {8, 8, 8},
|
||||
Ptr: {8, 8, 8},
|
||||
Function: {8, 8, 8},
|
||||
Float: {4, 4, 4},
|
||||
Double: {8, 8, 8},
|
||||
LongDouble: {16, 16, 16},
|
||||
Int8: {1, 1, 1},
|
||||
UInt8: {1, 1, 1},
|
||||
Int16: {2, 2, 2},
|
||||
UInt16: {2, 2, 2},
|
||||
Int32: {4, 4, 4},
|
||||
UInt32: {4, 4, 4},
|
||||
Int64: {8, 8, 8},
|
||||
UInt64: {8, 8, 8},
|
||||
Int128: {16, 16, 16},
|
||||
UInt128: {16, 16, 16},
|
||||
},
|
||||
// $ x86_64-w64-mingw32-gcc main.c && wine a.exe
|
||||
{"windows", "amd64"}: {
|
||||
Void: {1, 1, 1},
|
||||
Bool: {1, 1, 1},
|
||||
Char: {1, 1, 1},
|
||||
SChar: {1, 1, 1},
|
||||
UChar: {1, 1, 1},
|
||||
Short: {2, 2, 2},
|
||||
UShort: {2, 2, 2},
|
||||
Enum: {4, 4, 4},
|
||||
Int: {4, 4, 4},
|
||||
UInt: {4, 4, 4},
|
||||
Long: {4, 4, 4},
|
||||
ULong: {4, 4, 4},
|
||||
LongLong: {8, 8, 8},
|
||||
ULongLong: {8, 8, 8},
|
||||
Ptr: {8, 8, 8},
|
||||
Function: {8, 8, 8},
|
||||
Float: {4, 4, 4},
|
||||
Double: {8, 8, 8},
|
||||
LongDouble: {16, 16, 16},
|
||||
Int8: {1, 1, 1},
|
||||
UInt8: {1, 1, 1},
|
||||
Int16: {2, 2, 2},
|
||||
UInt16: {2, 2, 2},
|
||||
Int32: {4, 4, 4},
|
||||
UInt32: {4, 4, 4},
|
||||
Int64: {8, 8, 8},
|
||||
UInt64: {8, 8, 8},
|
||||
Int128: {16, 16, 16},
|
||||
UInt128: {16, 16, 16},
|
||||
Float32: {4, 4, 4},
|
||||
Float32x: {8, 8, 8},
|
||||
Float64: {8, 8, 8},
|
||||
Float64x: {16, 16, 16},
|
||||
Float128: {16, 16, 16},
|
||||
Decimal32: {4, 4, 4},
|
||||
Decimal64: {8, 8, 8},
|
||||
Decimal128: {16, 16, 16},
|
||||
},
|
||||
// $ i686-w64-mingw32-gcc main.c && wine a.exe
|
||||
{"windows", "386"}: {
|
||||
Void: {1, 1, 1},
|
||||
Bool: {1, 1, 1},
|
||||
Char: {1, 1, 1},
|
||||
SChar: {1, 1, 1},
|
||||
UChar: {1, 1, 1},
|
||||
Short: {2, 2, 2},
|
||||
UShort: {2, 2, 2},
|
||||
Enum: {4, 4, 4},
|
||||
Int: {4, 4, 4},
|
||||
UInt: {4, 4, 4},
|
||||
Long: {4, 4, 4},
|
||||
ULong: {4, 4, 4},
|
||||
LongLong: {8, 8, 8},
|
||||
ULongLong: {8, 8, 8},
|
||||
Ptr: {4, 4, 4},
|
||||
Function: {4, 4, 4},
|
||||
Float: {4, 4, 4},
|
||||
Double: {8, 8, 8},
|
||||
LongDouble: {12, 4, 4},
|
||||
Int8: {1, 1, 1},
|
||||
UInt8: {1, 1, 1},
|
||||
Int16: {2, 2, 2},
|
||||
UInt16: {2, 2, 2},
|
||||
Int32: {4, 4, 4},
|
||||
UInt32: {4, 4, 4},
|
||||
Int64: {8, 8, 8},
|
||||
UInt64: {8, 8, 8},
|
||||
Float32: {4, 4, 4},
|
||||
Float32x: {8, 8, 8},
|
||||
Float64: {8, 8, 8},
|
||||
Float64x: {12, 4, 4},
|
||||
Float128: {16, 16, 16},
|
||||
Decimal32: {4, 4, 4},
|
||||
Decimal64: {8, 8, 8},
|
||||
Decimal128: {16, 16, 16},
|
||||
},
|
||||
{"darwin", "amd64"}: {
|
||||
Void: {1, 1, 1},
|
||||
Bool: {1, 1, 1},
|
||||
Char: {1, 1, 1},
|
||||
SChar: {1, 1, 1},
|
||||
UChar: {1, 1, 1},
|
||||
Short: {2, 2, 2},
|
||||
UShort: {2, 2, 2},
|
||||
Enum: {4, 4, 4},
|
||||
Int: {4, 4, 4},
|
||||
UInt: {4, 4, 4},
|
||||
Long: {8, 8, 8},
|
||||
ULong: {8, 8, 8},
|
||||
LongLong: {8, 8, 8},
|
||||
ULongLong: {8, 8, 8},
|
||||
Ptr: {8, 8, 8},
|
||||
Function: {8, 8, 8},
|
||||
Float: {4, 4, 4},
|
||||
Double: {8, 8, 8},
|
||||
LongDouble: {16, 16, 16},
|
||||
Int8: {1, 1, 1},
|
||||
UInt8: {1, 1, 1},
|
||||
Int16: {2, 2, 2},
|
||||
UInt16: {2, 2, 2},
|
||||
Int32: {4, 4, 4},
|
||||
UInt32: {4, 4, 4},
|
||||
Int64: {8, 8, 8},
|
||||
UInt64: {8, 8, 8},
|
||||
Int128: {16, 16, 16},
|
||||
UInt128: {16, 16, 16},
|
||||
},
|
||||
{"darwin", "arm64"}: {
|
||||
Void: {1, 1, 1},
|
||||
Bool: {1, 1, 1},
|
||||
Char: {1, 1, 1},
|
||||
SChar: {1, 1, 1},
|
||||
UChar: {1, 1, 1},
|
||||
Short: {2, 2, 2},
|
||||
UShort: {2, 2, 2},
|
||||
Enum: {4, 4, 4},
|
||||
Int: {4, 4, 4},
|
||||
UInt: {4, 4, 4},
|
||||
Long: {8, 8, 8},
|
||||
ULong: {8, 8, 8},
|
||||
LongLong: {8, 8, 8},
|
||||
ULongLong: {8, 8, 8},
|
||||
Ptr: {8, 8, 8},
|
||||
Function: {8, 8, 8},
|
||||
Float: {4, 4, 4},
|
||||
Double: {8, 8, 8},
|
||||
LongDouble: {8, 8, 8},
|
||||
Int8: {1, 1, 1},
|
||||
UInt8: {1, 1, 1},
|
||||
Int16: {2, 2, 2},
|
||||
UInt16: {2, 2, 2},
|
||||
Int32: {4, 4, 4},
|
||||
UInt32: {4, 4, 4},
|
||||
Int64: {8, 8, 8},
|
||||
UInt64: {8, 8, 8},
|
||||
Int128: {16, 16, 16},
|
||||
UInt128: {16, 16, 16},
|
||||
},
|
||||
// gcc (SUSE Linux) 7.5.0
|
||||
{"linux", "s390x"}: {
|
||||
Void: {1, 1, 1},
|
||||
Bool: {1, 1, 1},
|
||||
Char: {1, 1, 1},
|
||||
SChar: {1, 1, 1},
|
||||
UChar: {1, 1, 1},
|
||||
Short: {2, 2, 2},
|
||||
UShort: {2, 2, 2},
|
||||
Enum: {4, 4, 4},
|
||||
Int: {4, 4, 4},
|
||||
UInt: {4, 4, 4},
|
||||
Long: {8, 8, 8},
|
||||
ULong: {8, 8, 8},
|
||||
LongLong: {8, 8, 8},
|
||||
ULongLong: {8, 8, 8},
|
||||
Ptr: {8, 8, 8},
|
||||
Function: {8, 8, 8},
|
||||
Float: {4, 4, 4},
|
||||
Double: {8, 8, 8},
|
||||
LongDouble: {16, 8, 8},
|
||||
Int8: {1, 1, 1},
|
||||
UInt8: {1, 1, 1},
|
||||
Int16: {2, 2, 2},
|
||||
UInt16: {2, 2, 2},
|
||||
Int32: {4, 4, 4},
|
||||
UInt32: {4, 4, 4},
|
||||
Int64: {8, 8, 8},
|
||||
UInt64: {8, 8, 8},
|
||||
Int128: {16, 8, 8},
|
||||
UInt128: {16, 8, 8},
|
||||
Float32: {4, 4, 4},
|
||||
Float32x: {8, 8, 8},
|
||||
Float64: {8, 8, 8},
|
||||
Float64x: {16, 8, 8},
|
||||
Float128: {16, 8, 8},
|
||||
Decimal32: {4, 4, 4},
|
||||
Decimal64: {8, 8, 8},
|
||||
Decimal128: {16, 8, 8},
|
||||
},
|
||||
}
|
5226
vendor/modernc.org/cc/v3/ast.go
generated
vendored
Normal file
5226
vendor/modernc.org/cc/v3/ast.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1160
vendor/modernc.org/cc/v3/ast2.go
generated
vendored
Normal file
1160
vendor/modernc.org/cc/v3/ast2.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
960
vendor/modernc.org/cc/v3/cc.go
generated
vendored
Normal file
960
vendor/modernc.org/cc/v3/cc.go
generated
vendored
Normal file
@ -0,0 +1,960 @@
|
||||
// Copyright 2019 The CC Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//TODO https://todo.sr.ht/~mcf/cc-issues/34
|
||||
//TODO http://mcpp.sourceforge.net/ "Provides a validation suite to test C/C++ preprocessor's conformance and quality comprehensively."
|
||||
|
||||
//go:generate rm -f lexer.go
|
||||
//go:generate golex -o lexer.go lexer.l
|
||||
|
||||
//go:generate rm -f ast.go
|
||||
//go:generate yy -o /dev/null -position -astImport "\"fmt\"\n\n\"modernc.org/token\"" -prettyString PrettyString -kind Case -noListKind -noPrivateHelpers -forceOptPos parser.yy
|
||||
|
||||
//go:generate stringer -output stringer.go -linecomment -type=Kind,Linkage
|
||||
|
||||
//go:generate sh -c "go test -run ^Example |fe"
|
||||
|
||||
// Package cc is a C99 compiler front end (Work in progress).
|
||||
//
|
||||
// Installation
|
||||
//
|
||||
// To install/update cc/v3 invoke:
|
||||
//
|
||||
// $ go get [-u] modernc.org/cc/v3
|
||||
//
|
||||
// Online documentation
|
||||
//
|
||||
// See https://godoc.org/modernc.org/cc/v3.
|
||||
//
|
||||
// Status
|
||||
//
|
||||
// Most of the functionality is now working.
|
||||
//
|
||||
// Supported platforms
|
||||
//
|
||||
// The code is known to work on Darwin, Linux and Windows, but the supported
|
||||
// features may vary.
|
||||
//
|
||||
// Links
|
||||
//
|
||||
// Referenced from elsewhere:
|
||||
//
|
||||
// [0]: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
|
||||
// [1]: https://www.spinellis.gr/blog/20060626/cpp.algo.pdf
|
||||
// [2]: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
|
||||
// [3]: http://gallium.inria.fr/~fpottier/publis/jourdan-fpottier-2016.pdf
|
||||
// [4]: https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Attribute-Syntax.html#Attribute-Syntax
|
||||
package cc // import "modernc.org/cc/v3"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
goscanner "go/scanner"
|
||||
gotoken "go/token"
|
||||
"hash/maphash"
|
||||
"io"
|
||||
"math"
|
||||
"os"
|
||||
"os/exec"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"modernc.org/strutil"
|
||||
"modernc.org/token"
|
||||
)
|
||||
|
||||
const (
|
||||
scopeParent StringID = -iota - 1
|
||||
scopeSkip
|
||||
)
|
||||
|
||||
var (
|
||||
_ Pragma = (*pragma)(nil)
|
||||
|
||||
cache = newPPCache()
|
||||
dict = newDictionary()
|
||||
dictStrings [math.MaxUint8 + 1]string
|
||||
noPos token.Position
|
||||
|
||||
debugIncludePaths bool
|
||||
debugWorkingDir bool
|
||||
isTesting bool
|
||||
isTestingMingw bool
|
||||
|
||||
idPtrdiffT = dict.sid("ptrdiff_t")
|
||||
idSizeT = dict.sid("size_t")
|
||||
idWCharT = dict.sid("wchar_t")
|
||||
|
||||
token4Pool = sync.Pool{New: func() interface{} { r := make([]token4, 0); return &r }} //DONE benchmrk tuned capacity
|
||||
tokenPool = sync.Pool{New: func() interface{} { r := make([]Token, 0); return &r }} //DONE benchmrk tuned capacity
|
||||
|
||||
printHooks = strutil.PrettyPrintHooks{
|
||||
reflect.TypeOf(Token{}): func(f strutil.Formatter, v interface{}, prefix, suffix string) {
|
||||
t := v.(Token)
|
||||
if (t == Token{}) {
|
||||
return
|
||||
}
|
||||
|
||||
f.Format(prefix)
|
||||
r := t.Rune
|
||||
if p := t.Position(); p.IsValid() {
|
||||
f.Format("%v: ", p)
|
||||
}
|
||||
s := tokName(r)
|
||||
if x := s[0]; x >= '0' && x <= '9' {
|
||||
s = strconv.QuoteRune(r)
|
||||
}
|
||||
f.Format("%s", s)
|
||||
if s := t.Value.String(); len(s) != 0 {
|
||||
f.Format(" %q", s)
|
||||
}
|
||||
f.Format(suffix)
|
||||
},
|
||||
reflect.TypeOf((*operand)(nil)): func(f strutil.Formatter, v interface{}, prefix, suffix string) {
|
||||
op := v.(*operand)
|
||||
f.Format(prefix)
|
||||
f.Format("[%v %T(%[2]v)]", op.Type(), op.Value())
|
||||
f.Format(suffix)
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
func todo(s string, args ...interface{}) string { //TODO-
|
||||
switch {
|
||||
case s == "":
|
||||
s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...)
|
||||
default:
|
||||
s = fmt.Sprintf(s, args...)
|
||||
}
|
||||
pc, fn, fl, _ := runtime.Caller(1)
|
||||
f := runtime.FuncForPC(pc)
|
||||
var fns string
|
||||
if f != nil {
|
||||
fns = f.Name()
|
||||
if x := strings.LastIndex(fns, "."); x > 0 {
|
||||
fns = fns[x+1:]
|
||||
}
|
||||
}
|
||||
r := fmt.Sprintf("%s:%d:%s: TODOTODO %s", fn, fl, fns, s) //TODOOK
|
||||
fmt.Fprintf(os.Stdout, "%s\n", r)
|
||||
os.Stdout.Sync()
|
||||
return r
|
||||
}
|
||||
|
||||
func trc(s string, args ...interface{}) string { //TODO-
|
||||
switch {
|
||||
case s == "":
|
||||
s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...)
|
||||
default:
|
||||
s = fmt.Sprintf(s, args...)
|
||||
}
|
||||
_, fn, fl, _ := runtime.Caller(1)
|
||||
r := fmt.Sprintf("%s:%d: TRC %s", fn, fl, s)
|
||||
fmt.Fprintf(os.Stdout, "%s\n", r)
|
||||
os.Stdout.Sync()
|
||||
return r
|
||||
}
|
||||
|
||||
func origin(skip int) string {
|
||||
pc, fn, fl, _ := runtime.Caller(skip)
|
||||
f := runtime.FuncForPC(pc)
|
||||
var fns string
|
||||
if f != nil {
|
||||
fns = f.Name()
|
||||
if x := strings.LastIndex(fns, "."); x > 0 {
|
||||
fns = fns[x+1:]
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf("%s:%d:%s", fn, fl, fns)
|
||||
}
|
||||
|
||||
// String returns a StringID for a given value.
|
||||
func String(s string) StringID {
|
||||
return dict.sid(s)
|
||||
}
|
||||
|
||||
// Linkage represents identifier linkage.
|
||||
//
|
||||
// [0]6.2.2: An identifier declared in different scopes or in the same scope
|
||||
// more than once can be made to refer to the same object or function by a
|
||||
// process called linkage. There are three kinds of linkage: External,
|
||||
// Internal, and None.
|
||||
type Linkage int
|
||||
|
||||
// StorageClass determines storage duration.
|
||||
//
|
||||
// [0]6.2.4: An object has a storage duration that determines its lifetime.
|
||||
// There are three storage durations: Static, Automatic, and Allocated.
|
||||
type StorageClass int
|
||||
|
||||
// Pragma defines behavior of the object passed to Config.PragmaHandler.
|
||||
type Pragma interface {
|
||||
Error(msg string, args ...interface{}) // Report error.
|
||||
MaxAligment() int // Returns the current maximum alignment. May return zero.
|
||||
MaxInitialAligment() int // Support #pragma pack(). Returns the maximum alignment in effect at start. May return zero.
|
||||
PopMacro(string)
|
||||
PushMacro(string)
|
||||
SetAlignment(n int) // Support #pragma pack(n)
|
||||
}
|
||||
|
||||
type pragma struct {
|
||||
tok cppToken
|
||||
c *cpp
|
||||
}
|
||||
|
||||
func (p *pragma) Error(msg string, args ...interface{}) { p.c.err(p.tok, msg, args...) }
|
||||
|
||||
func (p *pragma) MaxAligment() int { return p.c.ctx.maxAlign }
|
||||
|
||||
func (p *pragma) MaxInitialAligment() int { return p.c.ctx.maxAlign0 }
|
||||
|
||||
func (p *pragma) SetAlignment(n int) {
|
||||
if n <= 0 {
|
||||
p.Error("%T.SetAlignment(%d): invalid argument", p, n)
|
||||
return
|
||||
}
|
||||
|
||||
p.c.ctx.maxAlign = n
|
||||
}
|
||||
|
||||
func (p *pragma) PushMacro(nm string) {
|
||||
id := dict.sid(nm)
|
||||
if p.c.macroStack == nil {
|
||||
p.c.macroStack = map[StringID][]*Macro{}
|
||||
}
|
||||
if m := p.c.macros[id]; m != nil {
|
||||
p.c.macroStack[id] = append(p.c.macroStack[id], p.c.macros[id])
|
||||
}
|
||||
}
|
||||
|
||||
func (p *pragma) PopMacro(nm string) {
|
||||
id := dict.sid(nm)
|
||||
a := p.c.macroStack[id]
|
||||
if n := len(a); n != 0 {
|
||||
p.c.macros[id] = a[n-1]
|
||||
p.c.macroStack[id] = a[:n-1]
|
||||
}
|
||||
}
|
||||
|
||||
// PrettyString returns a formatted representation of things produced by this package.
|
||||
func PrettyString(v interface{}) string {
|
||||
return strutil.PrettyString(v, "", "", printHooks)
|
||||
}
|
||||
|
||||
// StringID is a process-unique string numeric identifier. Its zero value
|
||||
// represents an empty string.
|
||||
type StringID int32
|
||||
|
||||
// String implements fmt.Stringer.
|
||||
func (n StringID) String() (r string) {
|
||||
if n < 256 {
|
||||
return dictStrings[byte(n)]
|
||||
}
|
||||
|
||||
dict.mu.RLock()
|
||||
r = dict.strings[n]
|
||||
dict.mu.RUnlock()
|
||||
return r
|
||||
}
|
||||
|
||||
// Node is implemented by Token and all AST nodes.
|
||||
type Node interface {
|
||||
Position() token.Position
|
||||
}
|
||||
|
||||
type noder struct{}
|
||||
|
||||
func (noder) Position() token.Position { panic(internalError()) }
|
||||
|
||||
// Scope maps identifiers to definitions.
|
||||
type Scope map[StringID][]Node
|
||||
|
||||
func (s *Scope) new() (r Scope) {
|
||||
if *s == nil {
|
||||
*s = Scope{}
|
||||
}
|
||||
r = Scope{scopeParent: []Node{struct {
|
||||
noder
|
||||
Scope
|
||||
}{Scope: *s}}}
|
||||
return r
|
||||
}
|
||||
|
||||
func (s *Scope) declare(nm StringID, n Node) {
|
||||
sc := *s
|
||||
if sc == nil {
|
||||
*s = map[StringID][]Node{nm: {n}}
|
||||
// t := ""
|
||||
// if x, ok := n.(*Declarator); ok && x.IsTypedefName {
|
||||
// t = ", typedefname"
|
||||
// }
|
||||
// dbg("declared %s%s at %v in scope %p", nm, t, n.Position(), *s)
|
||||
return
|
||||
}
|
||||
|
||||
switch x := n.(type) {
|
||||
case *Declarator, *StructDeclarator, *LabeledStatement, *BlockItem:
|
||||
// nop
|
||||
case *StructOrUnionSpecifier, *EnumSpecifier, *Enumerator:
|
||||
for {
|
||||
if _, ok := sc[scopeSkip]; !ok {
|
||||
break
|
||||
}
|
||||
|
||||
sc = sc.Parent()
|
||||
}
|
||||
default:
|
||||
panic(todo("%T", x))
|
||||
}
|
||||
|
||||
sc[nm] = append(sc[nm], n)
|
||||
// t := ""
|
||||
// if x, ok := n.(*Declarator); ok && x.IsTypedefName {
|
||||
// t = ", typedefname"
|
||||
// }
|
||||
// dbg("declared %s%s at %v in scope %p", nm, t, n.Position(), sc)
|
||||
}
|
||||
|
||||
// Parent returns s's outer scope, if any.
|
||||
func (s Scope) Parent() Scope {
|
||||
if s == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if x, ok := s[scopeParent]; ok {
|
||||
return x[0].(struct {
|
||||
noder
|
||||
Scope
|
||||
}).Scope
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Scope) typedef(nm StringID, tok Token) *Declarator {
|
||||
seq := tok.seq
|
||||
for s := *s; s != nil; s = s.Parent() {
|
||||
for _, v := range s[nm] {
|
||||
switch x := v.(type) {
|
||||
case *Declarator:
|
||||
if !x.isVisible(seq) {
|
||||
continue
|
||||
}
|
||||
|
||||
if x.IsTypedefName {
|
||||
return x
|
||||
}
|
||||
|
||||
return nil
|
||||
case *Enumerator:
|
||||
return nil
|
||||
case *EnumSpecifier, *StructOrUnionSpecifier, *StructDeclarator:
|
||||
// nop
|
||||
default:
|
||||
panic(internalError())
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Scope) declarator(nm StringID, tok Token) *Declarator {
|
||||
seq := tok.seq
|
||||
for s := *s; s != nil; s = s.Parent() {
|
||||
defs := s[nm]
|
||||
for _, v := range defs {
|
||||
switch x := v.(type) {
|
||||
case *Declarator:
|
||||
if !x.isVisible(seq) {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, v := range defs {
|
||||
if x, ok := v.(*Declarator); ok {
|
||||
t := x.Type()
|
||||
if t != nil && t.Kind() == Function {
|
||||
if x.fnDef {
|
||||
return x
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
if t != nil && !x.Type().IsIncomplete() {
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return x
|
||||
case *Enumerator:
|
||||
return nil
|
||||
case *EnumSpecifier, *StructOrUnionSpecifier, *StructDeclarator:
|
||||
// nop
|
||||
default:
|
||||
panic(internalError())
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Scope) enumerator(nm StringID, tok Token) *Enumerator {
|
||||
seq := tok.seq
|
||||
for s := *s; s != nil; s = s.Parent() {
|
||||
for _, v := range s[nm] {
|
||||
switch x := v.(type) {
|
||||
case *Declarator:
|
||||
if !x.isVisible(seq) {
|
||||
continue
|
||||
}
|
||||
|
||||
return nil
|
||||
case *Enumerator:
|
||||
return x
|
||||
case *EnumSpecifier, *StructOrUnionSpecifier, *StructDeclarator:
|
||||
// nop
|
||||
default:
|
||||
panic(internalError())
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Config3 amends behavior of translation phases 1 to 3.
|
||||
type Config3 struct {
|
||||
// If IgnoreInclude is not nil, its MatchString method will be called by the
|
||||
// preprocessor with the argument any include directive expands to. If the call
|
||||
// evaluates to is true the include directive will be ignored completely.
|
||||
IgnoreInclude *regexp.Regexp
|
||||
|
||||
// Name of a macro to use instead of FD_ZERO.
|
||||
//
|
||||
// Note: Temporary solution will be removed/replaced
|
||||
ReplaceMacroFdZero string
|
||||
// Name of a macro to use instead of TCL_DEFAULT_DOUBLE_ROUNDING.
|
||||
//
|
||||
// Note: Temporary solution will be removed/replaced
|
||||
ReplaceMacroTclDefaultDoubleRounding string // Name of a macro to use instead of TCL_DEFAULT_DOUBLE_ROUNDING. Note: Temporrary solution will be removed/replaced
|
||||
// Name of a macro to use instead of TCL_IEEE_DOUBLE_ROUNDING.
|
||||
//
|
||||
// Note: Temporary solution will be removed/replaced
|
||||
ReplaceMacroTclIeeeDoubleRounding string
|
||||
|
||||
WorkingDir string // Overrides os.Getwd if non empty.
|
||||
Filesystem Filesystem // Overrides filesystem access if not empty.
|
||||
|
||||
MaxSourceLine int // Zero: Scanner will use default buffer. Non zero: Scanner will use max(default buffer size, MaxSourceLine).
|
||||
|
||||
// DisableBuiltinResolution disables resolution of undefined identifiers such
|
||||
// that eg. abort, becomes the same as __builtin_abort, prototype of which is
|
||||
// expected to be provided by one of the sources passed to Parse, Preprocess or
|
||||
// Translate.
|
||||
DisableBuiltinResolution bool
|
||||
|
||||
DisableTrigraphs bool // GCC ignores them unless -trigraphs is used: https://gcc.gnu.org/onlinedocs/cpp/Initial-processing.html
|
||||
GCCStructs bool // Assume __attribute__(gcc_struct) applied to structs by default.
|
||||
//TODO MSStructs bool // Assume __attribute__(ms_struct) applied to structs by default.
|
||||
NoFieldAndBitfieldOverlap bool // Only bitfields can be grouped together.
|
||||
PreserveOnlyLastNonBlankSeparator bool // If PreserveWhiteSpace is true, keep only the last white space, do not combine
|
||||
PreserveWhiteSpace bool // Including also comments.
|
||||
RejectElseExtraTokens bool // Pedantic: do not silently accept "#else foo".
|
||||
RejectEndifExtraTokens bool // Pedantic: do not silently accept "#endif foo".
|
||||
RejectFinalBackslash bool // Pedantic: do not silently accept "foo\\\n".
|
||||
RejectFunctionMacroEmptyReplacementList bool // Pedantic: do not silently accept "#define foo(bar)\n".
|
||||
RejectIfdefExtraTokens bool // Pedantic: do not silently accept "#ifdef foo bar".
|
||||
RejectIfndefExtraTokens bool // Pedantic: do not silently accept "#ifndef foo bar".
|
||||
RejectIncludeNext bool // Pedantic: do not silently accept "#include_next".
|
||||
RejectInvalidVariadicMacros bool // Pedantic: do not silently accept "#define foo(bar...)". Standard allows only #define foo(bar, ...)
|
||||
RejectLineExtraTokens bool // Pedantic: do not silently accept "#line 1234 \"foo.c\" bar".
|
||||
RejectMissingFinalNewline bool // Pedantic: do not silently accept "foo\nbar".
|
||||
RejectUndefExtraTokens bool // Pedantic: do not silently accept "#undef foo bar".
|
||||
UnsignedEnums bool // GCC compatibility: enums with no negative values will have unsigned type.
|
||||
}
|
||||
|
||||
type SharedFunctionDefinitions struct {
|
||||
M map[*FunctionDefinition]struct{}
|
||||
m map[sharedFunctionDefinitionKey]*FunctionDefinition //TODO
|
||||
hash maphash.Hash
|
||||
}
|
||||
|
||||
type sharedFunctionDefinitionKey struct {
|
||||
pos StringID
|
||||
nm StringID
|
||||
hash uint64
|
||||
}
|
||||
|
||||
// Config amends behavior of translation phase 4 and above. Instances of Config
|
||||
// are not mutated by this package and it's safe to share/reuse them.
|
||||
//
|
||||
// The *Config passed to Parse or Translate should not be mutated afterwards.
|
||||
type Config struct {
|
||||
Config3
|
||||
ABI ABI
|
||||
|
||||
PragmaHandler func(Pragma, []Token) // Called on pragmas, other than #pragma STDC ..., if non nil
|
||||
|
||||
// SharedFunctionDefinitions collects function definitions having the
|
||||
// same position and definition. This can happen, for example, when a
|
||||
// function is defined in a header file included multiple times. Either
|
||||
// within a single translation unit or across translation units. In the
|
||||
// later case just supply the same SharedFunctionDefinitions in Config
|
||||
// when translating/parsing each translation unit.
|
||||
SharedFunctionDefinitions *SharedFunctionDefinitions
|
||||
|
||||
MaxErrors int // 0: default (10), < 0: unlimited, n: n.
|
||||
|
||||
CheckExternInlineFnBodies bool // Translate will consider extern inline function bodies.
|
||||
DebugIncludePaths bool // Output to stderr.
|
||||
DebugWorkingDir bool // Output to stderr.
|
||||
DoNotTypecheckAsm bool
|
||||
EnableAssignmentCompatibilityChecking bool // No such checks performed up to v3.31.0. Currently only partially implemented.
|
||||
InjectTracingCode bool // Output to stderr.
|
||||
LongDoubleIsDouble bool
|
||||
PreprocessOnly bool
|
||||
RejectAnonymousFields bool // Pedantic: do not silently accept "struct{int;}".
|
||||
RejectCaseRange bool // Pedantic: do not silently accept "case 'a'...'z':".
|
||||
RejectEmptyCompositeLiterals bool // Pedantic: do not silently accept "foo = (T){}".
|
||||
RejectEmptyDeclarations bool // Pedantic: do not silently accept "int foo(){};".
|
||||
RejectEmptyFields bool // Pedantic: do not silently accept "struct {int a;;} foo;".
|
||||
RejectEmptyInitializerList bool // Pedantic: do not silently accept "foo f = {};".
|
||||
RejectEmptyStructDeclaration bool // Pedantic: do not silently accept "struct{; int i}".
|
||||
RejectEmptyStructs bool // Pedantic: do not silently accept "struct foo {};".
|
||||
RejectIncompatibleMacroRedef bool // Pedantic: do not silently accept "#define MIN(A,B) ...\n#define MIN(a,b) ...\n" etc.
|
||||
RejectLabelValues bool // Pedantic: do not silently accept "foo: bar(); void *ptr = &&foo;" or "goto *ptr".
|
||||
RejectLateBinding bool // Pedantic: do not silently accept void f() { g(); } void g() {}
|
||||
RejectMissingConditionalExpr bool // Pedantic: do not silently accept "foo = bar ? : baz;".
|
||||
RejectMissingDeclarationSpecifiers bool // Pedantic: do not silently accept "main() {}".
|
||||
RejectMissingFinalStructFieldSemicolon bool // Pedantic: do not silently accept "struct{int i; int j}".
|
||||
RejectNestedFunctionDefinitions bool // Pedantic: do not silently accept nested function definitons.
|
||||
RejectParamSemicolon bool // Pedantic: do not silently accept "int f(int a; int b)".
|
||||
RejectStatementExpressions bool // Pedantic: do not silently accept "i = ({foo();})".
|
||||
RejectTypeof bool // Pedantic: do not silently accept "typeof foo" or "typeof(bar*)".
|
||||
RejectUninitializedDeclarators bool // Reject int f() { int j; return j; }
|
||||
TrackAssignments bool // Collect a list of LHS declarators a declarator is used in RHS or as an function argument.
|
||||
doNotSanityCheckComplexTypes bool // Testing only
|
||||
fakeIncludes bool // Testing only.
|
||||
ignoreErrors bool // Testing only.
|
||||
ignoreIncludes bool // Testing only.
|
||||
ignoreUndefinedIdentifiers bool // Testing only.
|
||||
}
|
||||
|
||||
type context struct {
|
||||
ast *AST
|
||||
breakCtx Node
|
||||
breaks int
|
||||
casePromote Type
|
||||
cases []*LabeledStatement // switch
|
||||
cfg *Config
|
||||
checkFn *FunctionDefinition
|
||||
closure map[StringID]struct{}
|
||||
continues int
|
||||
enums map[StringID]Operand //TODO putting this in alphabetical order within the struct causes crashes in VirtualBox/386 ???
|
||||
goscanner.ErrorList
|
||||
includePaths []string
|
||||
intBits int
|
||||
intMaxWidth int64 // Set if the preprocessor saw __INTMAX_WIDTH__.
|
||||
keywords map[StringID]rune
|
||||
maxAlign int // If non zero: maximum alignment of members of structures (other than zero-width bitfields).
|
||||
maxAlign0 int
|
||||
maxErrors int
|
||||
mode mode
|
||||
modes []mode
|
||||
mu sync.Mutex
|
||||
ptrdiffT Type
|
||||
readDelta int
|
||||
sizeT Type
|
||||
structTypes map[StringID]Type
|
||||
structs map[StructInfo]struct{}
|
||||
switches int
|
||||
sysIncludePaths []string
|
||||
tuSize0 int64 // Sum of sizes of processed inputs
|
||||
tuSources0 int32 // Number of processed inputs
|
||||
wcharT Type
|
||||
|
||||
capture bool
|
||||
evalIdentError bool
|
||||
}
|
||||
|
||||
func newContext(cfg *Config) *context {
|
||||
maxErrors := cfg.MaxErrors
|
||||
if maxErrors == 0 {
|
||||
maxErrors = 10
|
||||
}
|
||||
return &context{
|
||||
cfg: cfg,
|
||||
enums: map[StringID]Operand{},
|
||||
keywords: keywords,
|
||||
maxErrors: maxErrors,
|
||||
structTypes: map[StringID]Type{},
|
||||
structs: map[StructInfo]struct{}{},
|
||||
}
|
||||
}
|
||||
|
||||
func (c *context) tuSizeAdd(n int64) { atomic.AddInt64(&c.tuSize0, n) }
|
||||
func (c *context) tuSize() int64 { return atomic.LoadInt64(&c.tuSize0) }
|
||||
func (c *context) tuSourcesAdd(n int32) { atomic.AddInt32(&c.tuSources0, n) }
|
||||
func (c *context) tuSources() int { return int(atomic.LoadInt32(&c.tuSources0)) }
|
||||
|
||||
func (c *context) stddef(nm StringID, s Scope, tok Token) Type {
|
||||
if d := s.typedef(nm, tok); d != nil {
|
||||
if t := d.Type(); t != nil && t.Kind() != Invalid {
|
||||
return t
|
||||
}
|
||||
}
|
||||
|
||||
c.errNode(&tok, "front-end: undefined: %s", nm)
|
||||
return noType
|
||||
}
|
||||
|
||||
func (c *context) assignmentCompatibilityErrorCond(n Node, a, b Type) (stop bool) {
|
||||
if !c.cfg.EnableAssignmentCompatibilityChecking {
|
||||
return
|
||||
}
|
||||
|
||||
return c.errNode(n, "invalid type combination of conditional operator: %v and %v", a, b)
|
||||
}
|
||||
|
||||
func (c *context) assignmentCompatibilityError(n Node, lhs, rhs Type) (stop bool) {
|
||||
if !c.cfg.EnableAssignmentCompatibilityChecking {
|
||||
return
|
||||
}
|
||||
|
||||
return c.errNode(n, "cannot use %v as type %v in assignment", rhs, lhs)
|
||||
}
|
||||
|
||||
func (c *context) errNode(n Node, msg string, args ...interface{}) (stop bool) {
|
||||
return c.err(n.Position(), msg, args...)
|
||||
}
|
||||
|
||||
func (c *context) err(pos token.Position, msg string, args ...interface{}) (stop bool) {
|
||||
// dbg("FAIL "+msg, args...)
|
||||
//fmt.Printf("FAIL "+msg+"\n", args...)
|
||||
if c.cfg.ignoreErrors {
|
||||
return false
|
||||
}
|
||||
|
||||
s := fmt.Sprintf(msg, args...)
|
||||
c.mu.Lock()
|
||||
max := c.maxErrors
|
||||
switch {
|
||||
case max < 0 || max > len(c.ErrorList):
|
||||
c.ErrorList.Add(gotoken.Position(pos), s)
|
||||
default:
|
||||
stop = true
|
||||
}
|
||||
c.mu.Unlock()
|
||||
return stop
|
||||
}
|
||||
|
||||
func (c *context) errs(list goscanner.ErrorList) (stop bool) {
|
||||
c.mu.Lock()
|
||||
|
||||
defer c.mu.Unlock()
|
||||
|
||||
max := c.maxErrors
|
||||
for _, v := range list {
|
||||
switch {
|
||||
case max < 0 || max > len(c.ErrorList):
|
||||
c.ErrorList = append(c.ErrorList, v)
|
||||
default:
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (c *context) Err() error {
|
||||
c.mu.Lock()
|
||||
switch x := c.ErrorList.Err().(type) {
|
||||
case goscanner.ErrorList:
|
||||
x = append(goscanner.ErrorList(nil), x...)
|
||||
c.mu.Unlock()
|
||||
var lpos gotoken.Position
|
||||
w := 0
|
||||
for _, v := range x {
|
||||
if lpos.Filename != "" {
|
||||
if v.Pos.Filename == lpos.Filename && v.Pos.Line == lpos.Line {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
x[w] = v
|
||||
w++
|
||||
lpos = v.Pos
|
||||
}
|
||||
x = x[:w]
|
||||
sort.Slice(x, func(i, j int) bool {
|
||||
a := x[i]
|
||||
b := x[j]
|
||||
if !a.Pos.IsValid() && b.Pos.IsValid() {
|
||||
return true
|
||||
}
|
||||
|
||||
if a.Pos.IsValid() && !b.Pos.IsValid() {
|
||||
return false
|
||||
}
|
||||
|
||||
if a.Pos.Filename < b.Pos.Filename {
|
||||
return true
|
||||
}
|
||||
|
||||
if a.Pos.Filename > b.Pos.Filename {
|
||||
return false
|
||||
}
|
||||
|
||||
if a.Pos.Line < b.Pos.Line {
|
||||
return true
|
||||
}
|
||||
|
||||
if a.Pos.Line > b.Pos.Line {
|
||||
return false
|
||||
}
|
||||
|
||||
return a.Pos.Column < b.Pos.Column
|
||||
})
|
||||
a := make([]string, 0, len(x))
|
||||
for _, v := range x {
|
||||
a = append(a, v.Error())
|
||||
}
|
||||
return fmt.Errorf("%s", strings.Join(a, "\n"))
|
||||
default:
|
||||
c.mu.Unlock()
|
||||
return x
|
||||
}
|
||||
}
|
||||
|
||||
func (c *context) not(n Node, mode mode) {
|
||||
if c.mode&mode != 0 {
|
||||
switch mode {
|
||||
case mIntConstExpr:
|
||||
c.errNode(n, "invalid integer constant expression")
|
||||
default:
|
||||
panic(internalError())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (c *context) push(mode mode) {
|
||||
c.modes = append(c.modes, c.mode)
|
||||
c.mode = mode
|
||||
}
|
||||
|
||||
func (c *context) pop() {
|
||||
n := len(c.modes)
|
||||
c.mode = c.modes[n-1]
|
||||
c.modes = c.modes[:n-1]
|
||||
}
|
||||
|
||||
func (c *context) statFile(name string, sys bool) (os.FileInfo, error) {
|
||||
fs := c.cfg.Config3.Filesystem
|
||||
if fs == nil {
|
||||
fs = LocalFS()
|
||||
}
|
||||
return fs.Stat(name, sys)
|
||||
}
|
||||
|
||||
func (c *context) openFile(name string, sys bool) (io.ReadCloser, error) {
|
||||
fs := c.cfg.Config3.Filesystem
|
||||
if fs == nil {
|
||||
fs = LocalFS()
|
||||
}
|
||||
return fs.Open(name, sys)
|
||||
}
|
||||
|
||||
// HostConfig returns the system C preprocessor/compiler configuration, or an
|
||||
// error, if any. The configuration is obtained by running the command named
|
||||
// by the cpp argumnent or "cpp" when it's empty. For the predefined macros
|
||||
// list the '-dM' options is added. For the include paths lists, the option
|
||||
// '-v' is added and the output is parsed to extract the "..." include and
|
||||
// <...> include paths. To add any other options to cpp, list them in opts.
|
||||
//
|
||||
// The function relies on a POSIX/GCC compatible C preprocessor installed.
|
||||
// Execution of HostConfig is not free, so caching of the results is
|
||||
// recommended.
|
||||
func HostConfig(cpp string, opts ...string) (predefined string, includePaths, sysIncludePaths []string, err error) {
|
||||
if cpp == "" {
|
||||
cpp = "cpp"
|
||||
}
|
||||
args := append(append([]string{"-dM"}, opts...), os.DevNull)
|
||||
pre, err := exec.Command(cpp, args...).Output()
|
||||
if err != nil {
|
||||
return "", nil, nil, err
|
||||
}
|
||||
|
||||
args = append(append([]string{"-v"}, opts...), os.DevNull)
|
||||
out, err := exec.Command(cpp, args...).CombinedOutput()
|
||||
if err != nil {
|
||||
return "", nil, nil, err
|
||||
}
|
||||
|
||||
sep := "\n"
|
||||
if env("GOOS", runtime.GOOS) == "windows" {
|
||||
sep = "\r\n"
|
||||
}
|
||||
|
||||
a := strings.Split(string(out), sep)
|
||||
for i := 0; i < len(a); {
|
||||
switch a[i] {
|
||||
case "#include \"...\" search starts here:":
|
||||
loop:
|
||||
for i = i + 1; i < len(a); {
|
||||
switch v := a[i]; {
|
||||
case strings.HasPrefix(v, "#") || v == "End of search list.":
|
||||
break loop
|
||||
default:
|
||||
includePaths = append(includePaths, strings.TrimSpace(v))
|
||||
i++
|
||||
}
|
||||
}
|
||||
case "#include <...> search starts here:":
|
||||
for i = i + 1; i < len(a); {
|
||||
switch v := a[i]; {
|
||||
case strings.HasPrefix(v, "#") || v == "End of search list.":
|
||||
return string(pre), includePaths, sysIncludePaths, nil
|
||||
default:
|
||||
sysIncludePaths = append(sysIncludePaths, strings.TrimSpace(v))
|
||||
i++
|
||||
}
|
||||
}
|
||||
default:
|
||||
i++
|
||||
}
|
||||
}
|
||||
return "", nil, nil, fmt.Errorf("failed parsing %s -v output", cpp)
|
||||
}
|
||||
|
||||
func env(key, val string) string {
|
||||
if s := os.Getenv(key); s != "" {
|
||||
return s
|
||||
}
|
||||
|
||||
return val
|
||||
}
|
||||
|
||||
// Token is a grammar terminal.
|
||||
type Token struct {
|
||||
Rune rune // ';' or IDENTIFIER etc.
|
||||
Sep StringID // If Config3.PreserveWhiteSpace is in effect: All preceding white space combined, including comments.
|
||||
Value StringID // ";" or "foo" etc.
|
||||
Src StringID
|
||||
file *tokenFile
|
||||
macro StringID
|
||||
pos int32
|
||||
seq int32
|
||||
}
|
||||
|
||||
// Seq returns t's sequential number.
|
||||
//
|
||||
// Comparing positions as in 'before', 'after' is complicated as tokens in a
|
||||
// translation unit usually come from more than one source file. Macro
|
||||
// expansion further complicates that. The solution is sequentially numbering
|
||||
// the tokens as they are finally seen by the parser, so the usual arithmetic
|
||||
// '<', '>' operators can be used for that purpose.
|
||||
func (t Token) Seq() int { return int(t.seq) }
|
||||
|
||||
// Macro returns the name of a macro that expanded to this token, if any.
|
||||
func (t *Token) Macro() StringID { return t.macro }
|
||||
|
||||
// String implements fmt.Stringer.
|
||||
func (t Token) String() string { return t.Value.String() }
|
||||
|
||||
// Position implements Node.
|
||||
func (t *Token) Position() (r token.Position) {
|
||||
if t.pos != 0 && t.file != nil {
|
||||
r = t.file.PositionFor(token.Pos(t.pos), true)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func tokStr(toks interface{}, sep string) string {
|
||||
var b strings.Builder
|
||||
switch x := toks.(type) {
|
||||
case []token3:
|
||||
for i, v := range x {
|
||||
if i != 0 {
|
||||
b.WriteString(sep)
|
||||
}
|
||||
b.WriteString(v.String())
|
||||
}
|
||||
case []token4:
|
||||
for i, v := range x {
|
||||
if i != 0 {
|
||||
b.WriteString(sep)
|
||||
}
|
||||
b.WriteString(v.String())
|
||||
}
|
||||
case []cppToken:
|
||||
for i, v := range x {
|
||||
if i != 0 {
|
||||
b.WriteString(sep)
|
||||
}
|
||||
b.WriteString(v.String())
|
||||
}
|
||||
case []Token:
|
||||
for i, v := range x {
|
||||
if i != 0 {
|
||||
b.WriteString(sep)
|
||||
}
|
||||
b.WriteString(v.String())
|
||||
}
|
||||
default:
|
||||
panic(internalError())
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func internalError() int {
|
||||
panic(fmt.Errorf("%v: internal error", origin(2)))
|
||||
}
|
||||
|
||||
func internalErrorf(s string, args ...interface{}) int {
|
||||
s = fmt.Sprintf(s, args)
|
||||
panic(fmt.Errorf("%v: %s", origin(2), s))
|
||||
}
|
||||
|
||||
func detectMingw(s string) bool {
|
||||
return strings.Contains(s, "#define __MINGW")
|
||||
}
|
||||
|
||||
func nodeSource(n ...Node) (r string) {
|
||||
if len(n) == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
var a []*Token
|
||||
for _, v := range n {
|
||||
Inspect(v, func(n Node, _ bool) bool {
|
||||
if x, ok := n.(*Token); ok && x.Seq() != 0 {
|
||||
a = append(a, x)
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
sort.Slice(a, func(i, j int) bool {
|
||||
return a[i].Seq() < a[j].Seq()
|
||||
})
|
||||
w := 0
|
||||
seq := -1
|
||||
for _, v := range a {
|
||||
if n := v.Seq(); n != seq {
|
||||
seq = n
|
||||
a[w] = v
|
||||
w++
|
||||
}
|
||||
}
|
||||
a = a[:w]
|
||||
var b strings.Builder
|
||||
for _, v := range a {
|
||||
b.WriteString(v.Sep.String())
|
||||
b.WriteString(v.Src.String())
|
||||
}
|
||||
return b.String()
|
||||
}
|
5105
vendor/modernc.org/cc/v3/check.go
generated
vendored
Normal file
5105
vendor/modernc.org/cc/v3/check.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3076
vendor/modernc.org/cc/v3/cpp.go
generated
vendored
Normal file
3076
vendor/modernc.org/cc/v3/cpp.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
84
vendor/modernc.org/cc/v3/enum.go
generated
vendored
Normal file
84
vendor/modernc.org/cc/v3/enum.go
generated
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
// Copyright 2019 The CC Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cc // import "modernc.org/cc/v3"
|
||||
|
||||
// Values of Kind
|
||||
const (
|
||||
Invalid Kind = iota
|
||||
|
||||
Array // T[]
|
||||
Bool // _Bool
|
||||
Char // char
|
||||
ComplexChar // complex char
|
||||
ComplexDouble // complex double
|
||||
ComplexFloat // complex float
|
||||
ComplexInt // complex int
|
||||
ComplexLong // complex long
|
||||
ComplexLongDouble // complex long double
|
||||
ComplexLongLong // complex long long
|
||||
ComplexShort // complex short
|
||||
ComplexUInt // complex unsigned
|
||||
ComplexULong // complex unsigned long
|
||||
ComplexULongLong // complex unsigned long long
|
||||
ComplexUShort // complex shor
|
||||
Decimal128 // _Decimal128
|
||||
Decimal32 // _Decimal32
|
||||
Decimal64 // _Decimal64
|
||||
Double // double
|
||||
Enum // enum
|
||||
Float // float
|
||||
Float128 // _Float128
|
||||
Float32 // _Float32
|
||||
Float32x // _Float32x
|
||||
Float64 // _Float64
|
||||
Float64x // _Float64x
|
||||
Function // function
|
||||
Int // int
|
||||
Int8 // __int8
|
||||
Int16 // __int16
|
||||
Int32 // __int32
|
||||
Int64 // __int64
|
||||
Int128 // __int128
|
||||
Long // long
|
||||
LongDouble // long double
|
||||
LongLong // long long
|
||||
Ptr // pointer
|
||||
SChar // signed char
|
||||
Short // short
|
||||
Struct // struct
|
||||
TypedefName // typedefname
|
||||
UChar // unsigned char
|
||||
UInt // unsigned
|
||||
UInt8 // unsigned __int8
|
||||
UInt16 // unsigned __int16
|
||||
UInt32 // unsigned __int32
|
||||
UInt64 // unsigned __int64
|
||||
UInt128 // unsigned __int128
|
||||
ULong // unsigned long
|
||||
ULongLong // unsigned long long
|
||||
UShort // unsigned short
|
||||
Union // union
|
||||
Void // void
|
||||
Vector // vector
|
||||
|
||||
typeofExpr
|
||||
typeofType
|
||||
|
||||
maxKind
|
||||
)
|
||||
|
||||
// Values of Linkage
|
||||
const (
|
||||
None Linkage = iota
|
||||
Internal
|
||||
External
|
||||
)
|
||||
|
||||
// Values of StorageClass
|
||||
const (
|
||||
Static StorageClass = iota
|
||||
Automatic
|
||||
Allocated
|
||||
)
|
156
vendor/modernc.org/cc/v3/filesystem.go
generated
vendored
Normal file
156
vendor/modernc.org/cc/v3/filesystem.go
generated
vendored
Normal file
@ -0,0 +1,156 @@
|
||||
// Copyright 2019 The CC Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cc
|
||||
|
||||
import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Filesystem abstraction used in CC. The underlying value must be comparable (e.g. pointer) to be used in map keys.
|
||||
type Filesystem interface {
|
||||
// Stat is an analog of os.Stat, but also accepts a flag to indicate a system include (<file.h>).
|
||||
Stat(path string, sys bool) (os.FileInfo, error)
|
||||
// Open is an analog of os.Open, but also accepts a flag to indicate a system include (<file.h>).
|
||||
Open(path string, sys bool) (io.ReadCloser, error)
|
||||
}
|
||||
|
||||
// LocalFS returns a local filesystem implementation.
|
||||
func LocalFS() Filesystem {
|
||||
return localFS{}
|
||||
}
|
||||
|
||||
type localFS struct{}
|
||||
|
||||
// Stat implements Filesystem.
|
||||
func (localFS) Stat(path string, sys bool) (os.FileInfo, error) {
|
||||
return os.Stat(path)
|
||||
}
|
||||
|
||||
// Open implements Filesystem.
|
||||
func (localFS) Open(path string, sys bool) (io.ReadCloser, error) {
|
||||
return os.Open(path)
|
||||
}
|
||||
|
||||
// WorkingDir is a filesystem implementation that resolves paths relative to a given directory.
|
||||
// If filesystem is not specified, the local one will be used.
|
||||
func WorkingDir(wd string, fs Filesystem) Filesystem {
|
||||
if fs == nil {
|
||||
fs = LocalFS()
|
||||
}
|
||||
return workDir{fs: fs, wd: wd}
|
||||
}
|
||||
|
||||
type workDir struct {
|
||||
fs Filesystem
|
||||
wd string
|
||||
}
|
||||
|
||||
// Stat implements Filesystem.
|
||||
func (fs workDir) Stat(fname string, sys bool) (os.FileInfo, error) {
|
||||
if !path.IsAbs(fname) {
|
||||
fname = path.Join(fs.wd, fname)
|
||||
}
|
||||
return fs.fs.Stat(fname, sys)
|
||||
}
|
||||
|
||||
// Open implements Filesystem.
|
||||
func (fs workDir) Open(fname string, sys bool) (io.ReadCloser, error) {
|
||||
if !path.IsAbs(fname) {
|
||||
fname = path.Join(fs.wd, fname)
|
||||
}
|
||||
return fs.fs.Open(fname, sys)
|
||||
}
|
||||
|
||||
// Overlay is a filesystem implementation that first check if the file is available in the primary FS
|
||||
// and if not, falls back to a secondary FS.
|
||||
func Overlay(pri, sec Filesystem) Filesystem {
|
||||
return overlayFS{pri: pri, sec: sec}
|
||||
}
|
||||
|
||||
type overlayFS struct {
|
||||
pri, sec Filesystem
|
||||
}
|
||||
|
||||
// Stat implements Filesystem.
|
||||
func (fs overlayFS) Stat(path string, sys bool) (os.FileInfo, error) {
|
||||
st, err := fs.pri.Stat(path, sys)
|
||||
if err == nil || !os.IsNotExist(err) {
|
||||
return st, err
|
||||
}
|
||||
return fs.sec.Stat(path, sys)
|
||||
}
|
||||
|
||||
// Open implements Filesystem.
|
||||
func (fs overlayFS) Open(path string, sys bool) (io.ReadCloser, error) {
|
||||
f, err := fs.pri.Open(path, sys)
|
||||
if err == nil || !os.IsNotExist(err) {
|
||||
return f, err
|
||||
}
|
||||
return fs.sec.Open(path, sys)
|
||||
}
|
||||
|
||||
// StaticFS implements filesystem interface by serving string values form the provided map.
|
||||
func StaticFS(files map[string]string) Filesystem {
|
||||
return &staticFS{m: files, ts: time.Now()}
|
||||
}
|
||||
|
||||
type staticFS struct {
|
||||
ts time.Time
|
||||
m map[string]string
|
||||
}
|
||||
|
||||
// Stat implements Filesystem.
|
||||
func (fs *staticFS) Stat(path string, sys bool) (os.FileInfo, error) {
|
||||
v, ok := fs.m[path]
|
||||
if !ok {
|
||||
return nil, &os.PathError{"stat", path, os.ErrNotExist}
|
||||
}
|
||||
return staticFileInfo{name: path, size: int64(len(v)), mode: 0, mod: fs.ts}, nil
|
||||
}
|
||||
|
||||
// Open implements Filesystem.
|
||||
func (fs *staticFS) Open(path string, sys bool) (io.ReadCloser, error) {
|
||||
v, ok := fs.m[path]
|
||||
if !ok {
|
||||
return nil, &os.PathError{"open", path, os.ErrNotExist}
|
||||
}
|
||||
return ioutil.NopCloser(strings.NewReader(v)), nil
|
||||
}
|
||||
|
||||
type staticFileInfo struct {
|
||||
name string
|
||||
size int64
|
||||
mode os.FileMode
|
||||
mod time.Time
|
||||
}
|
||||
|
||||
func (fi staticFileInfo) Name() string {
|
||||
return fi.name
|
||||
}
|
||||
|
||||
func (fi staticFileInfo) Size() int64 {
|
||||
return fi.size
|
||||
}
|
||||
|
||||
func (fi staticFileInfo) Mode() os.FileMode {
|
||||
return fi.mode
|
||||
}
|
||||
|
||||
func (fi staticFileInfo) ModTime() time.Time {
|
||||
return fi.mod
|
||||
}
|
||||
|
||||
func (fi staticFileInfo) IsDir() bool {
|
||||
return fi.mode.IsDir()
|
||||
}
|
||||
|
||||
func (fi staticFileInfo) Sys() interface{} {
|
||||
return fi
|
||||
}
|
12
vendor/modernc.org/cc/v3/go.mod
generated
vendored
Normal file
12
vendor/modernc.org/cc/v3/go.mod
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
module modernc.org/cc/v3
|
||||
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/dustin/go-humanize v1.0.0
|
||||
github.com/google/go-cmp v0.5.3
|
||||
lukechampine.com/uint128 v1.1.1
|
||||
modernc.org/mathutil v1.4.0
|
||||
modernc.org/strutil v1.1.1
|
||||
modernc.org/token v1.0.0
|
||||
)
|
17
vendor/modernc.org/cc/v3/go.sum
generated
vendored
Normal file
17
vendor/modernc.org/cc/v3/go.sum
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
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/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
|
||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
lukechampine.com/uint128 v1.1.1 h1:pnxCASz787iMf+02ssImqk6OLt+Z5QHMoZyUXR4z6JU=
|
||||
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
||||
modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
modernc.org/mathutil v1.4.0 h1:GCjoRaBew8ECCKINQA2nYjzvufFW9YiEuuB+rQ9bn2E=
|
||||
modernc.org/mathutil v1.4.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
|
||||
modernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs=
|
||||
modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw=
|
||||
modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk=
|
||||
modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
|
632
vendor/modernc.org/cc/v3/inspect.go
generated
vendored
Normal file
632
vendor/modernc.org/cc/v3/inspect.go
generated
vendored
Normal file
@ -0,0 +1,632 @@
|
||||
// Copyright 2020 The CC Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cc // import "modernc.org/cc/v3"
|
||||
|
||||
// Inspect inspects AST node trees.
|
||||
//
|
||||
// If n is a non-terminal node, f(n, true) is called first. Next, f is called
|
||||
// recursively for each of n's non-nil non-terminal children nodes, if any, in
|
||||
// alphabetical order. Next, all n's terminal nodes, if any, are visited in
|
||||
// the numeric order of their suffixes (Token, Token2, Token3, ...). Finally,
|
||||
// f(n, false) is invoked.
|
||||
//
|
||||
// If n a terminal node, of type *Token, f(n, <unspecified boolean value> is
|
||||
// called once.
|
||||
//
|
||||
// Inspect stops when any invocation of f returns false.
|
||||
func Inspect(n Node, f func(Node, bool) bool) {
|
||||
see(n, f)
|
||||
}
|
||||
|
||||
func see(n Node, f func(Node, bool) bool) bool {
|
||||
switch x := n.(type) {
|
||||
case *AbstractDeclarator:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.DirectAbstractDeclarator, f) &&
|
||||
see(x.Pointer, f) &&
|
||||
f(x, false)
|
||||
case *AdditiveExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AdditiveExpression, f) &&
|
||||
see(x.MultiplicativeExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *AlignmentSpecifier:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.ConstantExpression, f) &&
|
||||
see(x.TypeName, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
f(x, false)
|
||||
case *AndExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AndExpression, f) &&
|
||||
see(x.EqualityExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *ArgumentExpressionList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.ArgumentExpressionList, f) &&
|
||||
see(x.AssignmentExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *Asm:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AsmArgList, f) &&
|
||||
see(x.AsmQualifierList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
see(&x.Token4, f) &&
|
||||
f(x, false)
|
||||
case *AsmArgList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AsmArgList, f) &&
|
||||
see(x.AsmExpressionList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *AsmExpressionList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AsmExpressionList, f) &&
|
||||
see(x.AsmIndex, f) &&
|
||||
see(x.AssignmentExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *AsmFunctionDefinition:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AsmStatement, f) &&
|
||||
see(x.DeclarationSpecifiers, f) &&
|
||||
see(x.Declarator, f) &&
|
||||
f(x, false)
|
||||
case *AsmIndex:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.Expression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
f(x, false)
|
||||
case *AsmQualifier:
|
||||
return x == nil || f(x, true) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *AsmQualifierList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AsmQualifier, f) &&
|
||||
see(x.AsmQualifierList, f) &&
|
||||
f(x, false)
|
||||
case *AsmStatement:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.Asm, f) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *AssignmentExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AssignmentExpression, f) &&
|
||||
see(x.ConditionalExpression, f) &&
|
||||
see(x.UnaryExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *AtomicTypeSpecifier:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.TypeName, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
f(x, false)
|
||||
case *AttributeSpecifier:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeValueList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
see(&x.Token4, f) &&
|
||||
see(&x.Token5, f) &&
|
||||
f(x, false)
|
||||
case *AttributeSpecifierList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeSpecifier, f) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
f(x, false)
|
||||
case *AttributeValue:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.ExpressionList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
f(x, false)
|
||||
case *AttributeValueList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeValue, f) &&
|
||||
see(x.AttributeValueList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *BlockItem:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.CompoundStatement, f) &&
|
||||
see(x.Declaration, f) &&
|
||||
see(x.DeclarationSpecifiers, f) &&
|
||||
see(x.Declarator, f) &&
|
||||
see(x.LabelDeclaration, f) &&
|
||||
see(x.PragmaSTDC, f) &&
|
||||
see(x.Statement, f) &&
|
||||
f(x, false)
|
||||
case *BlockItemList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.BlockItem, f) &&
|
||||
see(x.BlockItemList, f) &&
|
||||
f(x, false)
|
||||
case *CastExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.CastExpression, f) &&
|
||||
see(x.TypeName, f) &&
|
||||
see(x.UnaryExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
f(x, false)
|
||||
case *CompoundStatement:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.BlockItemList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
f(x, false)
|
||||
case *ConditionalExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.ConditionalExpression, f) &&
|
||||
see(x.Expression, f) &&
|
||||
see(x.LogicalOrExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
f(x, false)
|
||||
case *ConstantExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.ConditionalExpression, f) &&
|
||||
f(x, false)
|
||||
case *Declaration:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.DeclarationSpecifiers, f) &&
|
||||
see(x.InitDeclaratorList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *DeclarationList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.Declaration, f) &&
|
||||
see(x.DeclarationList, f) &&
|
||||
f(x, false)
|
||||
case *DeclarationSpecifiers:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AlignmentSpecifier, f) &&
|
||||
see(x.AttributeSpecifier, f) &&
|
||||
see(x.DeclarationSpecifiers, f) &&
|
||||
see(x.FunctionSpecifier, f) &&
|
||||
see(x.StorageClassSpecifier, f) &&
|
||||
see(x.TypeQualifier, f) &&
|
||||
see(x.TypeSpecifier, f) &&
|
||||
f(x, false)
|
||||
case *Declarator:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(x.DirectDeclarator, f) &&
|
||||
see(x.Pointer, f) &&
|
||||
f(x, false)
|
||||
case *Designation:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.DesignatorList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *Designator:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.ConstantExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
f(x, false)
|
||||
case *DesignatorList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.Designator, f) &&
|
||||
see(x.DesignatorList, f) &&
|
||||
f(x, false)
|
||||
case *DirectAbstractDeclarator:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AbstractDeclarator, f) &&
|
||||
see(x.AssignmentExpression, f) &&
|
||||
see(x.DirectAbstractDeclarator, f) &&
|
||||
see(x.ParameterTypeList, f) &&
|
||||
see(x.TypeQualifiers, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
f(x, false)
|
||||
case *DirectDeclarator:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.Asm, f) &&
|
||||
see(x.AssignmentExpression, f) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(x.Declarator, f) &&
|
||||
see(x.DirectDeclarator, f) &&
|
||||
see(x.IdentifierList, f) &&
|
||||
see(x.ParameterTypeList, f) &&
|
||||
see(x.TypeQualifiers, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
f(x, false)
|
||||
case *EnumSpecifier:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(x.EnumeratorList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
see(&x.Token4, f) &&
|
||||
see(&x.Token5, f) &&
|
||||
f(x, false)
|
||||
case *Enumerator:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(x.ConstantExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
f(x, false)
|
||||
case *EnumeratorList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.Enumerator, f) &&
|
||||
see(x.EnumeratorList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *EqualityExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.EqualityExpression, f) &&
|
||||
see(x.RelationalExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *ExclusiveOrExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AndExpression, f) &&
|
||||
see(x.ExclusiveOrExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *Expression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AssignmentExpression, f) &&
|
||||
see(x.Expression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *ExpressionList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AssignmentExpression, f) &&
|
||||
see(x.ExpressionList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *ExpressionStatement:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(x.Expression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *ExternalDeclaration:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AsmFunctionDefinition, f) &&
|
||||
see(x.AsmStatement, f) &&
|
||||
see(x.Declaration, f) &&
|
||||
see(x.FunctionDefinition, f) &&
|
||||
see(x.PragmaSTDC, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *FunctionDefinition:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.CompoundStatement, f) &&
|
||||
see(x.DeclarationList, f) &&
|
||||
see(x.DeclarationSpecifiers, f) &&
|
||||
see(x.Declarator, f) &&
|
||||
f(x, false)
|
||||
case *FunctionSpecifier:
|
||||
return x == nil || f(x, true) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *IdentifierList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.IdentifierList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
f(x, false)
|
||||
case *InclusiveOrExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.ExclusiveOrExpression, f) &&
|
||||
see(x.InclusiveOrExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *InitDeclarator:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(x.Declarator, f) &&
|
||||
see(x.Initializer, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *InitDeclaratorList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(x.InitDeclarator, f) &&
|
||||
see(x.InitDeclaratorList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *Initializer:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AssignmentExpression, f) &&
|
||||
see(x.InitializerList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
f(x, false)
|
||||
case *InitializerList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.Designation, f) &&
|
||||
see(x.Initializer, f) &&
|
||||
see(x.InitializerList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *IterationStatement:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.Declaration, f) &&
|
||||
see(x.Expression, f) &&
|
||||
see(x.Expression2, f) &&
|
||||
see(x.Expression3, f) &&
|
||||
see(x.Statement, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
see(&x.Token4, f) &&
|
||||
see(&x.Token5, f) &&
|
||||
f(x, false)
|
||||
case *JumpStatement:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.Expression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
f(x, false)
|
||||
case *LabelDeclaration:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.IdentifierList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
f(x, false)
|
||||
case *LabeledStatement:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(x.ConstantExpression, f) &&
|
||||
see(x.ConstantExpression2, f) &&
|
||||
see(x.Statement, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
f(x, false)
|
||||
case *LogicalAndExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.InclusiveOrExpression, f) &&
|
||||
see(x.LogicalAndExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *LogicalOrExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.LogicalAndExpression, f) &&
|
||||
see(x.LogicalOrExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *MultiplicativeExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.CastExpression, f) &&
|
||||
see(x.MultiplicativeExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *ParameterDeclaration:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AbstractDeclarator, f) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(x.DeclarationSpecifiers, f) &&
|
||||
see(x.Declarator, f) &&
|
||||
f(x, false)
|
||||
case *ParameterList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.ParameterDeclaration, f) &&
|
||||
see(x.ParameterList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *ParameterTypeList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.ParameterList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
f(x, false)
|
||||
case *Pointer:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.Pointer, f) &&
|
||||
see(x.TypeQualifiers, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *PostfixExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.ArgumentExpressionList, f) &&
|
||||
see(x.Expression, f) &&
|
||||
see(x.InitializerList, f) &&
|
||||
see(x.PostfixExpression, f) &&
|
||||
see(x.PrimaryExpression, f) &&
|
||||
see(x.TypeName, f) &&
|
||||
see(x.TypeName2, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
see(&x.Token4, f) &&
|
||||
see(&x.Token5, f) &&
|
||||
f(x, false)
|
||||
case *PragmaSTDC:
|
||||
return x == nil || f(x, true) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
see(&x.Token4, f) &&
|
||||
f(x, false)
|
||||
case *PrimaryExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.CompoundStatement, f) &&
|
||||
see(x.Expression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
f(x, false)
|
||||
case *RelationalExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.RelationalExpression, f) &&
|
||||
see(x.ShiftExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *SelectionStatement:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.Expression, f) &&
|
||||
see(x.Statement, f) &&
|
||||
see(x.Statement2, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
see(&x.Token4, f) &&
|
||||
f(x, false)
|
||||
case *ShiftExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AdditiveExpression, f) &&
|
||||
see(x.ShiftExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *SpecifierQualifierList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AlignmentSpecifier, f) &&
|
||||
see(x.AttributeSpecifier, f) &&
|
||||
see(x.SpecifierQualifierList, f) &&
|
||||
see(x.TypeQualifier, f) &&
|
||||
see(x.TypeSpecifier, f) &&
|
||||
f(x, false)
|
||||
case *Statement:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AsmStatement, f) &&
|
||||
see(x.CompoundStatement, f) &&
|
||||
see(x.ExpressionStatement, f) &&
|
||||
see(x.IterationStatement, f) &&
|
||||
see(x.JumpStatement, f) &&
|
||||
see(x.LabeledStatement, f) &&
|
||||
see(x.SelectionStatement, f) &&
|
||||
f(x, false)
|
||||
case *StorageClassSpecifier:
|
||||
return x == nil || f(x, true) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *StructDeclaration:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.SpecifierQualifierList, f) &&
|
||||
see(x.StructDeclaratorList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *StructDeclarationList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.StructDeclaration, f) &&
|
||||
see(x.StructDeclarationList, f) &&
|
||||
f(x, false)
|
||||
case *StructDeclarator:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(x.ConstantExpression, f) &&
|
||||
see(x.Declarator, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *StructDeclaratorList:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.StructDeclarator, f) &&
|
||||
see(x.StructDeclaratorList, f) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *StructOrUnion:
|
||||
return x == nil || f(x, true) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *StructOrUnionSpecifier:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeSpecifierList, f) &&
|
||||
see(x.StructDeclarationList, f) &&
|
||||
see(x.StructOrUnion, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
f(x, false)
|
||||
case *TranslationUnit:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.ExternalDeclaration, f) &&
|
||||
see(x.TranslationUnit, f) &&
|
||||
f(x, false)
|
||||
case *TypeName:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AbstractDeclarator, f) &&
|
||||
see(x.SpecifierQualifierList, f) &&
|
||||
f(x, false)
|
||||
case *TypeQualifier:
|
||||
return x == nil || f(x, true) &&
|
||||
see(&x.Token, f) &&
|
||||
f(x, false)
|
||||
case *TypeQualifiers:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AttributeSpecifier, f) &&
|
||||
see(x.TypeQualifier, f) &&
|
||||
see(x.TypeQualifiers, f) &&
|
||||
f(x, false)
|
||||
case *TypeSpecifier:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.AtomicTypeSpecifier, f) &&
|
||||
see(x.EnumSpecifier, f) &&
|
||||
see(x.Expression, f) &&
|
||||
see(x.StructOrUnionSpecifier, f) &&
|
||||
see(x.TypeName, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
f(x, false)
|
||||
case *UnaryExpression:
|
||||
return x == nil || f(x, true) &&
|
||||
see(x.CastExpression, f) &&
|
||||
see(x.PostfixExpression, f) &&
|
||||
see(x.TypeName, f) &&
|
||||
see(x.UnaryExpression, f) &&
|
||||
see(&x.Token, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token2, f) &&
|
||||
see(&x.Token3, f) &&
|
||||
f(x, false)
|
||||
case *Token:
|
||||
return f(x, true)
|
||||
default:
|
||||
panic(todo("internal error: %T", x))
|
||||
}
|
||||
}
|
1555
vendor/modernc.org/cc/v3/lexer.go
generated
vendored
Normal file
1555
vendor/modernc.org/cc/v3/lexer.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
97
vendor/modernc.org/cc/v3/lexer.l
generated
vendored
Normal file
97
vendor/modernc.org/cc/v3/lexer.l
generated
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
%{
|
||||
// Copyright 2019 The CC Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
%}
|
||||
|
||||
%yyc c
|
||||
%yyn c = s.next()
|
||||
%yym s.mark = len(s.charBuf)
|
||||
|
||||
%{
|
||||
package cc // import "modernc.org/cc/v3"
|
||||
|
||||
func (s *scanner) scan() (r rune) {
|
||||
%}
|
||||
|
||||
c-char [^'\n\x80\\]|{escape-sequence}
|
||||
c-char-sequence {c-char}+
|
||||
character-constant '{c-char-sequence}'
|
||||
comment "/*"([^*\x80]|\*+[^*/\x80])*\*+\/
|
||||
comment-not-terminated "/*"([^*\x80]|\*+[^*/\x80])*(\*+)?\n\x80
|
||||
digit [0-9]
|
||||
escape-sequence {simple-sequence}|{octal-escape-sequence}|{hexadecimal-escape-sequence}|{universal-character-name}
|
||||
hex-quad {hexadecimal-digit}{hexadecimal-digit}{hexadecimal-digit}{hexadecimal-digit}
|
||||
hexadecimal-digit [0-9a-fA-F]
|
||||
hexadecimal-escape-sequence \\x{hexadecimal-digit}+
|
||||
identifier {identifier-nondigit}({identifier-nondigit}|{digit}|"$")*
|
||||
identifier-nondigit {nondigit}|"$"|{universal-character-name}
|
||||
line-comment "//"[^\n\x80]*
|
||||
nondigit [_a-zA-Z\x81]
|
||||
octal-digit [0-7]
|
||||
octal-escape-sequence \\{octal-digit}{octal-digit}?{octal-digit}?
|
||||
pp-number ({digit}|\.{digit})({digit}|{identifier-nondigit}|[eEpP]{sign}|\.)*
|
||||
s-char [^\x22\n\x80\\]|{escape-sequence}
|
||||
s-char-sequence {s-char}+
|
||||
sign [-+]
|
||||
simple-sequence \\['\x22?\\abfnrtv]
|
||||
string-literal \x22{s-char-sequence}?\x22
|
||||
universal-character-name \\u{hex-quad}|\\U{hex-quad}{hex-quad}
|
||||
white-space [ \t\f\v]
|
||||
|
||||
%%
|
||||
c := s.initScan()
|
||||
|
||||
({white-space}|{comment})*{line-comment} |
|
||||
({white-space}|{comment})+{line-comment}?
|
||||
return ' '
|
||||
|
||||
(({white-space}|{comment})*{comment-not-terminated})+
|
||||
return s.unterminatedComment()
|
||||
|
||||
"!=" return NEQ
|
||||
"##" return PPPASTE
|
||||
"%:" return '#'
|
||||
"%:%:" return PPPASTE
|
||||
"%=" return MODASSIGN
|
||||
"%>" return '}'
|
||||
"&&" return ANDAND
|
||||
"&=" return ANDASSIGN
|
||||
"*=" return MULASSIGN
|
||||
"++" return INC
|
||||
"+=" return ADDASSIGN
|
||||
"--" return DEC
|
||||
"-=" return SUBASSIGN
|
||||
"->" return ARROW
|
||||
"..." return DDD
|
||||
"/=" return DIVASSIGN
|
||||
":>" return ']'
|
||||
"<%" return '{'
|
||||
"<:" return '['
|
||||
"<<" return LSH
|
||||
"<<=" return LSHASSIGN
|
||||
"<=" return LEQ
|
||||
"==" return EQ
|
||||
">=" return GEQ
|
||||
">>" return RSH
|
||||
">>=" return RSHASSIGN
|
||||
"^=" return XORASSIGN
|
||||
"|=" return ORASSIGN
|
||||
"||" return OROR
|
||||
|
||||
L{string-literal} return LONGSTRINGLITERAL
|
||||
L{character-constant} return LONGCHARCONST
|
||||
{character-constant} return CHARCONST
|
||||
{identifier} return IDENTIFIER
|
||||
{pp-number} return PPNUMBER
|
||||
{string-literal} return STRINGLITERAL
|
||||
|
||||
\r?\n return '\n'
|
||||
|
||||
%%
|
||||
if c, ok := s.abort(); ok {
|
||||
return rune(c)
|
||||
}
|
||||
|
||||
goto yyAction
|
||||
}
|
1337
vendor/modernc.org/cc/v3/operand.go
generated
vendored
Normal file
1337
vendor/modernc.org/cc/v3/operand.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4278
vendor/modernc.org/cc/v3/parser.go
generated
vendored
Normal file
4278
vendor/modernc.org/cc/v3/parser.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1029
vendor/modernc.org/cc/v3/parser.yy
generated
vendored
Normal file
1029
vendor/modernc.org/cc/v3/parser.yy
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1269
vendor/modernc.org/cc/v3/scanner.go
generated
vendored
Normal file
1269
vendor/modernc.org/cc/v3/scanner.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
99
vendor/modernc.org/cc/v3/stringer.go
generated
vendored
Normal file
99
vendor/modernc.org/cc/v3/stringer.go
generated
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
// Code generated by "stringer -output stringer.go -linecomment -type=Kind,Linkage"; DO NOT EDIT.
|
||||
|
||||
package cc
|
||||
|
||||
import "strconv"
|
||||
|
||||
func _() {
|
||||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
var x [1]struct{}
|
||||
_ = x[Invalid-0]
|
||||
_ = x[Array-1]
|
||||
_ = x[Bool-2]
|
||||
_ = x[Char-3]
|
||||
_ = x[ComplexChar-4]
|
||||
_ = x[ComplexDouble-5]
|
||||
_ = x[ComplexFloat-6]
|
||||
_ = x[ComplexInt-7]
|
||||
_ = x[ComplexLong-8]
|
||||
_ = x[ComplexLongDouble-9]
|
||||
_ = x[ComplexLongLong-10]
|
||||
_ = x[ComplexShort-11]
|
||||
_ = x[ComplexUInt-12]
|
||||
_ = x[ComplexULong-13]
|
||||
_ = x[ComplexULongLong-14]
|
||||
_ = x[ComplexUShort-15]
|
||||
_ = x[Decimal128-16]
|
||||
_ = x[Decimal32-17]
|
||||
_ = x[Decimal64-18]
|
||||
_ = x[Double-19]
|
||||
_ = x[Enum-20]
|
||||
_ = x[Float-21]
|
||||
_ = x[Float128-22]
|
||||
_ = x[Float32-23]
|
||||
_ = x[Float32x-24]
|
||||
_ = x[Float64-25]
|
||||
_ = x[Float64x-26]
|
||||
_ = x[Function-27]
|
||||
_ = x[Int-28]
|
||||
_ = x[Int8-29]
|
||||
_ = x[Int16-30]
|
||||
_ = x[Int32-31]
|
||||
_ = x[Int64-32]
|
||||
_ = x[Int128-33]
|
||||
_ = x[Long-34]
|
||||
_ = x[LongDouble-35]
|
||||
_ = x[LongLong-36]
|
||||
_ = x[Ptr-37]
|
||||
_ = x[SChar-38]
|
||||
_ = x[Short-39]
|
||||
_ = x[Struct-40]
|
||||
_ = x[TypedefName-41]
|
||||
_ = x[UChar-42]
|
||||
_ = x[UInt-43]
|
||||
_ = x[UInt8-44]
|
||||
_ = x[UInt16-45]
|
||||
_ = x[UInt32-46]
|
||||
_ = x[UInt64-47]
|
||||
_ = x[UInt128-48]
|
||||
_ = x[ULong-49]
|
||||
_ = x[ULongLong-50]
|
||||
_ = x[UShort-51]
|
||||
_ = x[Union-52]
|
||||
_ = x[Void-53]
|
||||
_ = x[Vector-54]
|
||||
_ = x[typeofExpr-55]
|
||||
_ = x[typeofType-56]
|
||||
_ = x[maxKind-57]
|
||||
}
|
||||
|
||||
const _Kind_name = "InvalidT[]_Boolcharcomplex charcomplex doublecomplex floatcomplex intcomplex longcomplex long doublecomplex long longcomplex shortcomplex unsignedcomplex unsigned longcomplex unsigned long longcomplex shor_Decimal128_Decimal32_Decimal64doubleenumfloat_Float128_Float32_Float32x_Float64_Float64xfunctionint__int8__int16__int32__int64__int128longlong doublelong longpointersigned charshortstructtypedefnameunsigned charunsignedunsigned __int8unsigned __int16unsigned __int32unsigned __int64unsigned __int128unsigned longunsigned long longunsigned shortunionvoidvectortypeofExprtypeofTypemaxKind"
|
||||
|
||||
var _Kind_index = [...]uint16{0, 7, 10, 15, 19, 31, 45, 58, 69, 81, 100, 117, 130, 146, 167, 193, 205, 216, 226, 236, 242, 246, 251, 260, 268, 277, 285, 294, 302, 305, 311, 318, 325, 332, 340, 344, 355, 364, 371, 382, 387, 393, 404, 417, 425, 440, 456, 472, 488, 505, 518, 536, 550, 555, 559, 565, 575, 585, 592}
|
||||
|
||||
func (i Kind) String() string {
|
||||
if i >= Kind(len(_Kind_index)-1) {
|
||||
return "Kind(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||
}
|
||||
return _Kind_name[_Kind_index[i]:_Kind_index[i+1]]
|
||||
}
|
||||
func _() {
|
||||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
var x [1]struct{}
|
||||
_ = x[None-0]
|
||||
_ = x[Internal-1]
|
||||
_ = x[External-2]
|
||||
}
|
||||
|
||||
const _Linkage_name = "NoneInternalExternal"
|
||||
|
||||
var _Linkage_index = [...]uint8{0, 4, 12, 20}
|
||||
|
||||
func (i Linkage) String() string {
|
||||
if i < 0 || i >= Linkage(len(_Linkage_index)-1) {
|
||||
return "Linkage(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||
}
|
||||
return _Linkage_name[_Linkage_index[i]:_Linkage_index[i+1]]
|
||||
}
|
3271
vendor/modernc.org/cc/v3/type.go
generated
vendored
Normal file
3271
vendor/modernc.org/cc/v3/type.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
vendor/modernc.org/cc/v3/unconvert.sh
generated
vendored
Normal file
4
vendor/modernc.org/cc/v3/unconvert.sh
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
until unconvert -fastmath . &> /dev/null
|
||||
do
|
||||
unconvert -fastmath -apply . &> /dev/null
|
||||
done
|
27
vendor/modernc.org/ccgo/v3/LICENSE
generated
vendored
Normal file
27
vendor/modernc.org/ccgo/v3/LICENSE
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Copyright (c) 2017 The CCGO Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the names of the authors nor the names of the
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
129
vendor/modernc.org/ccgo/v3/lib/Makefile
generated
vendored
Normal file
129
vendor/modernc.org/ccgo/v3/lib/Makefile
generated
vendored
Normal file
@ -0,0 +1,129 @@
|
||||
# Copyright 2019 The CCGO Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file.
|
||||
|
||||
.PHONY: all bench clean cover cpu editor internalError later mem nuke todo edit devbench
|
||||
|
||||
grep=--include=*.go
|
||||
ngrep='TODOOK\|internalError\|testdata'
|
||||
testlog=testdata/testlog-$(shell echo $$GOOS)-$(shell echo $$GOARCH)-on-$(shell go env GOOS)-$(shell go env GOARCH)
|
||||
|
||||
all:
|
||||
LC_ALL=C make all_log 2>&1 | tee log
|
||||
|
||||
all_log:
|
||||
date
|
||||
go version
|
||||
uname -a
|
||||
./unconvert.sh
|
||||
gofmt -l -s -w *.go
|
||||
GOOS=darwin GOARCH=amd64 go build -o /dev/null
|
||||
GOOS=linux GOARCH=386 go build -o /dev/null
|
||||
GOOS=linux GOARCH=amd64 go build -o /dev/null
|
||||
GOOS=linux GOARCH=arm go build -o /dev/null
|
||||
GOOS=windows GOARCH=386 go build -o /dev/null
|
||||
GOOS=windows GOARCH=amd64 go build -o /dev/null
|
||||
go vet 2>&1 | grep -v $(ngrep) || true
|
||||
golint 2>&1 | grep -v $(ngrep) || true
|
||||
make todo
|
||||
misspell *.go
|
||||
staticcheck | grep -v 'lexer\.go' || true
|
||||
maligned || true
|
||||
grep -n 'files.*, ok' log
|
||||
@grep -n --color=never 'FAIL\|PASS' log
|
||||
@grep -n --color=always 'FAIL' log
|
||||
grep -n --color=always 'nil pointer' log
|
||||
grep -c 'exit status 1' log || true
|
||||
grep -c 'exit status 2' log || true
|
||||
LC_ALL=C date 2>&1 | tee -a log
|
||||
|
||||
test:
|
||||
LC_ALL=C make test_log 2>&1 | tee $(testlog)
|
||||
grep -ni --color=always fail $(testlog) || true
|
||||
|
||||
test_log:
|
||||
go version
|
||||
uname -a
|
||||
go test -v -timeout 24h
|
||||
date | tee -a $(testlog)
|
||||
|
||||
test_linux_amd64:
|
||||
GOOS=linux GOARCH=amd64 make test
|
||||
|
||||
test_linux_386:
|
||||
GOOS=linux GOARCH=386 make test
|
||||
|
||||
test_linux_arm:
|
||||
GOOS=linux GOARCH=arm make test
|
||||
|
||||
test_linux_arm64:
|
||||
GOOS=linux GOARCH=arm64 make test
|
||||
|
||||
test_windows_386:
|
||||
go version | tee %TEMP%\testlog-windows-386
|
||||
go test -v -timeout 24h | tee -a %TEMP%\testlog-windows-386
|
||||
date /T | tee -a %TEMP%\testlog-windows-386
|
||||
time /T | tee -a %TEMP%\testlog-windows-386
|
||||
|
||||
test_windows_amd64:
|
||||
go version | tee %TEMP%\testlog-windows-amd64
|
||||
go test -v -timeout 24h | tee -a %TEMP%\testlog-windows-amd64
|
||||
date /T | tee -a %TEMP%\testlog-windows-amd64
|
||||
time /T | tee -a %TEMP%\testlog-windows-amd64
|
||||
|
||||
build_all_targets:
|
||||
GOOS=darwin GOARCH=amd64 go build -v ./...
|
||||
GOOS=linux GOARCH=386 go build -v ./...
|
||||
GOOS=linux GOARCH=amd64 go build -v ./...
|
||||
GOOS=linux GOARCH=arm go build -v ./...
|
||||
GOOS=linux GOARCH=arm64 go build -v ./...
|
||||
GOOS=windows GOARCH=386 go build -v ./...
|
||||
GOOS=windows GOARCH=amd64 go build -v ./...
|
||||
|
||||
devbench:
|
||||
date 2>&1 | tee log-devbench
|
||||
go test -timeout 24h -dev -run @ -bench . 2>&1 | tee -a log-devbench
|
||||
grep -n 'FAIL\|SKIP' log-devbench || true
|
||||
|
||||
bench:
|
||||
date 2>&1 | tee log-bench
|
||||
go test -timeout 24h -v -run '^[^E]' -bench . 2>&1 | tee -a log-bench
|
||||
grep -n 'FAIL\|SKIP' log-bench || true
|
||||
|
||||
clean:
|
||||
go clean
|
||||
rm -f *~ *.test *.out
|
||||
|
||||
cover:
|
||||
t=$(shell mktemp) ; go test -coverprofile $$t && go tool cover -html $$t && unlink $$t
|
||||
|
||||
cpu: clean
|
||||
go test -run @ -bench . -cpuprofile cpu.out
|
||||
go tool pprof -lines *.test cpu.out
|
||||
|
||||
edit:
|
||||
@touch log
|
||||
@if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile *.go & fi
|
||||
|
||||
|
||||
editor:
|
||||
gofmt -l -s -w *.go
|
||||
GO111MODULE=off go build -v -o $(GOPATH)/bin/ccgo modernc.org/ccgo/v3
|
||||
|
||||
later:
|
||||
@grep -n $(grep) LATER * || true
|
||||
@grep -n $(grep) MAYBE * || true
|
||||
|
||||
mem: clean
|
||||
go test -run Mem -mem -memprofile mem.out -timeout 24h
|
||||
go tool pprof -lines -web -alloc_space *.test mem.out
|
||||
|
||||
nuke: clean
|
||||
go clean -i
|
||||
|
||||
todo:
|
||||
@grep -nr $(grep) ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* * | grep -v $(ngrep) || true
|
||||
@grep -nr $(grep) 'TODO\|panic' * | grep -v $(ngrep) || true
|
||||
@grep -nr $(grep) BUG * | grep -v $(ngrep) || true
|
||||
@grep -nr $(grep) [^[:alpha:]]println * | grep -v $(ngrep) || true
|
||||
@grep -nir $(grep) 'work.*progress' || true
|
1737
vendor/modernc.org/ccgo/v3/lib/ccgo.go
generated
vendored
Normal file
1737
vendor/modernc.org/ccgo/v3/lib/ccgo.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
39
vendor/modernc.org/ccgo/v3/lib/cover.go
generated
vendored
Normal file
39
vendor/modernc.org/ccgo/v3/lib/cover.go
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
// Copyright 2020 The CCGO Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package ccgo // import "modernc.org/ccgo/v3/lib"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
coverMap = map[uintptr]struct{}{}
|
||||
)
|
||||
|
||||
func pc2origin(pc uintptr) string {
|
||||
f := runtime.FuncForPC(pc)
|
||||
var fn, fns string
|
||||
var fl int
|
||||
if f != nil {
|
||||
fn, fl = f.FileLine(pc)
|
||||
fns = f.Name()
|
||||
if x := strings.LastIndex(fns, "."); x > 0 {
|
||||
fns = fns[x+1:]
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf("%s:%d:%s", fn, fl, fns)
|
||||
}
|
||||
|
||||
func coverReport() string {
|
||||
var a []string
|
||||
for pc := range coverMap {
|
||||
a = append(a, pc2origin(pc))
|
||||
}
|
||||
sort.Strings(a)
|
||||
return strings.Join(a, "\n")
|
||||
}
|
91
vendor/modernc.org/ccgo/v3/lib/design-notes.adoc
generated
vendored
Normal file
91
vendor/modernc.org/ccgo/v3/lib/design-notes.adoc
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
= Design Notes
|
||||
|
||||
== Problems:
|
||||
|
||||
Translating C to Go is harder than it looks.
|
||||
|
||||
Jan says: It's impossible in the general case to turn C char* into Go
|
||||
[]byte. It's possible to do it probably often for concrete C code
|
||||
cases - based also on author's C coding style. The first problem this
|
||||
runs into is that Go does not guarantee that the backing array will
|
||||
keep its address stable due to Go movable stacks. C expects the
|
||||
opposite, a pointer never magically modifies itself, so some code will
|
||||
fail.
|
||||
|
||||
INSERT CODE EXAMPLES ILLUSTRATING THE PROBLEM HERE
|
||||
|
||||
== How the parser works
|
||||
|
||||
There are no comment nodes in the C AST. Instead every cc.Token has a
|
||||
Sep field: https://godoc.org/modernc.org/cc/v3#Token
|
||||
|
||||
It captures, when configured to do so, all white space preceding the
|
||||
token, combined, including comments, if any. So we have all white
|
||||
space/comments information for every token in the AST. A final white
|
||||
space/comment, preceding EOF, is available as field TrailingSeperator
|
||||
in the AST: https://godoc.org/modernc.org/cc/v3#AST.
|
||||
|
||||
To get the lexically first white space/comment for any node, use
|
||||
tokenSeparator():
|
||||
https://gitlab.com/cznic/ccgo/-/blob/6551e2544a758fdc265c8fac71fb2587fb3e1042/v3/go.go#L1476
|
||||
|
||||
The same with a default value is comment():
|
||||
https://gitlab.com/cznic/ccgo/-/blob/6551e2544a758fdc265c8fac71fb2587fb3e1042/v3/go.go#L1467
|
||||
|
||||
== Looking forward
|
||||
|
||||
Eric says: In my visualization of how the translator would work, the
|
||||
output of a ccgo translation of a module at any given time is a file
|
||||
of pseudo-Go code in which some sections may be enclosed by a Unicode
|
||||
bracketing character (presently using the guillemot quotes U+ab and
|
||||
U+bb) meaning "this is not Go yet" that intentionally makes the Go
|
||||
compiler barf. This expresses a color on the AST nodes.
|
||||
|
||||
So, for example, if I'm translating hello.c with a ruleset that does not
|
||||
include print -> fmt.Printf, this:
|
||||
|
||||
---------------------------------------------------------
|
||||
#include <stdio>
|
||||
|
||||
/* an example comment */
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
printf("Hello, World")
|
||||
}
|
||||
---------------------------------------------------------
|
||||
|
||||
becomes this without any explicit rules at all:
|
||||
|
||||
---------------------------------------------------------
|
||||
«#include <stdio>»
|
||||
|
||||
/* an example comment */
|
||||
|
||||
func main
|
||||
{
|
||||
«printf(»"Hello, World"!\n"«)»
|
||||
}
|
||||
---------------------------------------------------------
|
||||
|
||||
Then, when the rule print -> fmt.Printf is added, it becomes
|
||||
|
||||
---------------------------------------------------------
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
/* an example comment */
|
||||
|
||||
func main
|
||||
{
|
||||
fmt.Printf("Hello, World"!\n")
|
||||
}
|
||||
---------------------------------------------------------
|
||||
|
||||
because with that rule the AST node corresponding to the printf
|
||||
call can be translated and colored "Go". This implies an import
|
||||
of fmt. We observe that there are no longer C-colored spans
|
||||
and drop the #includes.
|
||||
|
||||
// end
|
41
vendor/modernc.org/ccgo/v3/lib/dmesg.go
generated
vendored
Normal file
41
vendor/modernc.org/ccgo/v3/lib/dmesg.go
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
// Copyright 2021 The CCGO Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build ccgo.dmesg
|
||||
|
||||
package ccgo // import "modernc.org/ccgo/v3/lib"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const dmesgs = true
|
||||
|
||||
var (
|
||||
pid = fmt.Sprintf("[%v %v] ", os.Getpid(), filepath.Base(os.Args[0]))
|
||||
logf *os.File
|
||||
)
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
if logf, err = os.OpenFile("/tmp/ccgo.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY|os.O_SYNC, 0644); err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
func dmesg(s string, args ...interface{}) {
|
||||
if s == "" {
|
||||
s = strings.Repeat("%v ", len(args))
|
||||
}
|
||||
s = fmt.Sprintf(pid+s, args...)
|
||||
switch {
|
||||
case len(s) != 0 && s[len(s)-1] == '\n':
|
||||
fmt.Fprint(logf, s)
|
||||
default:
|
||||
fmt.Fprintln(logf, s)
|
||||
}
|
||||
}
|
110
vendor/modernc.org/ccgo/v3/lib/etc.go
generated
vendored
Normal file
110
vendor/modernc.org/ccgo/v3/lib/etc.go
generated
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
// Copyright 2020 The CCGO Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package ccgo // import "modernc.org/ccgo/v3/lib"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"math/big"
|
||||
|
||||
"modernc.org/cc/v3"
|
||||
)
|
||||
|
||||
var (
|
||||
reservedNames = map[string]bool{
|
||||
"bool": false, // ccgo can use
|
||||
"break": true, // keyword
|
||||
"case": true, // keyword
|
||||
"chan": true, // keyword
|
||||
"const": true, // keyword
|
||||
"continue": true, // keyword
|
||||
"default": true, // keyword
|
||||
"defer": true, // keyword
|
||||
"else": true, // keyword
|
||||
"fallthrough": true, // keyword
|
||||
"false": false, // ccgo can use
|
||||
"float32": false, // ccgo can use
|
||||
"float64": false, // ccgo can use
|
||||
"for": true, // keyword
|
||||
"func": true, // keyword
|
||||
"go": true, // keyword
|
||||
"goto": true, // keyword
|
||||
"if": true, // keyword
|
||||
"import": true, // keyword
|
||||
"init": false, // special name
|
||||
"int16": false, // ccgo can use
|
||||
"int32": false, // ccgo can use
|
||||
"int64": false, // ccgo can use
|
||||
"int8": false, // ccgo can use
|
||||
"interface": true, // keyword
|
||||
"map": true, // keyword
|
||||
"math": false, // package name
|
||||
"nil": false, // ccgo can use
|
||||
"package": true, // keyword
|
||||
"range": true, // keyword
|
||||
"return": true, // keyword
|
||||
"select": true, // keyword
|
||||
"struct": true, // keyword
|
||||
"switch": true, // keyword
|
||||
"true": false, // ccgo can use
|
||||
"type": true, // keyword
|
||||
"types": false, // package name
|
||||
"uint16": false, // ccgo can use
|
||||
"uint32": false, // ccgo can use
|
||||
"uint64": false, // ccgo can use
|
||||
"uint8": false, // ccgo can use
|
||||
"uintptr": false, // ccgo can use
|
||||
"unsafe": false, // package name
|
||||
"var": true, // keyword
|
||||
}
|
||||
|
||||
reservedIds []cc.StringID
|
||||
|
||||
maxInt32 = big.NewInt(math.MaxInt32)
|
||||
maxInt64 = big.NewInt(math.MaxInt64)
|
||||
maxUint32 = big.NewInt(math.MaxUint32)
|
||||
maxUint64 = big.NewInt(0).SetUint64(math.MaxUint64)
|
||||
minInt32 = big.NewInt(math.MinInt32)
|
||||
minInt64 = big.NewInt(math.MinInt64)
|
||||
)
|
||||
|
||||
func init() {
|
||||
for k := range reservedNames {
|
||||
reservedIds = append(reservedIds, cc.String(k))
|
||||
}
|
||||
}
|
||||
|
||||
type scope map[cc.StringID]int32
|
||||
|
||||
func newScope() scope {
|
||||
s := scope{}
|
||||
for _, k := range reservedIds {
|
||||
s[k] = 0
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
func (s scope) take(t cc.StringID) string {
|
||||
if t == 0 {
|
||||
panic(todo("internal error"))
|
||||
}
|
||||
|
||||
n, ok := s[t]
|
||||
if !ok {
|
||||
s[t] = 0
|
||||
return t.String()
|
||||
}
|
||||
|
||||
for {
|
||||
n++
|
||||
s[t] = n
|
||||
r := fmt.Sprintf("%s%d", t, n)
|
||||
id := cc.String(r)
|
||||
if _, ok := s[id]; !ok {
|
||||
s[id] = 0
|
||||
return r
|
||||
}
|
||||
}
|
||||
}
|
12856
vendor/modernc.org/ccgo/v3/lib/go.go
generated
vendored
Normal file
12856
vendor/modernc.org/ccgo/v3/lib/go.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
568
vendor/modernc.org/ccgo/v3/lib/init.go
generated
vendored
Normal file
568
vendor/modernc.org/ccgo/v3/lib/init.go
generated
vendored
Normal file
@ -0,0 +1,568 @@
|
||||
// Copyright 2020 The CCGO Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package ccgo // import "modernc.org/ccgo/v3/lib"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"modernc.org/cc/v3"
|
||||
)
|
||||
|
||||
func isAggregateTypeOrUnion(t cc.Type) bool {
|
||||
switch t.Kind() {
|
||||
case cc.Struct, cc.Union, cc.Array:
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// 6.7.8 Initialization
|
||||
func (p *project) initializer(f *function, n *cc.Initializer, t cc.Type, sc cc.StorageClass, tld *tld) {
|
||||
lm := map[*cc.Initializer][]cc.StringID{}
|
||||
tm := map[*cc.Initializer][]cc.StringID{}
|
||||
s := p.initializerFlatten(n, lm, tm)
|
||||
sort.Slice(s, func(i, j int) bool {
|
||||
a := s[i]
|
||||
b := s[j]
|
||||
if a.Offset < b.Offset {
|
||||
return true
|
||||
}
|
||||
|
||||
if a.Offset > b.Offset {
|
||||
return false
|
||||
}
|
||||
|
||||
if a.Field == nil || b.Field == nil || !a.Field.IsBitField() || !b.Field.IsBitField() {
|
||||
panic(todo("%v: internal error: %#x, %v: %#x", a.Position(), a.Offset, b.Position(), b.Offset))
|
||||
}
|
||||
|
||||
return a.Field.BitFieldOffset() < b.Field.BitFieldOffset()
|
||||
})
|
||||
p.initializerInner("", 0, f, s, t, sc, tld, nil, lm, tm)
|
||||
}
|
||||
|
||||
func (p *project) initializerInner(tag string, off uintptr, f *function, s []*cc.Initializer, t cc.Type, sc cc.StorageClass, tld *tld, patchField cc.Field, lm, tm map[*cc.Initializer][]cc.StringID) {
|
||||
// 11: The initializer for a scalar shall be a single expression, optionally
|
||||
// enclosed in braces. The initial value of the object is that of the
|
||||
// expression (after conversion); the same type constraints and conversions as
|
||||
// for simple assignment apply, taking the type of the scalar to be the
|
||||
// unqualified version of its declared type.
|
||||
if t.IsScalarType() && len(s) == 1 {
|
||||
p.w("%s%s", tidyComment("", s[0]), tag)
|
||||
switch {
|
||||
case tld != nil && t.Kind() == cc.Ptr && s[0].AssignmentExpression.Operand.Value() == nil:
|
||||
tld.patches = append(tld.patches, initPatch{t, s[0], patchField})
|
||||
p.w(" 0 ")
|
||||
default:
|
||||
p.assignmentExpression(f, s[0].AssignmentExpression, t, exprValue, fOutermost)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 12: The rest of this subclause deals with initializers for objects that have
|
||||
// aggregate or union type.
|
||||
|
||||
k := t.Kind()
|
||||
|
||||
// 13: The initializer for a structure or union object that has automatic
|
||||
// storage duration shall be either an initializer list as described below, or
|
||||
// a single expression that has compatible structure or union type. In the
|
||||
// latter case, the initial value of the object, including unnamed members, is
|
||||
// that of the expression.
|
||||
if sc == cc.Automatic && len(s) == 1 {
|
||||
switch k {
|
||||
case cc.Struct, cc.Union:
|
||||
if compatibleStructOrUnion(t, s[0].AssignmentExpression.Operand.Type()) {
|
||||
p.w("%s%s", tidyComment("", s[0]), tag)
|
||||
p.assignmentExpression(f, s[0].AssignmentExpression, t, exprValue, fOutermost)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if k == cc.Array && len(s) == 1 {
|
||||
et := t.Elem()
|
||||
if dmesgs { //TODO-
|
||||
dmesg("%v: %v", s[0].Position(), et)
|
||||
}
|
||||
switch {
|
||||
case isCharType(et):
|
||||
// 14: An array of character type may be initialized by a character string
|
||||
// literal, optionally enclosed in braces. Successive characters of the
|
||||
// character string literal (including the terminating null character if there
|
||||
// is room or if the array is of unknown size) initialize the elements of the
|
||||
// array.
|
||||
if x, ok := s[0].AssignmentExpression.Operand.Value().(cc.StringValue); ok {
|
||||
p.w("%s%s", tidyComment("", s[0]), tag)
|
||||
str := cc.StringID(x).String()
|
||||
slen := uintptr(len(str)) + 1
|
||||
alen := t.Len()
|
||||
switch {
|
||||
case alen < slen-1:
|
||||
p.w("*(*%s)(unsafe.Pointer(%s))", p.typ(s[0], t), p.stringLiteralString(str[:alen]))
|
||||
case alen < slen:
|
||||
p.w("*(*%s)(unsafe.Pointer(%s))", p.typ(s[0], t), p.stringLiteralString(str))
|
||||
default: // alen >= slen
|
||||
p.w("*(*%s)(unsafe.Pointer(%s))", p.typ(s[0], t), p.stringLiteralString(str+strings.Repeat("\x00", int(alen-slen))))
|
||||
}
|
||||
return
|
||||
}
|
||||
case p.isWCharType(et):
|
||||
// 15: An array with element type compatible with wchar_t may be initialized by
|
||||
// a wide string literal, optionally enclosed in braces. Successive wide
|
||||
// characters of the wide string literal (including the terminating null wide
|
||||
// character if there is room or if the array is of unknown size) initialize
|
||||
// the elements of the array.
|
||||
if x, ok := s[0].AssignmentExpression.Operand.Value().(cc.WideStringValue); ok {
|
||||
p.w("%s%s", tidyComment("", s[0]), tag)
|
||||
str := []rune(cc.StringID(x).String())
|
||||
slen := uintptr(len(str)) + 1
|
||||
alen := t.Len()
|
||||
switch {
|
||||
case alen < slen-1:
|
||||
panic(todo("", p.pos(s[0])))
|
||||
case alen < slen:
|
||||
p.w("*(*%s)(unsafe.Pointer(%s))", p.typ(s[0], t), p.wideStringLiteral(x, 0))
|
||||
default: // alen >= slen
|
||||
p.w("*(*%s)(unsafe.Pointer(%s))", p.typ(s[0], t), p.wideStringLiteral(x, int(alen-slen)))
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 16: Otherwise, the initializer for an object that has aggregate or union
|
||||
// type shall be a brace-enclosed list of initializers for the elements or
|
||||
// named members.
|
||||
switch k {
|
||||
case cc.Array:
|
||||
p.initializerArray(tag, off, f, s, t, sc, tld, lm, tm)
|
||||
case cc.Struct:
|
||||
p.initializerStruct(tag, off, f, s, t, sc, tld, lm, tm)
|
||||
case cc.Union:
|
||||
p.initializerUnion(tag, off, f, s, t, sc, tld, lm, tm)
|
||||
default:
|
||||
panic(todo("%v: internal error: %v %v", s[0].Position(), t, len(s)))
|
||||
}
|
||||
}
|
||||
|
||||
func (p *project) initializerArray(tag string, off uintptr, f *function, s []*cc.Initializer, t cc.Type, sc cc.StorageClass, tld *tld, lm, tm map[*cc.Initializer][]cc.StringID) {
|
||||
if len(s) == 0 {
|
||||
p.w("%s{}", p.typ(nil, t))
|
||||
return
|
||||
}
|
||||
|
||||
et := t.Elem()
|
||||
esz := et.Size()
|
||||
s0 := s[0]
|
||||
p.w("%s%s%s{", initComment(s0, lm), tag, p.typ(s0, t))
|
||||
var a [][]*cc.Initializer
|
||||
for len(s) != 0 {
|
||||
s2, parts, _ := p.initializerArrayElement(off, s, esz)
|
||||
s = s2
|
||||
a = append(a, parts)
|
||||
}
|
||||
mustIndex := uintptr(len(a)) != t.Len()
|
||||
var parts []*cc.Initializer
|
||||
for _, parts = range a {
|
||||
var comma *cc.Token
|
||||
comma = parts[len(parts)-1].TrailingComma()
|
||||
elemOff := parts[0].Offset - off
|
||||
tag = ""
|
||||
if mustIndex {
|
||||
tag = fmt.Sprintf("%d:", elemOff/esz)
|
||||
}
|
||||
p.initializerInner(tag, off+elemOff, f, parts, et, sc, tld, nil, lm, tm)
|
||||
p.preCommaSep(comma)
|
||||
p.w(",")
|
||||
}
|
||||
p.w("%s}", initComment(parts[len(parts)-1], tm))
|
||||
}
|
||||
|
||||
func initComment(n *cc.Initializer, m map[*cc.Initializer][]cc.StringID) string {
|
||||
a := m[n]
|
||||
if len(a) == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
m[n] = a[1:]
|
||||
return tidyCommentString(a[0].String())
|
||||
}
|
||||
|
||||
func (p *project) initializerArrayElement(off uintptr, s []*cc.Initializer, elemSize uintptr) (r []*cc.Initializer, parts []*cc.Initializer, isZero bool) {
|
||||
r = s
|
||||
isZero = true
|
||||
valueOff := s[0].Offset - off
|
||||
elemOff := valueOff - valueOff%elemSize
|
||||
nextOff := elemOff + elemSize
|
||||
for len(s) != 0 {
|
||||
if v := s[0]; v.Offset-off < nextOff {
|
||||
s = s[1:]
|
||||
parts = append(parts, v)
|
||||
if !v.AssignmentExpression.Operand.IsZero() {
|
||||
isZero = false
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
return r[len(parts):], parts, isZero
|
||||
}
|
||||
|
||||
func (p *project) initializerStruct(tag string, off uintptr, f *function, s []*cc.Initializer, t cc.Type, sc cc.StorageClass, tld *tld, lm, tm map[*cc.Initializer][]cc.StringID) {
|
||||
if len(s) == 0 {
|
||||
p.w("%s{}", p.typ(nil, t))
|
||||
return
|
||||
}
|
||||
|
||||
if t.HasFlexibleMember() {
|
||||
p.err(s[0], "flexible array members not supported")
|
||||
return
|
||||
}
|
||||
|
||||
p.w("%s%s%s{", initComment(s[0], lm), tag, p.typ(s[0], t))
|
||||
var parts []*cc.Initializer
|
||||
var isZero bool
|
||||
var fld cc.Field
|
||||
for len(s) != 0 {
|
||||
var comma *cc.Token
|
||||
s, fld, parts, isZero = p.initializerStructField(off, s, t)
|
||||
if isZero {
|
||||
continue
|
||||
}
|
||||
|
||||
if fld.Type().IsIncomplete() {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
comma = parts[len(parts)-1].TrailingComma()
|
||||
tag = fmt.Sprintf("%s:", p.fieldName2(parts[0], fld))
|
||||
ft := fld.Type()
|
||||
switch {
|
||||
case fld.IsBitField():
|
||||
first := true
|
||||
for _, v := range parts {
|
||||
if v.AssignmentExpression.Operand.IsZero() {
|
||||
continue
|
||||
}
|
||||
|
||||
if !first {
|
||||
p.w("|")
|
||||
}
|
||||
first = false
|
||||
bitFld := v.Field
|
||||
bft := p.bitFileType(bitFld.BitFieldBlockWidth())
|
||||
p.w("%s%s", tidyComment("", v.AssignmentExpression), tag)
|
||||
tag = ""
|
||||
p.assignmentExpression(f, v.AssignmentExpression, bft, exprValue, fOutermost)
|
||||
p.w("&%#x", uint64(1)<<uint64(bitFld.BitFieldWidth())-1)
|
||||
if o := bitFld.BitFieldOffset(); o != 0 {
|
||||
p.w("<<%d", o)
|
||||
}
|
||||
}
|
||||
default:
|
||||
p.initializerInner(tag, off+fld.Offset(), f, parts, ft, sc, tld, fld, lm, tm)
|
||||
}
|
||||
p.preCommaSep(comma)
|
||||
p.w(",")
|
||||
}
|
||||
p.w("%s}", initComment(parts[len(parts)-1], tm))
|
||||
}
|
||||
|
||||
func (p *project) preCommaSep(comma *cc.Token) {
|
||||
if comma == nil {
|
||||
return
|
||||
}
|
||||
|
||||
p.w("%s", strings.TrimSpace(comma.Sep.String()))
|
||||
}
|
||||
|
||||
func (p *project) initializerStructField(off uintptr, s []*cc.Initializer, t cc.Type) (r []*cc.Initializer, fld cc.Field, parts []*cc.Initializer, isZero bool) {
|
||||
r = s
|
||||
isZero = true
|
||||
valueOff := s[0].Offset
|
||||
nf := t.NumField()
|
||||
nextOff := off + t.Size()
|
||||
bits := false
|
||||
for i := []int{0}; i[0] < nf; i[0]++ {
|
||||
fld2 := t.FieldByIndex(i)
|
||||
if fld2.Name() == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
if fld == nil {
|
||||
fld = fld2
|
||||
}
|
||||
if fld2.Offset()+off > valueOff {
|
||||
nextOff = off + fld2.Offset()
|
||||
break
|
||||
}
|
||||
|
||||
if !fld2.IsBitField() {
|
||||
fld = fld2
|
||||
continue
|
||||
}
|
||||
|
||||
fld = fld2.BitFieldBlockFirst()
|
||||
}
|
||||
for len(s) != 0 {
|
||||
if v := s[0]; v.Offset < nextOff || v.Type().Size() == 0 {
|
||||
if v.Field != nil && v.Field.IsBitField() {
|
||||
bits = true
|
||||
}
|
||||
s = s[1:]
|
||||
parts = append(parts, v)
|
||||
if !v.AssignmentExpression.Operand.IsZero() {
|
||||
isZero = false
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
if bits && fld.Name() == 0 {
|
||||
for _, v := range parts {
|
||||
if v.Field != nil && v.Field.Name() != 0 {
|
||||
fld = v.Field
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return r[len(parts):], fld, parts, isZero
|
||||
}
|
||||
|
||||
func (p *project) initializerUnion(tag string, off uintptr, f *function, s []*cc.Initializer, t cc.Type, sc cc.StorageClass, tld *tld, lm, tm map[*cc.Initializer][]cc.StringID) {
|
||||
if len(s) == 0 {
|
||||
p.w("%s{}", p.typ(nil, t))
|
||||
return
|
||||
}
|
||||
|
||||
s0 := s[0]
|
||||
var parts []*cc.Initializer
|
||||
var isZero bool
|
||||
var fld cc.Field
|
||||
s, fld, parts, isZero = p.initializerUnionField(off, s, t)
|
||||
if len(s) != 0 {
|
||||
panic(todo("%v: internal error: %v", s0.Position(), t))
|
||||
}
|
||||
|
||||
if isZero {
|
||||
p.w("%s%s%s{", initComment(s0, lm), tag, p.typ(s0, t))
|
||||
p.w("%s}", initComment(parts[len(parts)-1], tm))
|
||||
return
|
||||
}
|
||||
|
||||
if fld0 := parts[0].FirstDesignatorField(); fld0 != nil && fld0.Index() != 0 {
|
||||
if fld0.IsBitField() || fld.IsBitField() {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
fld := parts[0].Field
|
||||
if fld.IsBitField() {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// tag: *(*T)(unsafe.Pointer(&struct{f: ft; pad _[n]byte}{f: expr}))
|
||||
p.w("%s *(*%s)(unsafe.Pointer(&struct{f %s", tag, p.typ(s0, t), p.typ(s0, fld.Type()))
|
||||
if pad := t.Size() - fld.Type().Size(); pad != 0 {
|
||||
p.w("; _ [%v]byte", pad)
|
||||
}
|
||||
p.w("}{")
|
||||
p.initializerInner("f:", off+fld.Offset(), f, parts, fld.Type(), sc, tld, fld, lm, tm)
|
||||
p.w("}))")
|
||||
return
|
||||
}
|
||||
|
||||
p.w("%s%s%s{", initComment(s0, lm), tag, p.typ(s0, t))
|
||||
ft := fld.Type()
|
||||
tag = fmt.Sprintf("%s:", p.fieldName2(parts[0], fld))
|
||||
switch {
|
||||
case fld.IsBitField():
|
||||
first := true
|
||||
for _, v := range parts {
|
||||
if v.AssignmentExpression.Operand.IsZero() {
|
||||
continue
|
||||
}
|
||||
|
||||
if !first {
|
||||
p.w("|")
|
||||
}
|
||||
first = false
|
||||
bitFld := v.Field
|
||||
bft := p.bitFileType(bitFld.BitFieldBlockWidth())
|
||||
p.w("%s%s", tidyComment("", v.AssignmentExpression), tag)
|
||||
tag = ""
|
||||
p.assignmentExpression(f, v.AssignmentExpression, bft, exprValue, fOutermost)
|
||||
p.w("&%#x", uint64(1)<<uint64(bitFld.BitFieldWidth())-1)
|
||||
if o := bitFld.BitFieldOffset(); o != 0 {
|
||||
p.w("<<%d", o)
|
||||
}
|
||||
}
|
||||
default:
|
||||
p.initializerInner(tag, off+fld.Offset(), f, parts, ft, sc, tld, fld, lm, tm)
|
||||
}
|
||||
comma := parts[len(parts)-1].TrailingComma()
|
||||
p.preCommaSep(comma)
|
||||
p.w(",")
|
||||
p.w("%s}", initComment(parts[len(parts)-1], tm))
|
||||
}
|
||||
|
||||
func (p *project) initializerUnionField(off uintptr, s []*cc.Initializer, t cc.Type) (r []*cc.Initializer, fld cc.Field, parts []*cc.Initializer, isZero bool) {
|
||||
r = s
|
||||
isZero = true
|
||||
fld = t.FieldByIndex([]int{0})
|
||||
nextOff := off + t.Size()
|
||||
for len(s) != 0 {
|
||||
if v := s[0]; v.Offset < nextOff {
|
||||
s = s[1:]
|
||||
parts = append(parts, v)
|
||||
if !v.AssignmentExpression.Operand.IsZero() {
|
||||
isZero = false
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
return r[len(parts):], fld, parts, isZero
|
||||
}
|
||||
|
||||
func compatibleStructOrUnion(t1, t2 cc.Type) bool {
|
||||
switch t1.Kind() {
|
||||
case cc.Struct:
|
||||
if t2.Kind() != cc.Struct {
|
||||
return false
|
||||
}
|
||||
case cc.Union:
|
||||
if t2.Kind() != cc.Union {
|
||||
return false
|
||||
}
|
||||
default:
|
||||
return false
|
||||
}
|
||||
|
||||
if tag := t1.Tag(); tag != 0 && t2.Tag() != tag {
|
||||
return false
|
||||
}
|
||||
|
||||
nf := t1.NumField()
|
||||
if t2.NumField() != nf {
|
||||
return false
|
||||
}
|
||||
|
||||
for i := []int{0}; i[0] < nf; i[0]++ {
|
||||
f1 := t1.FieldByIndex(i)
|
||||
f2 := t2.FieldByIndex(i)
|
||||
nm := f1.Name()
|
||||
if f2.Name() != nm {
|
||||
return false
|
||||
}
|
||||
|
||||
ft1 := f1.Type()
|
||||
ft2 := f2.Type()
|
||||
if ft1.Size() != ft2.Size() ||
|
||||
f1.IsBitField() != f2.IsBitField() ||
|
||||
f1.BitFieldOffset() != f2.BitFieldOffset() ||
|
||||
f1.BitFieldWidth() != f2.BitFieldWidth() {
|
||||
return false
|
||||
}
|
||||
|
||||
if !compatibleType(ft1, ft2) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func compatibleType(t1, t2 cc.Type) bool {
|
||||
if t1.Kind() != t2.Kind() {
|
||||
return false
|
||||
}
|
||||
|
||||
switch t1.Kind() {
|
||||
case cc.Array:
|
||||
if t1.Len() != t2.Len() || !compatibleType(t1.Elem(), t2.Elem()) {
|
||||
return false
|
||||
}
|
||||
case cc.Struct, cc.Union:
|
||||
if !compatibleStructOrUnion(t1, t2) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (p *project) bitFileType(bits int) cc.Type {
|
||||
switch bits {
|
||||
case 8:
|
||||
return p.task.cfg.ABI.Type(cc.UChar)
|
||||
case 16:
|
||||
return p.task.cfg.ABI.Type(cc.UShort)
|
||||
case 32:
|
||||
return p.task.cfg.ABI.Type(cc.UInt)
|
||||
case 64:
|
||||
return p.task.cfg.ABI.Type(cc.ULongLong)
|
||||
default:
|
||||
panic(todo("%v: internal error: %v", bits))
|
||||
}
|
||||
}
|
||||
|
||||
func (p *project) isWCharType(t cc.Type) bool {
|
||||
if t.IsAliasType() {
|
||||
if id := t.AliasDeclarator().Name(); id == idWcharT ||
|
||||
p.task.goos == "windows" && id == idWinWchar {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func isCharType(t cc.Type) bool {
|
||||
switch t.Kind() {
|
||||
case cc.Char, cc.SChar, cc.UChar:
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func (p *project) initializerFlatten(n *cc.Initializer, lm, tm map[*cc.Initializer][]cc.StringID) (s []*cc.Initializer) {
|
||||
switch n.Case {
|
||||
case cc.InitializerExpr: // AssignmentExpression
|
||||
return append(s, n)
|
||||
case cc.InitializerInitList: // '{' InitializerList ',' '}'
|
||||
first := true
|
||||
for list := n.InitializerList; list != nil; list = list.InitializerList {
|
||||
in := list.Initializer
|
||||
k := in
|
||||
if in.Case != cc.InitializerExpr {
|
||||
k = nil
|
||||
}
|
||||
if first {
|
||||
lm[k] = append(lm[k], append(lm[nil], n.Token.Sep)...)
|
||||
if k != nil {
|
||||
delete(lm, nil)
|
||||
}
|
||||
first = false
|
||||
}
|
||||
if list.InitializerList == nil {
|
||||
tm[k] = append([]cc.StringID{n.Token3.Sep}, append(tm[nil], tm[k]...)...)
|
||||
tm[k] = append(tm[k], append(tm[nil], n.Token3.Sep)...)
|
||||
if k != nil {
|
||||
delete(tm, nil)
|
||||
}
|
||||
}
|
||||
s = append(s, p.initializerFlatten(in, lm, tm)...)
|
||||
}
|
||||
return s
|
||||
default:
|
||||
panic(todo("%v: internal error: %v", n.Position(), n.Case))
|
||||
}
|
||||
}
|
9
vendor/modernc.org/ccgo/v3/lib/mem.go
generated
vendored
Normal file
9
vendor/modernc.org/ccgo/v3/lib/mem.go
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright 2020 The CCGO Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !linux
|
||||
|
||||
package ccgo // import "modernc.org/ccgo/v3/lib"
|
||||
|
||||
var totalRam uint64
|
20
vendor/modernc.org/ccgo/v3/lib/mem_linux.go
generated
vendored
Normal file
20
vendor/modernc.org/ccgo/v3/lib/mem_linux.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
// Copyright 2020 The CCGO Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package ccgo // import "modernc.org/ccgo/v3/lib"
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
var totalRam uint64
|
||||
|
||||
func init() {
|
||||
var si unix.Sysinfo_t
|
||||
if unix.Sysinfo(&si) != nil {
|
||||
return
|
||||
}
|
||||
|
||||
totalRam = uint64(si.Totalram)
|
||||
}
|
11
vendor/modernc.org/ccgo/v3/lib/nodmesg.go
generated
vendored
Normal file
11
vendor/modernc.org/ccgo/v3/lib/nodmesg.go
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright 2020 The Libc Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !ccgo.dmesg
|
||||
|
||||
package ccgo // import "modernc.org/ccgo/v3/lib"
|
||||
|
||||
const dmesgs = false
|
||||
|
||||
func dmesg(s string, args ...interface{}) {}
|
57
vendor/modernc.org/ccgo/v3/lib/stringer.go
generated
vendored
Normal file
57
vendor/modernc.org/ccgo/v3/lib/stringer.go
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
// Code generated by "stringer -output stringer.go -type=exprMode,opKind"; DO NOT EDIT.
|
||||
|
||||
package ccgo
|
||||
|
||||
import "strconv"
|
||||
|
||||
func _() {
|
||||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
var x [1]struct{}
|
||||
_ = x[exprAddrOf-1]
|
||||
_ = x[exprBool-2]
|
||||
_ = x[exprCondInit-3]
|
||||
_ = x[exprCondReturn-4]
|
||||
_ = x[exprDecay-5]
|
||||
_ = x[exprFunc-6]
|
||||
_ = x[exprLValue-7]
|
||||
_ = x[exprPSelect-8]
|
||||
_ = x[exprSelect-9]
|
||||
_ = x[exprValue-10]
|
||||
_ = x[exprVoid-11]
|
||||
}
|
||||
|
||||
const _exprMode_name = "exprAddrOfexprBoolexprCondInitexprCondReturnexprDecayexprFuncexprLValueexprPSelectexprSelectexprValueexprVoid"
|
||||
|
||||
var _exprMode_index = [...]uint8{0, 10, 18, 30, 44, 53, 61, 71, 82, 92, 101, 109}
|
||||
|
||||
func (i exprMode) String() string {
|
||||
i -= 1
|
||||
if i < 0 || i >= exprMode(len(_exprMode_index)-1) {
|
||||
return "exprMode(" + strconv.FormatInt(int64(i+1), 10) + ")"
|
||||
}
|
||||
return _exprMode_name[_exprMode_index[i]:_exprMode_index[i+1]]
|
||||
}
|
||||
func _() {
|
||||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
var x [1]struct{}
|
||||
_ = x[opNormal-0]
|
||||
_ = x[opArray-1]
|
||||
_ = x[opArrayParameter-2]
|
||||
_ = x[opFunction-3]
|
||||
_ = x[opUnion-4]
|
||||
_ = x[opBitfield-5]
|
||||
_ = x[opStruct-6]
|
||||
}
|
||||
|
||||
const _opKind_name = "opNormalopArrayopArrayParameteropFunctionopUnionopBitfieldopStruct"
|
||||
|
||||
var _opKind_index = [...]uint8{0, 8, 15, 31, 41, 48, 58, 66}
|
||||
|
||||
func (i opKind) String() string {
|
||||
if i < 0 || i >= opKind(len(_opKind_index)-1) {
|
||||
return "opKind(" + strconv.FormatInt(int64(i), 10) + ")"
|
||||
}
|
||||
return _opKind_name[_opKind_index[i]:_opKind_index[i+1]]
|
||||
}
|
4
vendor/modernc.org/ccgo/v3/lib/unconvert.sh
generated
vendored
Normal file
4
vendor/modernc.org/ccgo/v3/lib/unconvert.sh
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
until unconvert -fastmath . &> /dev/null
|
||||
do
|
||||
unconvert -fastmath -apply . &> /dev/null
|
||||
done
|
438
vendor/modernc.org/ccgo/v3/lib/util.go
generated
vendored
Normal file
438
vendor/modernc.org/ccgo/v3/lib/util.go
generated
vendored
Normal file
@ -0,0 +1,438 @@
|
||||
// Copyright 2020 The CCGO Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// generator.go helpers
|
||||
|
||||
package ccgo // import "modernc.org/ccgo/v3/lib"
|
||||
|
||||
import (
|
||||
"archive/tar"
|
||||
"bufio"
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// CopyFile copies src to dest, preserving permissions and times where/when
|
||||
// possible. If canOverwrite is not nil, it is consulted whether a destination
|
||||
// file can be overwritten. If canOverwrite is nil then destination is
|
||||
// overwritten if permissions allow that, otherwise the function fails.
|
||||
//
|
||||
// Src and dst must be in the slash form.
|
||||
func CopyFile(dst, src string, canOverwrite func(fn string, fi os.FileInfo) bool) (n int64, rerr error) {
|
||||
dst = filepath.FromSlash(dst)
|
||||
dstDir := filepath.Dir(dst)
|
||||
di, err := os.Stat(dstDir)
|
||||
switch {
|
||||
case err != nil:
|
||||
if !os.IsNotExist(err) {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(dstDir, 0770); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
case err == nil:
|
||||
if !di.IsDir() {
|
||||
return 0, fmt.Errorf("cannot create directory, file exists: %s", dst)
|
||||
}
|
||||
}
|
||||
|
||||
src = filepath.FromSlash(src)
|
||||
si, err := os.Stat(src)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
if si.IsDir() {
|
||||
return 0, fmt.Errorf("cannot copy a directory: %s", src)
|
||||
}
|
||||
|
||||
di, err = os.Stat(dst)
|
||||
switch {
|
||||
case err != nil && !os.IsNotExist(err):
|
||||
return 0, err
|
||||
case err == nil:
|
||||
if di.IsDir() {
|
||||
return 0, fmt.Errorf("cannot overwite a directory: %s", dst)
|
||||
}
|
||||
|
||||
if canOverwrite != nil && !canOverwrite(dst, di) {
|
||||
return 0, fmt.Errorf("cannot overwite: %s", dst)
|
||||
}
|
||||
}
|
||||
|
||||
s, err := os.Open(src)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
defer s.Close()
|
||||
r := bufio.NewReader(s)
|
||||
|
||||
d, err := os.Create(dst)
|
||||
|
||||
defer func() {
|
||||
if err := d.Close(); err != nil && rerr == nil {
|
||||
rerr = err
|
||||
return
|
||||
}
|
||||
|
||||
if err := os.Chmod(dst, si.Mode()); err != nil && rerr == nil {
|
||||
rerr = err
|
||||
return
|
||||
}
|
||||
|
||||
if err := os.Chtimes(dst, si.ModTime(), si.ModTime()); err != nil && rerr == nil {
|
||||
rerr = err
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
||||
w := bufio.NewWriter(d)
|
||||
|
||||
defer func() {
|
||||
if err := w.Flush(); err != nil && rerr == nil {
|
||||
rerr = err
|
||||
}
|
||||
}()
|
||||
|
||||
return io.Copy(w, r)
|
||||
}
|
||||
|
||||
// MustCopyFile is like CopyFile but it executes Fatal(stackTrace, err) if it fails.
|
||||
func MustCopyFile(stackTrace bool, dst, src string, canOverwrite func(fn string, fi os.FileInfo) bool) int64 {
|
||||
n, err := CopyFile(dst, src, canOverwrite)
|
||||
if err != nil {
|
||||
Fatal(stackTrace, err)
|
||||
}
|
||||
|
||||
return n
|
||||
}
|
||||
|
||||
// CopyDir recursively copies src to dest, preserving permissions and times
|
||||
// where/when possible. If canOverwrite is not nil, it is consulted whether a
|
||||
// destination file can be overwritten. If canOverwrite is nil then destination
|
||||
// is overwritten if permissions allow that, otherwise the function fails.
|
||||
//
|
||||
// Src and dst must be in the slash form.
|
||||
func CopyDir(dst, src string, canOverwrite func(fn string, fi os.FileInfo) bool) (files int, bytes int64, rerr error) {
|
||||
dst = filepath.FromSlash(dst)
|
||||
src = filepath.FromSlash(src)
|
||||
si, err := os.Stat(src)
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
|
||||
if !si.IsDir() {
|
||||
return 0, 0, fmt.Errorf("cannot copy a file: %s", src)
|
||||
}
|
||||
|
||||
return files, bytes, filepath.Walk(src, func(path string, info os.FileInfo, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rel, err := filepath.Rel(src, path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if info.IsDir() {
|
||||
return os.MkdirAll(filepath.Join(dst, rel), 0770)
|
||||
}
|
||||
|
||||
n, err := CopyFile(filepath.Join(dst, rel), path, canOverwrite)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
files++
|
||||
bytes += n
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
// MustCopyDir is like CopyDir, but it executes Fatal(stackTrace, errú if it fails.
|
||||
func MustCopyDir(stackTrace bool, dst, src string, canOverwrite func(fn string, fi os.FileInfo) bool) (files int, bytes int64) {
|
||||
file, bytes, err := CopyDir(dst, src, canOverwrite)
|
||||
if err != nil {
|
||||
Fatal(stackTrace, err)
|
||||
}
|
||||
|
||||
return file, bytes
|
||||
}
|
||||
|
||||
// UntarFile extracts a named tar.gz archive into dst. If canOverwrite is not
|
||||
// nil, it is consulted whether a destination file can be overwritten. If
|
||||
// canOverwrite is nil then destination is overwritten if permissions allow
|
||||
// that, otherwise the function fails.
|
||||
//
|
||||
// Src and dst must be in the slash form.
|
||||
func UntarFile(dst, src string, canOverwrite func(fn string, fi os.FileInfo) bool) error {
|
||||
f, err := os.Open(filepath.FromSlash(src))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer f.Close()
|
||||
|
||||
return Untar(dst, bufio.NewReader(f), canOverwrite)
|
||||
}
|
||||
|
||||
// MustUntarFile is like UntarFile but it executes Fatal(stackTrace, err) if it fails.
|
||||
func MustUntarFile(stackTrace bool, dst, src string, canOverwrite func(fn string, fi os.FileInfo) bool) {
|
||||
if err := UntarFile(dst, src, canOverwrite); err != nil {
|
||||
Fatal(stackTrace, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Untar extracts a tar.gz archive into dst. If canOverwrite is not nil, it is
|
||||
// consulted whether a destination file can be overwritten. If canOverwrite is
|
||||
// nil then destination is overwritten if permissions allow that, otherwise the
|
||||
// function fails.
|
||||
//
|
||||
// Dst must be in the slash form.
|
||||
func Untar(dst string, r io.Reader, canOverwrite func(fn string, fi os.FileInfo) bool) error {
|
||||
dst = filepath.FromSlash(dst)
|
||||
gr, err := gzip.NewReader(r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tr := tar.NewReader(gr)
|
||||
for {
|
||||
hdr, err := tr.Next()
|
||||
if err != nil {
|
||||
if err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
switch hdr.Typeflag {
|
||||
case tar.TypeDir:
|
||||
dir := filepath.Join(dst, hdr.Name)
|
||||
if err = os.MkdirAll(dir, 0770); err != nil {
|
||||
return err
|
||||
}
|
||||
case tar.TypeSymlink, tar.TypeXGlobalHeader:
|
||||
// skip
|
||||
case tar.TypeReg, tar.TypeRegA:
|
||||
dir := filepath.Dir(filepath.Join(dst, hdr.Name))
|
||||
if _, err := os.Stat(dir); err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = os.MkdirAll(dir, 0770); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
fn := filepath.Join(dst, hdr.Name)
|
||||
f, err := os.OpenFile(fn, os.O_CREATE|os.O_WRONLY, os.FileMode(hdr.Mode))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
w := bufio.NewWriter(f)
|
||||
if _, err = io.Copy(w, tr); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := w.Flush(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := f.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := os.Chtimes(fn, hdr.AccessTime, hdr.ModTime); err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("unexpected tar header typeflag %#02x", hdr.Typeflag)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MustUntar is like Untar but it executes Fatal(stackTrace, err) if it fails.
|
||||
func MustUntar(stackTrace bool, dst string, r io.Reader, canOverwrite func(fn string, fi os.FileInfo) bool) {
|
||||
if err := Untar(dst, r, canOverwrite); err != nil {
|
||||
Fatal(stackTrace, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Fatalf prints a formatted message to os.Stderr and performs os.Exit(1). A
|
||||
// stack trace is added if stackTrace is true.
|
||||
func Fatalf(stackTrace bool, s string, args ...interface{}) {
|
||||
if stackTrace {
|
||||
fmt.Fprintf(os.Stderr, "%s\n", debug.Stack())
|
||||
}
|
||||
fmt.Fprintln(os.Stderr, strings.TrimSpace(fmt.Sprintf(s, args...)))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Fatal prints its argumenst to os.Stderr and performs os.Exit(1). A
|
||||
// stack trace is added if stackTrace is true.
|
||||
func Fatal(stackTrace bool, args ...interface{}) {
|
||||
if stackTrace {
|
||||
fmt.Fprintf(os.Stderr, "%s\n", debug.Stack())
|
||||
}
|
||||
fmt.Fprintln(os.Stderr, strings.TrimSpace(fmt.Sprint(args...)))
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Mkdirs will create all paths. Paths must be in slash form.
|
||||
func Mkdirs(paths ...string) error {
|
||||
for _, path := range paths {
|
||||
path = filepath.FromSlash(path)
|
||||
if err := os.MkdirAll(path, 0770); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MustMkdirs is like Mkdir but if executes Fatal(stackTrace, err) if it fails.
|
||||
func MustMkdirs(stackTrace bool, paths ...string) {
|
||||
if err := Mkdirs(paths...); err != nil {
|
||||
Fatal(stackTrace, err)
|
||||
}
|
||||
}
|
||||
|
||||
// InDir executes f in dir. Dir must be in slash form.
|
||||
func InDir(dir string, f func() error) (err error) {
|
||||
var cwd string
|
||||
if cwd, err = os.Getwd(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if err2 := os.Chdir(cwd); err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
}()
|
||||
|
||||
if err = os.Chdir(filepath.FromSlash(dir)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return f()
|
||||
}
|
||||
|
||||
// MustInDir is like InDir but it executes Fatal(stackTrace, err) if it fails.
|
||||
func MustInDir(stackTrace bool, dir string, f func() error) {
|
||||
if err := InDir(dir, f); err != nil {
|
||||
Fatal(stackTrace, err)
|
||||
}
|
||||
}
|
||||
|
||||
type echoWriter struct {
|
||||
w bytes.Buffer
|
||||
}
|
||||
|
||||
func (w *echoWriter) Write(b []byte) (int, error) {
|
||||
os.Stdout.Write(b)
|
||||
return w.w.Write(b)
|
||||
}
|
||||
|
||||
// Shell echoes and executes cmd with args and returns the combined output if the command.
|
||||
func Shell(cmd string, args ...string) ([]byte, error) {
|
||||
cmd, err := exec.LookPath(cmd)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
wd, err := AbsCwd()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fmt.Printf("execute %s %q in %s\n", cmd, args, wd)
|
||||
var b echoWriter
|
||||
c := exec.Command(cmd, args...)
|
||||
c.Stdout = &b
|
||||
c.Stderr = &b
|
||||
err = c.Run()
|
||||
return b.w.Bytes(), err
|
||||
}
|
||||
|
||||
// MustShell is like Shell but it executes Fatal(stackTrace, err) if it fails.
|
||||
func MustShell(stackTrace bool, cmd string, args ...string) []byte {
|
||||
b, err := Shell(cmd, args...)
|
||||
if err != nil {
|
||||
Fatalf(stackTrace, "%s\n%s", b, err)
|
||||
}
|
||||
|
||||
return b
|
||||
}
|
||||
|
||||
// Compile executes Shell with cmd set to "ccgo".
|
||||
func Compile(args ...string) ([]byte, error) { return Shell("ccgo", args...) }
|
||||
|
||||
// MustCompile is like Compile but if executes Fatal(stackTrace, err) if it fails.
|
||||
func MustCompile(stackTrace bool, args ...string) []byte {
|
||||
return MustShell(stackTrace, "ccgo", args...)
|
||||
}
|
||||
|
||||
// AbsCwd returns the absolute working directory.
|
||||
func AbsCwd() (string, error) {
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if wd, err = filepath.Abs(wd); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return wd, nil
|
||||
}
|
||||
|
||||
// MustAbsCwd is like AbsCwd but executes Fatal(stackTrace, err) if it fails.
|
||||
func MustAbsCwd(stackTrace bool) string {
|
||||
s, err := AbsCwd()
|
||||
if err != nil {
|
||||
Fatal(stackTrace, err)
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
// Env returns the value of environmental variable key of dflt otherwise.
|
||||
func Env(key, dflt string) string {
|
||||
if s := os.Getenv(key); s != "" {
|
||||
return s
|
||||
}
|
||||
|
||||
return dflt
|
||||
}
|
||||
|
||||
// MustTempDir is like ioutil.TempDir but executes Fatal(stackTrace, err) if it
|
||||
// fails. The returned path is absolute.
|
||||
func MustTempDir(stackTrace bool, dir, name string) string {
|
||||
s, err := ioutil.TempDir(dir, name)
|
||||
if err != nil {
|
||||
Fatal(stackTrace, err)
|
||||
}
|
||||
|
||||
if s, err = filepath.Abs(s); err != nil {
|
||||
Fatal(stackTrace, err)
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
15
vendor/modernc.org/libc/AUTHORS
generated
vendored
Normal file
15
vendor/modernc.org/libc/AUTHORS
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
# This file lists authors for copyright purposes. This file is distinct from
|
||||
# the CONTRIBUTORS files. See the latter for an explanation.
|
||||
#
|
||||
# Names should be added to this file as:
|
||||
# Name or Organization <email address>
|
||||
#
|
||||
# The email address is not required for organizations.
|
||||
#
|
||||
# Please keep the list sorted.
|
||||
|
||||
Dan Kortschak <dan@kortschak.io>
|
||||
Dan Peterson <danp@danp.net>
|
||||
Jan Mercl <0xjnml@gmail.com>
|
||||
Steffen Butzer <steffen(dot)butzer@outlook.com>
|
||||
Jason DeBettencourt <jasond17@gmail.com>
|
14
vendor/modernc.org/libc/CONTRIBUTORS
generated
vendored
Normal file
14
vendor/modernc.org/libc/CONTRIBUTORS
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
# This file lists people who contributed code to this repository. The AUTHORS
|
||||
# file lists the copyright holders; this file lists people.
|
||||
#
|
||||
# Names should be added to this file like so:
|
||||
# Name <email address>
|
||||
#
|
||||
# Please keep the list sorted.
|
||||
|
||||
Dan Kortschak <dan@kortschak.io>
|
||||
Dan Peterson <danp@danp.net>
|
||||
Jaap Aarts <jaap.aarts1@gmail.com>
|
||||
Jan Mercl <0xjnml@gmail.com>
|
||||
Steffen Butzer <steffen(dot)butzer@outlook.com>
|
||||
Jason DeBettencourt <jasond17@gmail.com>
|
10
vendor/modernc.org/libc/HACKING
generated
vendored
Normal file
10
vendor/modernc.org/libc/HACKING
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
Version 3 notes
|
||||
|
||||
Install:
|
||||
|
||||
$ go get modernc.org/crt/v3
|
||||
|
||||
Version 3 is the transition from "all scalars are signed integers" (the QBE
|
||||
model) to the more traditional "integers have signedness and pointers are not
|
||||
exactly the same as integers" that is used by modernc.org/ccgo/v3. However, all
|
||||
C pointers are of the same Go type: uintptr.
|
27
vendor/modernc.org/libc/LICENSE
generated
vendored
Normal file
27
vendor/modernc.org/libc/LICENSE
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Copyright (c) 2017 The CRT Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the names of the authors nor the names of the
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
vendor/modernc.org/libc/LICENSE-GO
generated
vendored
Normal file
27
vendor/modernc.org/libc/LICENSE-GO
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
Copyright (c) 2009 The Go Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
143
vendor/modernc.org/libc/Makefile
generated
vendored
Normal file
143
vendor/modernc.org/libc/Makefile
generated
vendored
Normal file
@ -0,0 +1,143 @@
|
||||
# Copyright 2019 The Libc Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file.
|
||||
|
||||
.PHONY: all bench clean cover cpu editor internalError later mem nuke todo edit devbench \
|
||||
darwin_amd64 \
|
||||
darwin_arm64 \
|
||||
linux_386 \
|
||||
linux_amd64 \
|
||||
linux_arm \
|
||||
linux_arm64 \
|
||||
|
||||
|
||||
grep=--include=*.go --include=*.l --include=*.y --include=*.yy --include=*.qbe --include=*.ssa
|
||||
ngrep='internalError\|TODOOK'
|
||||
log=log-$(shell go env GOOS)-$(shell go env GOARCH)
|
||||
|
||||
all:
|
||||
date
|
||||
go version 2>&1 | tee $(log)
|
||||
go generate
|
||||
gofmt -l -s -w *.go
|
||||
go install -v ./...
|
||||
go test -i
|
||||
go test 2>&1 -timeout 1h | tee -a $(log)
|
||||
GOOS=darwin GOARCH=amd64 go build
|
||||
GOOS=darwin GOARCH=arm64 go build
|
||||
GOOS=linux GOARCH=386 go build
|
||||
GOOS=linux GOARCH=amd64 go build
|
||||
GOOS=linux GOARCH=arm go build
|
||||
GOOS=linux GOARCH=arm64 go build
|
||||
GOOS=linux GOARCH=s390x go build
|
||||
GOOS=windows GOARCH=386 go build
|
||||
GOOS=windows GOARCH=amd64 go build
|
||||
go vet -unsafeptr=false 2>&1 | grep -v $(ngrep) || true
|
||||
golint 2>&1 | grep -v $(ngrep) || true
|
||||
make todo
|
||||
misspell *.go
|
||||
staticcheck || true
|
||||
maligned || true
|
||||
grep -n 'FAIL\|PASS' $(log)
|
||||
go version
|
||||
date 2>&1 | tee -a $(log)
|
||||
|
||||
darwin_amd64:
|
||||
TARGET_GOOS=darwin TARGET_GOARCH=amd64 go generate
|
||||
GOOS=darwin GOARCH=amd64 go build -v ./...
|
||||
|
||||
darwin_arm64:
|
||||
TARGET_GOOS=darwin TARGET_GOARCH=arm64 go generate
|
||||
GOOS=darwin GOARCH=arm64 go build -v ./...
|
||||
|
||||
linux_amd64:
|
||||
TARGET_GOOS=linux TARGET_GOARCH=amd64 go generate
|
||||
GOOS=linux GOARCH=amd64 go build -v ./...
|
||||
|
||||
linux_386:
|
||||
CCGO_CPP=i686-linux-gnu-cpp TARGET_GOOS=linux TARGET_GOARCH=386 go generate
|
||||
GOOS=linux GOARCH=386 go build -v ./...
|
||||
|
||||
linux_arm:
|
||||
CCGO_CPP=arm-linux-gnueabi-cpp-8 TARGET_GOOS=linux TARGET_GOARCH=arm go generate
|
||||
GOOS=linux GOARCH=arm go build -v ./...
|
||||
|
||||
linux_arm64:
|
||||
CCGO_CPP=aarch64-linux-gnu-cpp-8 TARGET_GOOS=linux TARGET_GOARCH=arm64 go generate
|
||||
GOOS=linux GOARCH=arm64 go build -v ./...
|
||||
|
||||
linux_s390x:
|
||||
CCGO_CPP=s390x-linux-gnu-cpp TARGET_GOOS=linux TARGET_GOARCH=s390x go generate
|
||||
GOOS=linux GOARCH=s390x go build -v ./...
|
||||
|
||||
windows_amd64:
|
||||
CCGO_CPP=x86_64-w64-mingw32-cpp TARGET_GOOS=windows TARGET_GOARCH=amd64 go generate
|
||||
GOOS=windows GOARCH=amd64 go build -v ./...
|
||||
|
||||
windows_386:
|
||||
CCGO_CPP=i686-w64-mingw32-cpp TARGET_GOOS=windows TARGET_GOARCH=386 go generate
|
||||
GOOS=windows GOARCH=386 go build -v ./...
|
||||
|
||||
all_targets: linux_amd64 linux_386 linux_arm linux_arm64 windows_amd64 windows_386
|
||||
echo done
|
||||
|
||||
build_all_targets:
|
||||
GOOS=darwin GOARCH=amd64 go build -v ./...
|
||||
GOOS=darwin GOARCH=arm64 go build -v ./...
|
||||
GOOS=linux GOARCH=386 go build -v ./...
|
||||
GOOS=linux GOARCH=amd64 go build -v ./...
|
||||
GOOS=linux GOARCH=arm go build -v ./...
|
||||
GOOS=linux GOARCH=arm64 go build -v ./...
|
||||
GOOS=linux GOARCH=s390x go build -v ./...
|
||||
GOOS=windows GOARCH=386 go build -v ./...
|
||||
GOOS=windows GOARCH=amd64 go build -v ./...
|
||||
echo done
|
||||
|
||||
devbench:
|
||||
date 2>&1 | tee log-devbench
|
||||
go test -timeout 24h -dev -run @ -bench . 2>&1 | tee -a log-devbench
|
||||
grep -n 'FAIL\|SKIP' log-devbench || true
|
||||
|
||||
bench:
|
||||
date 2>&1 | tee log-bench
|
||||
go test -timeout 24h -v -run '^[^E]' -bench . 2>&1 | tee -a log-bench
|
||||
grep -n 'FAIL\|SKIP' log-bench || true
|
||||
|
||||
clean:
|
||||
go clean
|
||||
rm -f *~ *.test *.out
|
||||
|
||||
cover:
|
||||
t=$(shell mktemp) ; go test -coverprofile $$t && go tool cover -html $$t && unlink $$t
|
||||
|
||||
cpu: clean
|
||||
go test -run @ -bench . -cpuprofile cpu.out
|
||||
go tool pprof -lines *.test cpu.out
|
||||
|
||||
edit:
|
||||
@touch log
|
||||
@if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile *.go & fi
|
||||
|
||||
editor:
|
||||
GO111MODULE=off go generate 2>&1 | tee log
|
||||
gofmt -l -s -w *.go
|
||||
GO111MODULE=off go test -short 2>&1 | tee -a log
|
||||
GO111MODULE=off go install -v ./...
|
||||
|
||||
later:
|
||||
@grep -n $(grep) LATER * || true
|
||||
@grep -n $(grep) MAYBE * || true
|
||||
|
||||
mem: clean
|
||||
go test -v -run ParserCS -memprofile mem.out -timeout 24h
|
||||
go tool pprof -lines -web -alloc_space *.test mem.out
|
||||
|
||||
nuke: clean
|
||||
go clean -i
|
||||
|
||||
todo:
|
||||
@grep -nr $(grep) ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* * | grep -v $(ngrep) || true
|
||||
@grep -nr $(grep) 'TODO\|panic' * | grep -v $(ngrep) || true
|
||||
@grep -nr $(grep) BUG * | grep -v $(ngrep) || true
|
||||
@grep -nr $(grep) [^[:alpha:]]println * | grep -v $(ngrep) || true
|
||||
@grep -nir $(grep) 'work.*progress' || true
|
20
vendor/modernc.org/libc/README.md
generated
vendored
Normal file
20
vendor/modernc.org/libc/README.md
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
# libc
|
||||
|
||||
Package libc provides C-runtime services. Work in progress.
|
||||
|
||||
This package is a continuation of the Crt package in modernc.org/crt/v3.
|
||||
|
||||
Installation
|
||||
|
||||
$ go get [-u] modernc.org/libc
|
||||
|
||||
Documentation: [godoc.org/modernc.org/libc](http://godoc.org/modernc.org/libc)
|
||||
|
||||
Building with `make` requires the following Go packages
|
||||
|
||||
* github.com/golang/lint/golint
|
||||
* github.com/mdempsky/maligned
|
||||
* github.com/mdempsky/unconvert
|
||||
* honnef.co/go/tools/cmd/unused
|
||||
* honnef.co/go/tools/cmd/gosimple
|
||||
* github.com/client9/misspell/cmd/misspell
|
428
vendor/modernc.org/libc/capi_darwin_amd64.go
generated
vendored
Normal file
428
vendor/modernc.org/libc/capi_darwin_amd64.go
generated
vendored
Normal file
@ -0,0 +1,428 @@
|
||||
// Code generated by 'go generate' - DO NOT EDIT.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_IO_putc": {},
|
||||
"_NSGetEnviron": {},
|
||||
"___errno_location": {},
|
||||
"__assert_fail": {},
|
||||
"__assert_rtn": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_b_loc": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__darwin_fd_clr": {},
|
||||
"__darwin_fd_isset": {},
|
||||
"__darwin_fd_set": {},
|
||||
"__env_rm_add": {},
|
||||
"__errno_location": {},
|
||||
"__error": {},
|
||||
"__floatscan": {},
|
||||
"__fpclassify": {},
|
||||
"__fpclassifyf": {},
|
||||
"__fpclassifyl": {},
|
||||
"__h_errno_location": {},
|
||||
"__inet_aton": {},
|
||||
"__inline_isnand": {},
|
||||
"__inline_isnanf": {},
|
||||
"__inline_isnanl": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__putenv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__stderrp": {},
|
||||
"__stdinp": {},
|
||||
"__stdoutp": {},
|
||||
"__strchrnul": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"_exit": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"bind": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfgetospeed": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chflags": {},
|
||||
"chmod": {},
|
||||
"chown": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copyfile": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"copysignl": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"environ": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fchown": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"flock": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fmodl": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"freeaddrinfo": {},
|
||||
"frexp": {},
|
||||
"fsctl": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fstatfs": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"fts_close": {},
|
||||
"fts_open": {},
|
||||
"fts_read": {},
|
||||
"futimes": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getattrlist": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getenv": {},
|
||||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrnam": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
"gethostbyname2": {},
|
||||
"gethostbyname2_r": {},
|
||||
"gethostname": {},
|
||||
"gethostuuid": {},
|
||||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
"getpwuid_r": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"getuid": {},
|
||||
"gmtime_r": {},
|
||||
"h_errno": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isspace": {},
|
||||
"isupper": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"lrand48": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"mach_absolute_time": {},
|
||||
"mach_timebase_info": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkstemp": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"modf": {},
|
||||
"munmap": {},
|
||||
"nanf": {},
|
||||
"nl_langinfo": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"poll": {},
|
||||
"popen": {},
|
||||
"posix_fadvise": {},
|
||||
"pow": {},
|
||||
"pread": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"putenv": {},
|
||||
"puts": {},
|
||||
"pwrite": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"rand_r": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"recvfrom": {},
|
||||
"recvmsg": {},
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"scalbn": {},
|
||||
"scalbnl": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"sendmsg": {},
|
||||
"sendto": {},
|
||||
"setattrlist": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setlocale": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
"shmdt": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"signal": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"srand48": {},
|
||||
"srandomdev": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"statfs": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strlcat": {},
|
||||
"strlcpy": {},
|
||||
"strlen": {},
|
||||
"strncat": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strnlen": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strspn": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtof": {},
|
||||
"strtoimax": {},
|
||||
"strtok": {},
|
||||
"strtol": {},
|
||||
"strtold": {},
|
||||
"strtoll": {},
|
||||
"strtoul": {},
|
||||
"strtoull": {},
|
||||
"strtoumax": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"truncate": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"waitpid": {},
|
||||
"wcschr": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"zero_struct_address": {},
|
||||
}
|
428
vendor/modernc.org/libc/capi_darwin_arm64.go
generated
vendored
Normal file
428
vendor/modernc.org/libc/capi_darwin_arm64.go
generated
vendored
Normal file
@ -0,0 +1,428 @@
|
||||
// Code generated by 'go generate' - DO NOT EDIT.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_IO_putc": {},
|
||||
"_NSGetEnviron": {},
|
||||
"___errno_location": {},
|
||||
"__assert_fail": {},
|
||||
"__assert_rtn": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_b_loc": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__darwin_fd_clr": {},
|
||||
"__darwin_fd_isset": {},
|
||||
"__darwin_fd_set": {},
|
||||
"__env_rm_add": {},
|
||||
"__errno_location": {},
|
||||
"__error": {},
|
||||
"__floatscan": {},
|
||||
"__fpclassify": {},
|
||||
"__fpclassifyf": {},
|
||||
"__fpclassifyl": {},
|
||||
"__h_errno_location": {},
|
||||
"__inet_aton": {},
|
||||
"__inline_isnand": {},
|
||||
"__inline_isnanf": {},
|
||||
"__inline_isnanl": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__putenv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__stderrp": {},
|
||||
"__stdinp": {},
|
||||
"__stdoutp": {},
|
||||
"__strchrnul": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"_exit": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"bind": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfgetospeed": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chflags": {},
|
||||
"chmod": {},
|
||||
"chown": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copyfile": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"copysignl": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"environ": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fchown": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"flock": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fmodl": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"freeaddrinfo": {},
|
||||
"frexp": {},
|
||||
"fsctl": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fstatfs": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"fts_close": {},
|
||||
"fts_open": {},
|
||||
"fts_read": {},
|
||||
"futimes": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getattrlist": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getenv": {},
|
||||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrnam": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
"gethostbyname2": {},
|
||||
"gethostbyname2_r": {},
|
||||
"gethostname": {},
|
||||
"gethostuuid": {},
|
||||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
"getpwuid_r": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"getuid": {},
|
||||
"gmtime_r": {},
|
||||
"h_errno": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isspace": {},
|
||||
"isupper": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"lrand48": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"mach_absolute_time": {},
|
||||
"mach_timebase_info": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkstemp": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"modf": {},
|
||||
"munmap": {},
|
||||
"nanf": {},
|
||||
"nl_langinfo": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"poll": {},
|
||||
"popen": {},
|
||||
"posix_fadvise": {},
|
||||
"pow": {},
|
||||
"pread": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"putenv": {},
|
||||
"puts": {},
|
||||
"pwrite": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"rand_r": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"recvfrom": {},
|
||||
"recvmsg": {},
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"scalbn": {},
|
||||
"scalbnl": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"sendmsg": {},
|
||||
"sendto": {},
|
||||
"setattrlist": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setlocale": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
"shmdt": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"signal": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"srand48": {},
|
||||
"srandomdev": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"statfs": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strlcat": {},
|
||||
"strlcpy": {},
|
||||
"strlen": {},
|
||||
"strncat": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strnlen": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strspn": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtof": {},
|
||||
"strtoimax": {},
|
||||
"strtok": {},
|
||||
"strtol": {},
|
||||
"strtold": {},
|
||||
"strtoll": {},
|
||||
"strtoul": {},
|
||||
"strtoull": {},
|
||||
"strtoumax": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"truncate": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"waitpid": {},
|
||||
"wcschr": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"zero_struct_address": {},
|
||||
}
|
422
vendor/modernc.org/libc/capi_linux_386.go
generated
vendored
Normal file
422
vendor/modernc.org/libc/capi_linux_386.go
generated
vendored
Normal file
@ -0,0 +1,422 @@
|
||||
// Code generated by 'go generate' - DO NOT EDIT.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_IO_putc": {},
|
||||
"___errno_location": {},
|
||||
"__assert_fail": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_b_loc": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__errno_location": {},
|
||||
"__floatscan": {},
|
||||
"__fpclassify": {},
|
||||
"__fpclassifyf": {},
|
||||
"__fpclassifyl": {},
|
||||
"__h_errno_location": {},
|
||||
"__inet_aton": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__strncasecmp_l": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"_exit": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfgetospeed": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chmod": {},
|
||||
"chown": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"copysignl": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"ctime": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"endpwent": {},
|
||||
"environ": {},
|
||||
"execvp": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fchown": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fmodl": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"freeaddrinfo": {},
|
||||
"frexp": {},
|
||||
"fscanf": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"ftruncate64": {},
|
||||
"fts64_close": {},
|
||||
"fts64_open": {},
|
||||
"fts64_read": {},
|
||||
"fts_close": {},
|
||||
"fts_open": {},
|
||||
"fts_read": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getc": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getenv": {},
|
||||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrnam": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
"gethostbyname2": {},
|
||||
"gethostbyname2_r": {},
|
||||
"gethostname": {},
|
||||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
"getpwuid_r": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrlimit": {},
|
||||
"getrlimit64": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"getuid": {},
|
||||
"gmtime_r": {},
|
||||
"h_errno": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isupper": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"lrand48": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkstemp": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"mmap64": {},
|
||||
"modf": {},
|
||||
"mremap": {},
|
||||
"munmap": {},
|
||||
"nanf": {},
|
||||
"nl_langinfo": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"open64": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pause": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"poll": {},
|
||||
"popen": {},
|
||||
"posix_fadvise": {},
|
||||
"pow": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"puts": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"rand_r": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readdir64": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"recvfrom": {},
|
||||
"recvmsg": {},
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"scalbn": {},
|
||||
"scalbnl": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"sendmsg": {},
|
||||
"sendto": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setlocale": {},
|
||||
"setrlimit": {},
|
||||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
"shmdt": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"signal": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"srand48": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strlcat": {},
|
||||
"strlcpy": {},
|
||||
"strlen": {},
|
||||
"strncasecmp": {},
|
||||
"strncat": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strnlen": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strspn": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtof": {},
|
||||
"strtoimax": {},
|
||||
"strtok": {},
|
||||
"strtol": {},
|
||||
"strtold": {},
|
||||
"strtoll": {},
|
||||
"strtoul": {},
|
||||
"strtoull": {},
|
||||
"strtoumax": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"ungetc": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"waitpid": {},
|
||||
"wcschr": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"writev": {},
|
||||
"zero_struct_address": {},
|
||||
}
|
472
vendor/modernc.org/libc/capi_linux_amd64.go
generated
vendored
Normal file
472
vendor/modernc.org/libc/capi_linux_amd64.go
generated
vendored
Normal file
@ -0,0 +1,472 @@
|
||||
// Code generated by 'go generate' - DO NOT EDIT.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_IO_putc": {},
|
||||
"___errno_location": {},
|
||||
"__assert_fail": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_getMutexType": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_pthreadAttrGetDetachState": {},
|
||||
"__ccgo_pthreadMutexattrGettype": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_b_loc": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__errno_location": {},
|
||||
"__floatscan": {},
|
||||
"__fpclassify": {},
|
||||
"__fpclassifyf": {},
|
||||
"__fpclassifyl": {},
|
||||
"__fsmu8": {},
|
||||
"__h_errno_location": {},
|
||||
"__inet_aton": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__lockfile": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__strncasecmp_l": {},
|
||||
"__sync_synchronize": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"__unlockfile": {},
|
||||
"_exit": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfgetospeed": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chmod": {},
|
||||
"chown": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"copysignl": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"ctime": {},
|
||||
"ctime_r": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"endpwent": {},
|
||||
"environ": {},
|
||||
"execvp": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fchown": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fmodl": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"freeaddrinfo": {},
|
||||
"frexp": {},
|
||||
"fscanf": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"ftruncate64": {},
|
||||
"fts64_close": {},
|
||||
"fts64_open": {},
|
||||
"fts64_read": {},
|
||||
"fts_close": {},
|
||||
"fts_open": {},
|
||||
"fts_read": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getc": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getenv": {},
|
||||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrgid_r": {},
|
||||
"getgrnam": {},
|
||||
"getgrnam_r": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
"gethostbyname2": {},
|
||||
"gethostbyname2_r": {},
|
||||
"gethostbyname_r": {},
|
||||
"gethostname": {},
|
||||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
"getpwuid_r": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrlimit": {},
|
||||
"getrlimit64": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"getuid": {},
|
||||
"gmtime_r": {},
|
||||
"h_errno": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isupper": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"lrand48": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbrtowc": {},
|
||||
"mbsinit": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkstemp": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"mmap64": {},
|
||||
"modf": {},
|
||||
"mremap": {},
|
||||
"munmap": {},
|
||||
"nanf": {},
|
||||
"nl_langinfo": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"open64": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pause": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"poll": {},
|
||||
"popen": {},
|
||||
"posix_fadvise": {},
|
||||
"pow": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"pthread_attr_destroy": {},
|
||||
"pthread_attr_getdetachstate": {},
|
||||
"pthread_attr_init": {},
|
||||
"pthread_attr_setdetachstate": {},
|
||||
"pthread_attr_setscope": {},
|
||||
"pthread_attr_setstacksize": {},
|
||||
"pthread_cond_broadcast": {},
|
||||
"pthread_cond_destroy": {},
|
||||
"pthread_cond_init": {},
|
||||
"pthread_cond_signal": {},
|
||||
"pthread_cond_timedwait": {},
|
||||
"pthread_cond_wait": {},
|
||||
"pthread_create": {},
|
||||
"pthread_detach": {},
|
||||
"pthread_equal": {},
|
||||
"pthread_exit": {},
|
||||
"pthread_getspecific": {},
|
||||
"pthread_join": {},
|
||||
"pthread_key_create": {},
|
||||
"pthread_key_delete": {},
|
||||
"pthread_mutex_destroy": {},
|
||||
"pthread_mutex_init": {},
|
||||
"pthread_mutex_lock": {},
|
||||
"pthread_mutex_trylock": {},
|
||||
"pthread_mutex_unlock": {},
|
||||
"pthread_mutexattr_destroy": {},
|
||||
"pthread_mutexattr_init": {},
|
||||
"pthread_mutexattr_settype": {},
|
||||
"pthread_self": {},
|
||||
"pthread_setspecific": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"puts": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"rand_r": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readdir64": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"recvfrom": {},
|
||||
"recvmsg": {},
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"scalbn": {},
|
||||
"scalbnl": {},
|
||||
"sched_yield": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"sendmsg": {},
|
||||
"sendto": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setlocale": {},
|
||||
"setrlimit": {},
|
||||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
"shmdt": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"signal": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"srand48": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strlcat": {},
|
||||
"strlcpy": {},
|
||||
"strlen": {},
|
||||
"strncasecmp": {},
|
||||
"strncat": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strnlen": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strspn": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtof": {},
|
||||
"strtoimax": {},
|
||||
"strtok": {},
|
||||
"strtol": {},
|
||||
"strtold": {},
|
||||
"strtoll": {},
|
||||
"strtoul": {},
|
||||
"strtoull": {},
|
||||
"strtoumax": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"ungetc": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"uuid_generate_random": {},
|
||||
"uuid_parse": {},
|
||||
"uuid_unparse": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vfscanf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"vsscanf": {},
|
||||
"waitpid": {},
|
||||
"wcschr": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"writev": {},
|
||||
"zero_struct_address": {},
|
||||
}
|
422
vendor/modernc.org/libc/capi_linux_arm.go
generated
vendored
Normal file
422
vendor/modernc.org/libc/capi_linux_arm.go
generated
vendored
Normal file
@ -0,0 +1,422 @@
|
||||
// Code generated by 'go generate' - DO NOT EDIT.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_IO_putc": {},
|
||||
"___errno_location": {},
|
||||
"__assert_fail": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_b_loc": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__errno_location": {},
|
||||
"__floatscan": {},
|
||||
"__fpclassify": {},
|
||||
"__fpclassifyf": {},
|
||||
"__fpclassifyl": {},
|
||||
"__h_errno_location": {},
|
||||
"__inet_aton": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__strncasecmp_l": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"_exit": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfgetospeed": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chmod": {},
|
||||
"chown": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"copysignl": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"ctime": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"endpwent": {},
|
||||
"environ": {},
|
||||
"execvp": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fchown": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fmodl": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"freeaddrinfo": {},
|
||||
"frexp": {},
|
||||
"fscanf": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"ftruncate64": {},
|
||||
"fts64_close": {},
|
||||
"fts64_open": {},
|
||||
"fts64_read": {},
|
||||
"fts_close": {},
|
||||
"fts_open": {},
|
||||
"fts_read": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getc": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getenv": {},
|
||||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrnam": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
"gethostbyname2": {},
|
||||
"gethostbyname2_r": {},
|
||||
"gethostname": {},
|
||||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
"getpwuid_r": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrlimit": {},
|
||||
"getrlimit64": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"getuid": {},
|
||||
"gmtime_r": {},
|
||||
"h_errno": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isupper": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"lrand48": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkstemp": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"mmap64": {},
|
||||
"modf": {},
|
||||
"mremap": {},
|
||||
"munmap": {},
|
||||
"nanf": {},
|
||||
"nl_langinfo": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"open64": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pause": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"poll": {},
|
||||
"popen": {},
|
||||
"posix_fadvise": {},
|
||||
"pow": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"puts": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"rand_r": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readdir64": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"recvfrom": {},
|
||||
"recvmsg": {},
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"scalbn": {},
|
||||
"scalbnl": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"sendmsg": {},
|
||||
"sendto": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setlocale": {},
|
||||
"setrlimit": {},
|
||||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
"shmdt": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"signal": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"srand48": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strlcat": {},
|
||||
"strlcpy": {},
|
||||
"strlen": {},
|
||||
"strncasecmp": {},
|
||||
"strncat": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strnlen": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strspn": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtof": {},
|
||||
"strtoimax": {},
|
||||
"strtok": {},
|
||||
"strtol": {},
|
||||
"strtold": {},
|
||||
"strtoll": {},
|
||||
"strtoul": {},
|
||||
"strtoull": {},
|
||||
"strtoumax": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"ungetc": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"waitpid": {},
|
||||
"wcschr": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"writev": {},
|
||||
"zero_struct_address": {},
|
||||
}
|
430
vendor/modernc.org/libc/capi_linux_arm64.go
generated
vendored
Normal file
430
vendor/modernc.org/libc/capi_linux_arm64.go
generated
vendored
Normal file
@ -0,0 +1,430 @@
|
||||
// Code generated by 'go generate' - DO NOT EDIT.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_IO_putc": {},
|
||||
"___errno_location": {},
|
||||
"__assert_fail": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_b_loc": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__errno_location": {},
|
||||
"__floatscan": {},
|
||||
"__fpclassify": {},
|
||||
"__fpclassifyf": {},
|
||||
"__fpclassifyl": {},
|
||||
"__fsmu8": {},
|
||||
"__h_errno_location": {},
|
||||
"__inet_aton": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__lockfile": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__strncasecmp_l": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"__unlockfile": {},
|
||||
"_exit": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfgetospeed": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chmod": {},
|
||||
"chown": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"copysignl": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"ctime": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"endpwent": {},
|
||||
"environ": {},
|
||||
"execvp": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fchown": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fmodl": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"freeaddrinfo": {},
|
||||
"frexp": {},
|
||||
"fscanf": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"ftruncate64": {},
|
||||
"fts64_close": {},
|
||||
"fts64_open": {},
|
||||
"fts64_read": {},
|
||||
"fts_close": {},
|
||||
"fts_open": {},
|
||||
"fts_read": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getc": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getenv": {},
|
||||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrnam": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
"gethostbyname2": {},
|
||||
"gethostbyname2_r": {},
|
||||
"gethostname": {},
|
||||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
"getpwuid_r": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrlimit": {},
|
||||
"getrlimit64": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"getuid": {},
|
||||
"gmtime_r": {},
|
||||
"h_errno": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isupper": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"lrand48": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbrtowc": {},
|
||||
"mbsinit": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkstemp": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"mmap64": {},
|
||||
"modf": {},
|
||||
"mremap": {},
|
||||
"munmap": {},
|
||||
"nanf": {},
|
||||
"nl_langinfo": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"open64": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pause": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"poll": {},
|
||||
"popen": {},
|
||||
"posix_fadvise": {},
|
||||
"pow": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"puts": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"rand_r": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readdir64": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"recvfrom": {},
|
||||
"recvmsg": {},
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"scalbn": {},
|
||||
"scalbnl": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"sendmsg": {},
|
||||
"sendto": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setlocale": {},
|
||||
"setrlimit": {},
|
||||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
"shmdt": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"signal": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"srand48": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strlcat": {},
|
||||
"strlcpy": {},
|
||||
"strlen": {},
|
||||
"strncasecmp": {},
|
||||
"strncat": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strnlen": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strspn": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtof": {},
|
||||
"strtoimax": {},
|
||||
"strtok": {},
|
||||
"strtol": {},
|
||||
"strtold": {},
|
||||
"strtoll": {},
|
||||
"strtoul": {},
|
||||
"strtoull": {},
|
||||
"strtoumax": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"ungetc": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vfscanf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"vsscanf": {},
|
||||
"waitpid": {},
|
||||
"wcschr": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"writev": {},
|
||||
"zero_struct_address": {},
|
||||
}
|
446
vendor/modernc.org/libc/capi_linux_s390x.go
generated
vendored
Normal file
446
vendor/modernc.org/libc/capi_linux_s390x.go
generated
vendored
Normal file
@ -0,0 +1,446 @@
|
||||
// Code generated by 'go generate' - DO NOT EDIT.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_IO_putc": {},
|
||||
"___errno_location": {},
|
||||
"__assert_fail": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_getMutexType": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_pthreadAttrGetDetachState": {},
|
||||
"__ccgo_pthreadMutexattrGettype": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_b_loc": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__errno_location": {},
|
||||
"__floatscan": {},
|
||||
"__fpclassify": {},
|
||||
"__fpclassifyf": {},
|
||||
"__fpclassifyl": {},
|
||||
"__fsmu8": {},
|
||||
"__h_errno_location": {},
|
||||
"__inet_aton": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__lockfile": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__strncasecmp_l": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"__unlockfile": {},
|
||||
"_exit": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfgetospeed": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chmod": {},
|
||||
"chown": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"copysignl": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"ctime": {},
|
||||
"ctime_r": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"endpwent": {},
|
||||
"environ": {},
|
||||
"execvp": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fchown": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fmodl": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"freeaddrinfo": {},
|
||||
"frexp": {},
|
||||
"fscanf": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"ftruncate64": {},
|
||||
"fts64_close": {},
|
||||
"fts64_open": {},
|
||||
"fts64_read": {},
|
||||
"fts_close": {},
|
||||
"fts_open": {},
|
||||
"fts_read": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getc": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getenv": {},
|
||||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrgid_r": {},
|
||||
"getgrnam": {},
|
||||
"getgrnam_r": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
"gethostbyname2": {},
|
||||
"gethostbyname2_r": {},
|
||||
"gethostbyname_r": {},
|
||||
"gethostname": {},
|
||||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
"getpwuid_r": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrlimit": {},
|
||||
"getrlimit64": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"getuid": {},
|
||||
"gmtime_r": {},
|
||||
"h_errno": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isupper": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"lrand48": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbrtowc": {},
|
||||
"mbsinit": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkstemp": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"mmap64": {},
|
||||
"modf": {},
|
||||
"mremap": {},
|
||||
"munmap": {},
|
||||
"nanf": {},
|
||||
"nl_langinfo": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"open64": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pause": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"poll": {},
|
||||
"popen": {},
|
||||
"posix_fadvise": {},
|
||||
"pow": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"pthread_attr_getdetachstate": {},
|
||||
"pthread_attr_setdetachstate": {},
|
||||
"pthread_mutexattr_destroy": {},
|
||||
"pthread_mutexattr_init": {},
|
||||
"pthread_mutexattr_settype": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"puts": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"rand_r": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readdir64": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"recvfrom": {},
|
||||
"recvmsg": {},
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"scalbn": {},
|
||||
"scalbnl": {},
|
||||
"sched_yield": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"sendmsg": {},
|
||||
"sendto": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setlocale": {},
|
||||
"setrlimit": {},
|
||||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
"shmdt": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"signal": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"srand48": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strlcat": {},
|
||||
"strlcpy": {},
|
||||
"strlen": {},
|
||||
"strncasecmp": {},
|
||||
"strncat": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strnlen": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strspn": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtof": {},
|
||||
"strtoimax": {},
|
||||
"strtok": {},
|
||||
"strtol": {},
|
||||
"strtold": {},
|
||||
"strtoll": {},
|
||||
"strtoul": {},
|
||||
"strtoull": {},
|
||||
"strtoumax": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"ungetc": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"uuid_generate_random": {},
|
||||
"uuid_parse": {},
|
||||
"uuid_unparse": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vfscanf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"vsscanf": {},
|
||||
"waitpid": {},
|
||||
"wcschr": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"writev": {},
|
||||
"zero_struct_address": {},
|
||||
}
|
670
vendor/modernc.org/libc/capi_windows_386.go
generated
vendored
Normal file
670
vendor/modernc.org/libc/capi_windows_386.go
generated
vendored
Normal file
@ -0,0 +1,670 @@
|
||||
// Code generated by 'go generate' - DO NOT EDIT.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"AccessCheck": {},
|
||||
"AddAccessDeniedAce": {},
|
||||
"AddAce": {},
|
||||
"AreFileApisANSI": {},
|
||||
"BuildCommDCBW": {},
|
||||
"CancelSynchronousIo": {},
|
||||
"CharLowerW": {},
|
||||
"ClearCommError": {},
|
||||
"CloseHandle": {},
|
||||
"CopyFileW": {},
|
||||
"CreateDirectoryW": {},
|
||||
"CreateEventA": {},
|
||||
"CreateEventW": {},
|
||||
"CreateFileA": {},
|
||||
"CreateFileMappingA": {},
|
||||
"CreateFileMappingW": {},
|
||||
"CreateFileW": {},
|
||||
"CreateHardLinkW": {},
|
||||
"CreateMutexW": {},
|
||||
"CreatePipe": {},
|
||||
"CreateProcessA": {},
|
||||
"CreateProcessW": {},
|
||||
"CreateThread": {},
|
||||
"CreateWindowExW": {},
|
||||
"DdeAbandonTransaction": {},
|
||||
"DdeAccessData": {},
|
||||
"DdeClientTransaction": {},
|
||||
"DdeConnect": {},
|
||||
"DdeCreateDataHandle": {},
|
||||
"DdeCreateStringHandleW": {},
|
||||
"DdeDisconnect": {},
|
||||
"DdeFreeDataHandle": {},
|
||||
"DdeFreeStringHandle": {},
|
||||
"DdeGetData": {},
|
||||
"DdeGetLastError": {},
|
||||
"DdeInitializeW": {},
|
||||
"DdeNameService": {},
|
||||
"DdeQueryStringW": {},
|
||||
"DdeUnaccessData": {},
|
||||
"DdeUninitialize": {},
|
||||
"DebugBreak": {},
|
||||
"DefWindowProcW": {},
|
||||
"DeleteCriticalSection": {},
|
||||
"DeleteFileA": {},
|
||||
"DeleteFileW": {},
|
||||
"DestroyWindow": {},
|
||||
"DeviceIoControl": {},
|
||||
"DispatchMessageW": {},
|
||||
"DuplicateHandle": {},
|
||||
"EnterCriticalSection": {},
|
||||
"EnumWindows": {},
|
||||
"EqualSid": {},
|
||||
"EscapeCommFunction": {},
|
||||
"ExitProcess": {},
|
||||
"FindClose": {},
|
||||
"FindFirstFileExW": {},
|
||||
"FindFirstFileW": {},
|
||||
"FindNextFileW": {},
|
||||
"FlushFileBuffers": {},
|
||||
"FlushViewOfFile": {},
|
||||
"FormatMessageA": {},
|
||||
"FormatMessageW": {},
|
||||
"FreeLibrary": {},
|
||||
"GetACP": {},
|
||||
"GetAce": {},
|
||||
"GetAclInformation": {},
|
||||
"GetCommModemStatus": {},
|
||||
"GetCommState": {},
|
||||
"GetCommandLineW": {},
|
||||
"GetComputerNameW": {},
|
||||
"GetConsoleCP": {},
|
||||
"GetConsoleMode": {},
|
||||
"GetConsoleScreenBufferInfo": {},
|
||||
"GetCurrentDirectoryW": {},
|
||||
"GetCurrentProcess": {},
|
||||
"GetCurrentProcessId": {},
|
||||
"GetCurrentThread": {},
|
||||
"GetCurrentThreadId": {},
|
||||
"GetDiskFreeSpaceA": {},
|
||||
"GetDiskFreeSpaceW": {},
|
||||
"GetEnvironmentVariableA": {},
|
||||
"GetEnvironmentVariableW": {},
|
||||
"GetExitCodeProcess": {},
|
||||
"GetExitCodeThread": {},
|
||||
"GetFileAttributesA": {},
|
||||
"GetFileAttributesExW": {},
|
||||
"GetFileAttributesW": {},
|
||||
"GetFileInformationByHandle": {},
|
||||
"GetFileSecurityA": {},
|
||||
"GetFileSecurityW": {},
|
||||
"GetFileSize": {},
|
||||
"GetFileType": {},
|
||||
"GetFullPathNameA": {},
|
||||
"GetFullPathNameW": {},
|
||||
"GetLastError": {},
|
||||
"GetLengthSid": {},
|
||||
"GetLogicalDriveStringsA": {},
|
||||
"GetMessageW": {},
|
||||
"GetModuleFileNameA": {},
|
||||
"GetModuleFileNameW": {},
|
||||
"GetModuleHandleW": {},
|
||||
"GetNamedSecurityInfoW": {},
|
||||
"GetOverlappedResult": {},
|
||||
"GetPrivateProfileStringA": {},
|
||||
"GetProcAddress": {},
|
||||
"GetProcessHeap": {},
|
||||
"GetProfilesDirectoryW": {},
|
||||
"GetSecurityDescriptorDacl": {},
|
||||
"GetSecurityDescriptorOwner": {},
|
||||
"GetShortPathNameW": {},
|
||||
"GetSidIdentifierAuthority": {},
|
||||
"GetSidLengthRequired": {},
|
||||
"GetSidSubAuthority": {},
|
||||
"GetStdHandle": {},
|
||||
"GetSystemInfo": {},
|
||||
"GetSystemTime": {},
|
||||
"GetSystemTimeAsFileTime": {},
|
||||
"GetTempFileNameW": {},
|
||||
"GetTempPathA": {},
|
||||
"GetTempPathW": {},
|
||||
"GetTickCount": {},
|
||||
"GetTokenInformation": {},
|
||||
"GetUserNameW": {},
|
||||
"GetVersionExA": {},
|
||||
"GetVersionExW": {},
|
||||
"GetVolumeInformationA": {},
|
||||
"GetVolumeInformationW": {},
|
||||
"GetVolumeNameForVolumeMountPointW": {},
|
||||
"GetWindowLongPtrW": {},
|
||||
"GetWindowLongW": {},
|
||||
"GetWindowsDirectoryA": {},
|
||||
"GlobalAddAtomW": {},
|
||||
"GlobalDeleteAtom": {},
|
||||
"GlobalGetAtomNameW": {},
|
||||
"HeapAlloc": {},
|
||||
"HeapCompact": {},
|
||||
"HeapCreate": {},
|
||||
"HeapDestroy": {},
|
||||
"HeapFree": {},
|
||||
"HeapReAlloc": {},
|
||||
"HeapSize": {},
|
||||
"HeapValidate": {},
|
||||
"IN6_ADDR_EQUAL": {},
|
||||
"IN6_IS_ADDR_V4MAPPED": {},
|
||||
"ImpersonateSelf": {},
|
||||
"InitializeAcl": {},
|
||||
"InitializeCriticalSection": {},
|
||||
"InitializeSid": {},
|
||||
"IsDebuggerPresent": {},
|
||||
"IsWindow": {},
|
||||
"KillTimer": {},
|
||||
"LeaveCriticalSection": {},
|
||||
"LoadLibraryA": {},
|
||||
"LoadLibraryExW": {},
|
||||
"LoadLibraryW": {},
|
||||
"LocalFree": {},
|
||||
"LockFile": {},
|
||||
"LockFileEx": {},
|
||||
"MapViewOfFile": {},
|
||||
"MessageBeep": {},
|
||||
"MessageBoxW": {},
|
||||
"MoveFileW": {},
|
||||
"MsgWaitForMultipleObjectsEx": {},
|
||||
"MultiByteToWideChar": {},
|
||||
"NetApiBufferFree": {},
|
||||
"NetGetDCName": {},
|
||||
"NetUserGetInfo": {},
|
||||
"OpenEventA": {},
|
||||
"OpenProcessToken": {},
|
||||
"OpenThreadToken": {},
|
||||
"OutputDebugStringA": {},
|
||||
"OutputDebugStringW": {},
|
||||
"PeekConsoleInputW": {},
|
||||
"PeekMessageW": {},
|
||||
"PeekNamedPipe": {},
|
||||
"PostMessageW": {},
|
||||
"PostQuitMessage": {},
|
||||
"PurgeComm": {},
|
||||
"QueryPerformanceCounter": {},
|
||||
"QueryPerformanceFrequency": {},
|
||||
"RaiseException": {},
|
||||
"ReadConsoleW": {},
|
||||
"ReadFile": {},
|
||||
"RegCloseKey": {},
|
||||
"RegConnectRegistryW": {},
|
||||
"RegCreateKeyExW": {},
|
||||
"RegDeleteKeyW": {},
|
||||
"RegDeleteValueW": {},
|
||||
"RegEnumKeyExW": {},
|
||||
"RegEnumValueW": {},
|
||||
"RegOpenKeyExW": {},
|
||||
"RegQueryValueExW": {},
|
||||
"RegSetValueExW": {},
|
||||
"RegisterClassExW": {},
|
||||
"RegisterClassW": {},
|
||||
"RemoveDirectoryW": {},
|
||||
"ResetEvent": {},
|
||||
"RevertToSelf": {},
|
||||
"RtlGetVersion": {},
|
||||
"SearchPathW": {},
|
||||
"SendMessageTimeoutW": {},
|
||||
"SendMessageW": {},
|
||||
"SetCommState": {},
|
||||
"SetCommTimeouts": {},
|
||||
"SetConsoleCtrlHandler": {},
|
||||
"SetConsoleMode": {},
|
||||
"SetConsoleTextAttribute": {},
|
||||
"SetCurrentDirectoryW": {},
|
||||
"SetEndOfFile": {},
|
||||
"SetErrorMode": {},
|
||||
"SetEvent": {},
|
||||
"SetFileAttributesW": {},
|
||||
"SetFilePointer": {},
|
||||
"SetFileTime": {},
|
||||
"SetHandleInformation": {},
|
||||
"SetNamedSecurityInfoA": {},
|
||||
"SetThreadPriority": {},
|
||||
"SetTimer": {},
|
||||
"SetWindowLongPtrW": {},
|
||||
"SetWindowLongW": {},
|
||||
"SetupComm": {},
|
||||
"Sleep": {},
|
||||
"SleepEx": {},
|
||||
"SystemTimeToFileTime": {},
|
||||
"TerminateThread": {},
|
||||
"TranslateMessage": {},
|
||||
"UnlockFile": {},
|
||||
"UnlockFileEx": {},
|
||||
"UnmapViewOfFile": {},
|
||||
"UnregisterClassW": {},
|
||||
"WSAAsyncSelect": {},
|
||||
"WSAGetLastError": {},
|
||||
"WSAStartup": {},
|
||||
"WaitForInputIdle": {},
|
||||
"WaitForSingleObject": {},
|
||||
"WaitForSingleObjectEx": {},
|
||||
"WideCharToMultiByte": {},
|
||||
"WriteConsoleW": {},
|
||||
"WriteFile": {},
|
||||
"WspiapiFreeAddrInfo": {},
|
||||
"WspiapiGetAddrInfo": {},
|
||||
"WspiapiGetNameInfo": {},
|
||||
"_IO_putc": {},
|
||||
"_InterlockedCompareExchange": {},
|
||||
"_InterlockedExchange": {},
|
||||
"___errno_location": {},
|
||||
"__acrt_iob_func": {},
|
||||
"__assert_fail": {},
|
||||
"__atomic_load_n": {},
|
||||
"__atomic_store_n": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflow": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflow": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflow": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__ctype_b_loc": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__env_rm_add": {},
|
||||
"__errno_location": {},
|
||||
"__imp__environ": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isspace_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__mingw_vfprintf": {},
|
||||
"__mingw_vfscanf": {},
|
||||
"__mingw_vfwprintf": {},
|
||||
"__mingw_vfwscanf": {},
|
||||
"__mingw_vsnprintf": {},
|
||||
"__mingw_vsnwprintf": {},
|
||||
"__mingw_vsprintf": {},
|
||||
"__mingw_vsscanf": {},
|
||||
"__mingw_vswscanf": {},
|
||||
"__ms_vfscanf": {},
|
||||
"__ms_vfwscanf": {},
|
||||
"__ms_vscanf": {},
|
||||
"__ms_vsnprintf": {},
|
||||
"__ms_vsscanf": {},
|
||||
"__ms_vswscanf": {},
|
||||
"__ms_vwscanf": {},
|
||||
"__putenv": {},
|
||||
"__strchrnul": {},
|
||||
"_access": {},
|
||||
"_assert": {},
|
||||
"_beginthread": {},
|
||||
"_beginthreadex": {},
|
||||
"_byteswap_uint64": {},
|
||||
"_byteswap_ulong": {},
|
||||
"_chmod": {},
|
||||
"_chsize": {},
|
||||
"_commit": {},
|
||||
"_controlfp": {},
|
||||
"_endthreadex": {},
|
||||
"_errno": {},
|
||||
"_exit": {},
|
||||
"_fileno": {},
|
||||
"_findclose": {},
|
||||
"_findfirst32": {},
|
||||
"_findfirst64i32": {},
|
||||
"_findnext32": {},
|
||||
"_findnext64i32": {},
|
||||
"_fstat64": {},
|
||||
"_fstati64": {},
|
||||
"_ftime": {},
|
||||
"_gmtime32": {},
|
||||
"_imp___environ": {},
|
||||
"_isatty": {},
|
||||
"_localtime32": {},
|
||||
"_localtime64": {},
|
||||
"_mkdir": {},
|
||||
"_msize": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"_pclose": {},
|
||||
"_popen": {},
|
||||
"_putchar": {},
|
||||
"_set_abort_behavior": {},
|
||||
"_setmode": {},
|
||||
"_snprintf": {},
|
||||
"_snwprintf": {},
|
||||
"_stat64": {},
|
||||
"_stati64": {},
|
||||
"_strdup": {},
|
||||
"_stricmp": {},
|
||||
"_strnicmp": {},
|
||||
"_unlink": {},
|
||||
"_vsnwprintf": {},
|
||||
"_wcsicmp": {},
|
||||
"_wcsnicmp": {},
|
||||
"_wopen": {},
|
||||
"_wunlink": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chmod": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"closesocket": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"environ": {},
|
||||
"execvp": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fchmod": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"frexp": {},
|
||||
"fscanf": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"ftruncate64": {},
|
||||
"fts64_close": {},
|
||||
"fts64_open": {},
|
||||
"fts64_read": {},
|
||||
"fts_close": {},
|
||||
"fts_read": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"gai_strerrorW": {},
|
||||
"getc": {},
|
||||
"getcwd": {},
|
||||
"getenv": {},
|
||||
"gethostname": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwuid": {},
|
||||
"getrlimit": {},
|
||||
"getrlimit64": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"gmtime": {},
|
||||
"gmtime_r": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"ioctlsocket": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isspace": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"lstrcmpiA": {},
|
||||
"lstrlenW": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"mmap64": {},
|
||||
"modf": {},
|
||||
"mremap": {},
|
||||
"munmap": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"open64": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"popen": {},
|
||||
"posix_fadvise": {},
|
||||
"pow": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"putenv": {},
|
||||
"puts": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setlocale": {},
|
||||
"setmode": {},
|
||||
"setrlimit": {},
|
||||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setvbuf": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strlen": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strstr": {},
|
||||
"strtol": {},
|
||||
"strtoul": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"timezone": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"ungetc": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"waitpid": {},
|
||||
"wcrtomb": {},
|
||||
"wcschr": {},
|
||||
"wcscmp": {},
|
||||
"wcscpy": {},
|
||||
"wcsicmp": {},
|
||||
"wcslen": {},
|
||||
"wcsncmp": {},
|
||||
"wcsrtombs": {},
|
||||
"wcstombs": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"wsprintfA": {},
|
||||
"wsprintfW": {},
|
||||
}
|
667
vendor/modernc.org/libc/capi_windows_amd64.go
generated
vendored
Normal file
667
vendor/modernc.org/libc/capi_windows_amd64.go
generated
vendored
Normal file
@ -0,0 +1,667 @@
|
||||
// Code generated by 'go generate' - DO NOT EDIT.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"AccessCheck": {},
|
||||
"AddAccessDeniedAce": {},
|
||||
"AddAce": {},
|
||||
"AreFileApisANSI": {},
|
||||
"BuildCommDCBW": {},
|
||||
"CancelSynchronousIo": {},
|
||||
"CharLowerW": {},
|
||||
"ClearCommError": {},
|
||||
"CloseHandle": {},
|
||||
"CopyFileW": {},
|
||||
"CreateDirectoryW": {},
|
||||
"CreateEventA": {},
|
||||
"CreateEventW": {},
|
||||
"CreateFileA": {},
|
||||
"CreateFileMappingA": {},
|
||||
"CreateFileMappingW": {},
|
||||
"CreateFileW": {},
|
||||
"CreateHardLinkW": {},
|
||||
"CreateMutexW": {},
|
||||
"CreatePipe": {},
|
||||
"CreateProcessA": {},
|
||||
"CreateProcessW": {},
|
||||
"CreateThread": {},
|
||||
"CreateWindowExW": {},
|
||||
"DdeAbandonTransaction": {},
|
||||
"DdeAccessData": {},
|
||||
"DdeClientTransaction": {},
|
||||
"DdeConnect": {},
|
||||
"DdeCreateDataHandle": {},
|
||||
"DdeCreateStringHandleW": {},
|
||||
"DdeDisconnect": {},
|
||||
"DdeFreeDataHandle": {},
|
||||
"DdeFreeStringHandle": {},
|
||||
"DdeGetData": {},
|
||||
"DdeGetLastError": {},
|
||||
"DdeInitializeW": {},
|
||||
"DdeNameService": {},
|
||||
"DdeQueryStringW": {},
|
||||
"DdeUnaccessData": {},
|
||||
"DdeUninitialize": {},
|
||||
"DebugBreak": {},
|
||||
"DefWindowProcW": {},
|
||||
"DeleteCriticalSection": {},
|
||||
"DeleteFileA": {},
|
||||
"DeleteFileW": {},
|
||||
"DestroyWindow": {},
|
||||
"DeviceIoControl": {},
|
||||
"DispatchMessageW": {},
|
||||
"DuplicateHandle": {},
|
||||
"EnterCriticalSection": {},
|
||||
"EnumWindows": {},
|
||||
"EqualSid": {},
|
||||
"EscapeCommFunction": {},
|
||||
"ExitProcess": {},
|
||||
"FindClose": {},
|
||||
"FindFirstFileExW": {},
|
||||
"FindFirstFileW": {},
|
||||
"FindNextFileW": {},
|
||||
"FlushFileBuffers": {},
|
||||
"FlushViewOfFile": {},
|
||||
"FormatMessageA": {},
|
||||
"FormatMessageW": {},
|
||||
"FreeLibrary": {},
|
||||
"GetACP": {},
|
||||
"GetAce": {},
|
||||
"GetAclInformation": {},
|
||||
"GetCommModemStatus": {},
|
||||
"GetCommState": {},
|
||||
"GetCommandLineW": {},
|
||||
"GetComputerNameW": {},
|
||||
"GetConsoleCP": {},
|
||||
"GetConsoleMode": {},
|
||||
"GetConsoleScreenBufferInfo": {},
|
||||
"GetCurrentDirectoryW": {},
|
||||
"GetCurrentProcess": {},
|
||||
"GetCurrentProcessId": {},
|
||||
"GetCurrentThread": {},
|
||||
"GetCurrentThreadId": {},
|
||||
"GetDiskFreeSpaceA": {},
|
||||
"GetDiskFreeSpaceW": {},
|
||||
"GetEnvironmentVariableA": {},
|
||||
"GetEnvironmentVariableW": {},
|
||||
"GetExitCodeProcess": {},
|
||||
"GetExitCodeThread": {},
|
||||
"GetFileAttributesA": {},
|
||||
"GetFileAttributesExW": {},
|
||||
"GetFileAttributesW": {},
|
||||
"GetFileInformationByHandle": {},
|
||||
"GetFileSecurityA": {},
|
||||
"GetFileSecurityW": {},
|
||||
"GetFileSize": {},
|
||||
"GetFileType": {},
|
||||
"GetFullPathNameA": {},
|
||||
"GetFullPathNameW": {},
|
||||
"GetLastError": {},
|
||||
"GetLengthSid": {},
|
||||
"GetLogicalDriveStringsA": {},
|
||||
"GetMessageW": {},
|
||||
"GetModuleFileNameA": {},
|
||||
"GetModuleFileNameW": {},
|
||||
"GetModuleHandleW": {},
|
||||
"GetNamedSecurityInfoW": {},
|
||||
"GetOverlappedResult": {},
|
||||
"GetPrivateProfileStringA": {},
|
||||
"GetProcAddress": {},
|
||||
"GetProcessHeap": {},
|
||||
"GetProfilesDirectoryW": {},
|
||||
"GetSecurityDescriptorDacl": {},
|
||||
"GetSecurityDescriptorOwner": {},
|
||||
"GetShortPathNameW": {},
|
||||
"GetSidIdentifierAuthority": {},
|
||||
"GetSidLengthRequired": {},
|
||||
"GetSidSubAuthority": {},
|
||||
"GetStdHandle": {},
|
||||
"GetSystemInfo": {},
|
||||
"GetSystemTime": {},
|
||||
"GetSystemTimeAsFileTime": {},
|
||||
"GetTempFileNameW": {},
|
||||
"GetTempPathA": {},
|
||||
"GetTempPathW": {},
|
||||
"GetTickCount": {},
|
||||
"GetTokenInformation": {},
|
||||
"GetUserNameW": {},
|
||||
"GetVersionExA": {},
|
||||
"GetVersionExW": {},
|
||||
"GetVolumeInformationA": {},
|
||||
"GetVolumeInformationW": {},
|
||||
"GetVolumeNameForVolumeMountPointW": {},
|
||||
"GetWindowLongPtrW": {},
|
||||
"GetWindowsDirectoryA": {},
|
||||
"GlobalAddAtomW": {},
|
||||
"GlobalDeleteAtom": {},
|
||||
"GlobalGetAtomNameW": {},
|
||||
"HeapAlloc": {},
|
||||
"HeapCompact": {},
|
||||
"HeapCreate": {},
|
||||
"HeapDestroy": {},
|
||||
"HeapFree": {},
|
||||
"HeapReAlloc": {},
|
||||
"HeapSize": {},
|
||||
"HeapValidate": {},
|
||||
"IN6_ADDR_EQUAL": {},
|
||||
"IN6_IS_ADDR_V4MAPPED": {},
|
||||
"ImpersonateSelf": {},
|
||||
"InitializeAcl": {},
|
||||
"InitializeCriticalSection": {},
|
||||
"InitializeSid": {},
|
||||
"IsDebuggerPresent": {},
|
||||
"IsWindow": {},
|
||||
"KillTimer": {},
|
||||
"LeaveCriticalSection": {},
|
||||
"LoadLibraryA": {},
|
||||
"LoadLibraryExW": {},
|
||||
"LoadLibraryW": {},
|
||||
"LocalFree": {},
|
||||
"LockFile": {},
|
||||
"LockFileEx": {},
|
||||
"MapViewOfFile": {},
|
||||
"MessageBeep": {},
|
||||
"MessageBoxW": {},
|
||||
"MoveFileW": {},
|
||||
"MsgWaitForMultipleObjectsEx": {},
|
||||
"MultiByteToWideChar": {},
|
||||
"NetApiBufferFree": {},
|
||||
"NetGetDCName": {},
|
||||
"NetUserGetInfo": {},
|
||||
"OpenEventA": {},
|
||||
"OpenProcessToken": {},
|
||||
"OpenThreadToken": {},
|
||||
"OutputDebugStringA": {},
|
||||
"OutputDebugStringW": {},
|
||||
"PeekConsoleInputW": {},
|
||||
"PeekMessageW": {},
|
||||
"PeekNamedPipe": {},
|
||||
"PostMessageW": {},
|
||||
"PostQuitMessage": {},
|
||||
"PurgeComm": {},
|
||||
"QueryPerformanceCounter": {},
|
||||
"QueryPerformanceFrequency": {},
|
||||
"RaiseException": {},
|
||||
"ReadConsoleW": {},
|
||||
"ReadFile": {},
|
||||
"RegCloseKey": {},
|
||||
"RegConnectRegistryW": {},
|
||||
"RegCreateKeyExW": {},
|
||||
"RegDeleteKeyW": {},
|
||||
"RegDeleteValueW": {},
|
||||
"RegEnumKeyExW": {},
|
||||
"RegEnumValueW": {},
|
||||
"RegOpenKeyExW": {},
|
||||
"RegQueryValueExW": {},
|
||||
"RegSetValueExW": {},
|
||||
"RegisterClassExW": {},
|
||||
"RegisterClassW": {},
|
||||
"RemoveDirectoryW": {},
|
||||
"ResetEvent": {},
|
||||
"RevertToSelf": {},
|
||||
"RtlGetVersion": {},
|
||||
"SearchPathW": {},
|
||||
"SendMessageTimeoutW": {},
|
||||
"SendMessageW": {},
|
||||
"SetCommState": {},
|
||||
"SetCommTimeouts": {},
|
||||
"SetConsoleCtrlHandler": {},
|
||||
"SetConsoleMode": {},
|
||||
"SetConsoleTextAttribute": {},
|
||||
"SetCurrentDirectoryW": {},
|
||||
"SetEndOfFile": {},
|
||||
"SetErrorMode": {},
|
||||
"SetEvent": {},
|
||||
"SetFileAttributesW": {},
|
||||
"SetFilePointer": {},
|
||||
"SetFileTime": {},
|
||||
"SetHandleInformation": {},
|
||||
"SetNamedSecurityInfoA": {},
|
||||
"SetThreadPriority": {},
|
||||
"SetTimer": {},
|
||||
"SetWindowLongPtrW": {},
|
||||
"SetupComm": {},
|
||||
"Sleep": {},
|
||||
"SleepEx": {},
|
||||
"SystemTimeToFileTime": {},
|
||||
"TerminateThread": {},
|
||||
"TranslateMessage": {},
|
||||
"UnlockFile": {},
|
||||
"UnlockFileEx": {},
|
||||
"UnmapViewOfFile": {},
|
||||
"UnregisterClassW": {},
|
||||
"WSAAsyncSelect": {},
|
||||
"WSAGetLastError": {},
|
||||
"WSAStartup": {},
|
||||
"WaitForInputIdle": {},
|
||||
"WaitForSingleObject": {},
|
||||
"WaitForSingleObjectEx": {},
|
||||
"WideCharToMultiByte": {},
|
||||
"WriteConsoleW": {},
|
||||
"WriteFile": {},
|
||||
"WspiapiFreeAddrInfo": {},
|
||||
"WspiapiGetAddrInfo": {},
|
||||
"WspiapiGetNameInfo": {},
|
||||
"_IO_putc": {},
|
||||
"_InterlockedCompareExchange": {},
|
||||
"_InterlockedExchange": {},
|
||||
"___errno_location": {},
|
||||
"__acrt_iob_func": {},
|
||||
"__assert_fail": {},
|
||||
"__atomic_load_n": {},
|
||||
"__atomic_store_n": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflow": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflow": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflow": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__ctype_b_loc": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__env_rm_add": {},
|
||||
"__errno_location": {},
|
||||
"__imp__environ": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isspace_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__mingw_vfprintf": {},
|
||||
"__mingw_vfscanf": {},
|
||||
"__mingw_vfwprintf": {},
|
||||
"__mingw_vfwscanf": {},
|
||||
"__mingw_vsnprintf": {},
|
||||
"__mingw_vsnwprintf": {},
|
||||
"__mingw_vsprintf": {},
|
||||
"__mingw_vsscanf": {},
|
||||
"__mingw_vswscanf": {},
|
||||
"__ms_vfscanf": {},
|
||||
"__ms_vfwscanf": {},
|
||||
"__ms_vscanf": {},
|
||||
"__ms_vsnprintf": {},
|
||||
"__ms_vsscanf": {},
|
||||
"__ms_vswscanf": {},
|
||||
"__ms_vwscanf": {},
|
||||
"__putenv": {},
|
||||
"__strchrnul": {},
|
||||
"_access": {},
|
||||
"_assert": {},
|
||||
"_beginthread": {},
|
||||
"_beginthreadex": {},
|
||||
"_byteswap_uint64": {},
|
||||
"_byteswap_ulong": {},
|
||||
"_chmod": {},
|
||||
"_chsize": {},
|
||||
"_commit": {},
|
||||
"_controlfp": {},
|
||||
"_endthreadex": {},
|
||||
"_errno": {},
|
||||
"_exit": {},
|
||||
"_fileno": {},
|
||||
"_findclose": {},
|
||||
"_findfirst32": {},
|
||||
"_findfirst64i32": {},
|
||||
"_findnext32": {},
|
||||
"_findnext64i32": {},
|
||||
"_fstat64": {},
|
||||
"_fstati64": {},
|
||||
"_ftime": {},
|
||||
"_imp___environ": {},
|
||||
"_isatty": {},
|
||||
"_localtime64": {},
|
||||
"_mkdir": {},
|
||||
"_msize": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"_pclose": {},
|
||||
"_popen": {},
|
||||
"_putchar": {},
|
||||
"_set_abort_behavior": {},
|
||||
"_setmode": {},
|
||||
"_snprintf": {},
|
||||
"_snwprintf": {},
|
||||
"_stat64": {},
|
||||
"_stati64": {},
|
||||
"_strdup": {},
|
||||
"_stricmp": {},
|
||||
"_strnicmp": {},
|
||||
"_unlink": {},
|
||||
"_vsnwprintf": {},
|
||||
"_wcsicmp": {},
|
||||
"_wcsnicmp": {},
|
||||
"_wopen": {},
|
||||
"_wunlink": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chmod": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"closesocket": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"environ": {},
|
||||
"execvp": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fchmod": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"frexp": {},
|
||||
"fscanf": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"ftruncate64": {},
|
||||
"fts64_close": {},
|
||||
"fts64_open": {},
|
||||
"fts64_read": {},
|
||||
"fts_close": {},
|
||||
"fts_read": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"gai_strerrorW": {},
|
||||
"getc": {},
|
||||
"getcwd": {},
|
||||
"getenv": {},
|
||||
"gethostname": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwuid": {},
|
||||
"getrlimit": {},
|
||||
"getrlimit64": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"gmtime": {},
|
||||
"gmtime_r": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"ioctlsocket": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isspace": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"lstrcmpiA": {},
|
||||
"lstrlenW": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"mmap64": {},
|
||||
"modf": {},
|
||||
"mremap": {},
|
||||
"munmap": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"open64": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"popen": {},
|
||||
"posix_fadvise": {},
|
||||
"pow": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"putenv": {},
|
||||
"puts": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setlocale": {},
|
||||
"setmode": {},
|
||||
"setrlimit": {},
|
||||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setvbuf": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strlen": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtol": {},
|
||||
"strtoul": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"timezone": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"ungetc": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"waitpid": {},
|
||||
"wcrtomb": {},
|
||||
"wcschr": {},
|
||||
"wcscmp": {},
|
||||
"wcscpy": {},
|
||||
"wcsicmp": {},
|
||||
"wcslen": {},
|
||||
"wcsncmp": {},
|
||||
"wcsrtombs": {},
|
||||
"wcstombs": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"wsprintfA": {},
|
||||
"wsprintfW": {},
|
||||
}
|
1751
vendor/modernc.org/libc/ccgo.go
generated
vendored
Normal file
1751
vendor/modernc.org/libc/ccgo.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
44
vendor/modernc.org/libc/dmesg.go
generated
vendored
Normal file
44
vendor/modernc.org/libc/dmesg.go
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
// Copyright 2020 The Libc Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build libc.dmesg
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
const dmesgs = true
|
||||
|
||||
var (
|
||||
pid = fmt.Sprintf("[%v %v] ", os.Getpid(), filepath.Base(os.Args[0]))
|
||||
logf *os.File
|
||||
)
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
if logf, err = os.OpenFile("/tmp/libc.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY|os.O_SYNC, 0644); err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
|
||||
dmesg("%v", time.Now())
|
||||
}
|
||||
|
||||
func dmesg(s string, args ...interface{}) {
|
||||
if s == "" {
|
||||
s = strings.Repeat("%v ", len(args))
|
||||
}
|
||||
s = fmt.Sprintf(pid+s, args...)
|
||||
switch {
|
||||
case len(s) != 0 && s[len(s)-1] == '\n':
|
||||
fmt.Fprint(logf, s)
|
||||
default:
|
||||
fmt.Fprintln(logf, s)
|
||||
}
|
||||
}
|
5
vendor/modernc.org/libc/errno/capi_darwin_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/errno/capi_darwin_amd64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/errno/capi_darwin_arm64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/errno/capi_darwin_arm64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_arm64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/errno/capi_linux_386.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/errno/capi_linux_386.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/errno/capi_linux_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/errno/capi_linux_amd64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/errno/capi_linux_arm.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/errno/capi_linux_arm.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/errno/capi_linux_arm64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/errno/capi_linux_arm64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/errno/capi_linux_s390x.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/errno/capi_linux_s390x.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_s390x.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/errno/capi_windows_386.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/errno/capi_windows_386.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/errno/capi_windows_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/errno/capi_windows_amd64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_windows_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
645
vendor/modernc.org/libc/errno/errno_darwin_amd64.go
generated
vendored
Normal file
645
vendor/modernc.org/libc/errno/errno_darwin_amd64.go
generated
vendored
Normal file
@ -0,0 +1,645 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
E2BIG = 7
|
||||
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
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
// file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_END@
|
||||
// Copyright (c) 2000-2012 Apple, Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
|
||||
// Copyright (c) 1982, 1986, 1989, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. 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.
|
||||
//
|
||||
// @(#)errno.h 8.5 (Berkeley) 1/21/94
|
||||
|
||||
// Copyright (c) 2000-2018 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright 1995 NeXT Computer, Inc. All rights reserved.
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. 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.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
|
||||
// This SDK is designed to work with clang and specific versions of
|
||||
// gcc >= 4.0 with Apple's patch sets
|
||||
|
||||
// Compatibility with compilers and environments that don't support compiler
|
||||
// feature checking function-like macros.
|
||||
|
||||
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
|
||||
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
|
||||
// The __CONCAT macro is a bit tricky -- make sure you don't put spaces
|
||||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
// __used forces variables and functions to be included even if it appears
|
||||
// to the compiler that they are not used (and would thust be discarded).
|
||||
|
||||
// __cold marks code used for debugging or that is rarely taken
|
||||
// and tells the compiler to optimize for size and outline code.
|
||||
|
||||
// __deprecated causes the compiler to produce a warning when encountering
|
||||
// code using the deprecated functionality.
|
||||
// __deprecated_msg() does the same, and compilers that support it will print
|
||||
// a message along with the deprecation warning.
|
||||
// This may require turning on such warning with the -Wdeprecated flag.
|
||||
// __deprecated_enum_msg() should be used on enums, and compilers that support
|
||||
// it will print the deprecation warning.
|
||||
// __kpi_deprecated() specifically indicates deprecation of kernel programming
|
||||
// interfaces in Kernel.framework used by KEXTs.
|
||||
|
||||
// __unavailable causes the compiler to error out when encountering
|
||||
// code using the tagged function of variable.
|
||||
|
||||
// Delete pseudo-keywords wherever they are not available or needed.
|
||||
|
||||
// We use `__restrict' as a way to define the `restrict' type qualifier
|
||||
// without disturbing older software that is unaware of C99 keywords.
|
||||
|
||||
// Compatibility with compilers and environments that don't support the
|
||||
// nullability feature.
|
||||
|
||||
// __disable_tail_calls causes the compiler to not perform tail call
|
||||
// optimization inside the marked function.
|
||||
|
||||
// __not_tail_called causes the compiler to prevent tail call optimization
|
||||
// on statically bound calls to the function. It has no effect on indirect
|
||||
// calls. Virtual functions, objective-c methods, and functions marked as
|
||||
// "always_inline" cannot be marked as __not_tail_called.
|
||||
|
||||
// __result_use_check warns callers of a function that not using the function
|
||||
// return value is a bug, i.e. dismissing malloc() return value results in a
|
||||
// memory leak.
|
||||
|
||||
// __swift_unavailable causes the compiler to mark a symbol as specifically
|
||||
// unavailable in Swift, regardless of any other availability in C.
|
||||
|
||||
// __abortlike is the attribute to put on functions like abort() that are
|
||||
// typically used to mark assertions. These optimize the codegen
|
||||
// for outlining while still maintaining debugability.
|
||||
|
||||
// Declaring inline functions within headers is error-prone due to differences
|
||||
// across various versions of the C language and extensions. __header_inline
|
||||
// can be used to declare inline functions within system headers. In cases
|
||||
// where you want to force inlining instead of letting the compiler make
|
||||
// the decision, you can use __header_always_inline.
|
||||
//
|
||||
// Be aware that using inline for functions which compilers may also provide
|
||||
// builtins can behave differently under various compilers. If you intend to
|
||||
// provide an inline version of such a function, you may want to use a macro
|
||||
// instead.
|
||||
//
|
||||
// The check for !__GNUC__ || __clang__ is because gcc doesn't correctly
|
||||
// support c99 inline in some cases:
|
||||
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55965
|
||||
|
||||
// Compiler-dependent macros that bracket portions of code where the
|
||||
// "-Wunreachable-code" warning should be ignored. Please use sparingly.
|
||||
|
||||
// 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. Functions declared
|
||||
// with these attributes will cause compilation warnings if there is a
|
||||
// mismatch between the format string and subsequent function parameter
|
||||
// types.
|
||||
|
||||
// Source compatibility only, ID string not emitted in object file
|
||||
|
||||
// __alloc_size can be used to label function arguments that represent the
|
||||
// size of memory that the function allocates and returns. The one-argument
|
||||
// form labels a single argument that gives the allocation size (where the
|
||||
// arguments are numbered from 1):
|
||||
//
|
||||
// void *malloc(size_t __size) __alloc_size(1);
|
||||
//
|
||||
// The two-argument form handles the case where the size is calculated as the
|
||||
// product of two arguments:
|
||||
//
|
||||
// void *calloc(size_t __count, size_t __size) __alloc_size(1,2);
|
||||
|
||||
// COMPILATION ENVIRONMENTS -- see compat(5) for additional detail
|
||||
//
|
||||
// DEFAULT By default newly complied code will get POSIX APIs plus
|
||||
// Apple API extensions in scope.
|
||||
//
|
||||
// Most users will use this compilation environment to avoid
|
||||
// behavioral differences between 32 and 64 bit code.
|
||||
//
|
||||
// LEGACY Defining _NONSTD_SOURCE will get pre-POSIX APIs plus Apple
|
||||
// API extensions in scope.
|
||||
//
|
||||
// This is generally equivalent to the Tiger release compilation
|
||||
// environment, except that it cannot be applied to 64 bit code;
|
||||
// its use is discouraged.
|
||||
//
|
||||
// We expect this environment to be deprecated in the future.
|
||||
//
|
||||
// STRICT Defining _POSIX_C_SOURCE or _XOPEN_SOURCE restricts the
|
||||
// available APIs to exactly the set of APIs defined by the
|
||||
// corresponding standard, based on the value defined.
|
||||
//
|
||||
// A correct, portable definition for _POSIX_C_SOURCE is 200112L.
|
||||
// A correct, portable definition for _XOPEN_SOURCE is 600L.
|
||||
//
|
||||
// Apple API extensions are not visible in this environment,
|
||||
// which can cause Apple specific code to fail to compile,
|
||||
// or behave incorrectly if prototypes are not in scope or
|
||||
// warnings about missing prototypes are not enabled or ignored.
|
||||
//
|
||||
// In any compilation environment, for correct symbol resolution to occur,
|
||||
// function prototypes must be in scope. It is recommended that all Apple
|
||||
// tools users add either the "-Wall" or "-Wimplicit-function-declaration"
|
||||
// compiler flags to their projects to be warned when a function is being
|
||||
// used without a prototype in scope.
|
||||
|
||||
// These settings are particular to each product.
|
||||
// Platform: MacOSX
|
||||
// #undef __DARWIN_ONLY_UNIX_CONFORMANCE (automatically set for 64-bit)
|
||||
|
||||
// The __DARWIN_ALIAS macros are used to do symbol renaming; they allow
|
||||
// legacy code to use the old symbol, thus maintaining binary compatibility
|
||||
// while new code can use a standards compliant version of the same function.
|
||||
//
|
||||
// __DARWIN_ALIAS is used by itself if the function signature has not
|
||||
// changed, it is used along with a #ifdef check for __DARWIN_UNIX03
|
||||
// if the signature has changed. Because the __LP64__ environment
|
||||
// only supports UNIX03 semantics it causes __DARWIN_UNIX03 to be
|
||||
// defined, but causes __DARWIN_ALIAS to do no symbol mangling.
|
||||
//
|
||||
// As a special case, when XCode is used to target a specific version of the
|
||||
// OS, the manifest constant __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
|
||||
// will be defined by the compiler, with the digits representing major version
|
||||
// time 100 + minor version times 10 (e.g. 10.5 := 1050). If we are targeting
|
||||
// pre-10.5, and it is the default compilation environment, revert the
|
||||
// compilation environment to pre-__DARWIN_UNIX03.
|
||||
|
||||
// symbol suffixes used for symbol versioning
|
||||
|
||||
// symbol versioning macros
|
||||
|
||||
// symbol release macros
|
||||
// Copyright (c) 2010 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
// POSIX.1 requires that the macros we test be defined before any standard
|
||||
// header file is included. This permits us to convert values for feature
|
||||
// testing, as necessary, using only _POSIX_C_SOURCE.
|
||||
//
|
||||
// Here's a quick run-down of the versions:
|
||||
// defined(_POSIX_SOURCE) 1003.1-1988
|
||||
// _POSIX_C_SOURCE == 1L 1003.1-1990
|
||||
// _POSIX_C_SOURCE == 2L 1003.2-1992 C Language Binding Option
|
||||
// _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
|
||||
//
|
||||
// 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.
|
||||
|
||||
// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1L.
|
||||
|
||||
// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2L.
|
||||
|
||||
// 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.
|
||||
|
||||
// POSIX C deprecation macros
|
||||
// Copyright (c) 2010 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
// Set a single macro which will always be defined and can be used to determine
|
||||
// the appropriate namespace. For POSIX, these values will correspond to
|
||||
// _POSIX_C_SOURCE value. Currently there are two additional levels corresponding
|
||||
// to ANSI (_ANSI_SOURCE) and Darwin extensions (_DARWIN_C_SOURCE)
|
||||
|
||||
// If the developer has neither requested a strict language mode nor a version
|
||||
// of POSIX, turn on functionality provided by __STDC_WANT_LIB_EXT1__ as part
|
||||
// of __DARWIN_C_FULL.
|
||||
|
||||
// long long is not supported in c89 (__STRICT_ANSI__), but g++ -ansi and
|
||||
// c99 still want long longs. While not perfect, we allow long longs for
|
||||
// g++.
|
||||
|
||||
// ****************************************
|
||||
//
|
||||
// Public darwin-specific feature macros
|
||||
//
|
||||
|
||||
// _DARWIN_FEATURE_64_BIT_INODE indicates that the ino_t type is 64-bit, and
|
||||
// structures modified for 64-bit inodes (like struct stat) will be used.
|
||||
|
||||
// _DARWIN_FEATURE_64_ONLY_BIT_INODE indicates that the ino_t type may only
|
||||
// be 64-bit; there is no support for 32-bit ino_t when this macro is defined
|
||||
// (and non-zero). There is no struct stat64 either, as the regular
|
||||
// struct stat will already be the 64-bit version.
|
||||
|
||||
// _DARWIN_FEATURE_ONLY_VERS_1050 indicates that only those APIs updated
|
||||
// in 10.5 exists; no pre-10.5 variants are available.
|
||||
|
||||
// _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE indicates only UNIX conforming API
|
||||
// are available (the legacy BSD APIs are not available)
|
||||
|
||||
// _DARWIN_FEATURE_UNIX_CONFORMANCE indicates whether UNIX conformance is on,
|
||||
// and specifies the conformance level (3 is SUSv3)
|
||||
|
||||
// This macro casts away the qualifier from the variable
|
||||
//
|
||||
// Note: use at your own risk, removing qualifiers can result in
|
||||
// catastrophic run-time failures.
|
||||
|
||||
// __XNU_PRIVATE_EXTERN is a linkage decoration indicating that a symbol can be
|
||||
// used from other compilation units, but not other libraries or executables.
|
||||
|
||||
// Architecture validation for current SDK
|
||||
|
||||
// Similar to OS_ENUM/OS_CLOSED_ENUM/OS_OPTIONS/OS_CLOSED_OPTIONS
|
||||
//
|
||||
// This provides more advanced type checking on compilers supporting
|
||||
// the proper extensions, even in C.
|
||||
|
||||
// Copyright (c) 2003-2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
type Errno_t = int32 /* _errno_t.h:30:32 */
|
||||
|
||||
// Error codes
|
||||
|
||||
// 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
|
||||
|
||||
// Intelligent device errors
|
||||
|
||||
// Program loading errors
|
||||
|
||||
// This value is only discrete when compiling __DARWIN_UNIX03, or KERNEL
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
651
vendor/modernc.org/libc/errno/errno_darwin_arm64.go
generated
vendored
Normal file
651
vendor/modernc.org/libc/errno/errno_darwin_arm64.go
generated
vendored
Normal file
@ -0,0 +1,651 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_arm64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
E2BIG = 7
|
||||
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_64_BIT_INODE = 1
|
||||
X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1
|
||||
X_DARWIN_FEATURE_ONLY_VERS_1050 = 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
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
// file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_END@
|
||||
// Copyright (c) 2000-2012 Apple, Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
|
||||
// Copyright (c) 1982, 1986, 1989, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. 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.
|
||||
//
|
||||
// @(#)errno.h 8.5 (Berkeley) 1/21/94
|
||||
|
||||
// Copyright (c) 2000-2018 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright 1995 NeXT Computer, Inc. All rights reserved.
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. 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.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
|
||||
// This SDK is designed to work with clang and specific versions of
|
||||
// gcc >= 4.0 with Apple's patch sets
|
||||
|
||||
// Compatibility with compilers and environments that don't support compiler
|
||||
// feature checking function-like macros.
|
||||
|
||||
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
|
||||
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
|
||||
// The __CONCAT macro is a bit tricky -- make sure you don't put spaces
|
||||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
// __used forces variables and functions to be included even if it appears
|
||||
// to the compiler that they are not used (and would thust be discarded).
|
||||
|
||||
// __cold marks code used for debugging or that is rarely taken
|
||||
// and tells the compiler to optimize for size and outline code.
|
||||
|
||||
// __exported denotes symbols that should be exported even when symbols
|
||||
// are hidden by default.
|
||||
// __exported_push/_exported_pop are pragmas used to delimit a range of
|
||||
// symbols that should be exported even when symbols are hidden by default.
|
||||
|
||||
// __deprecated causes the compiler to produce a warning when encountering
|
||||
// code using the deprecated functionality.
|
||||
// __deprecated_msg() does the same, and compilers that support it will print
|
||||
// a message along with the deprecation warning.
|
||||
// This may require turning on such warning with the -Wdeprecated flag.
|
||||
// __deprecated_enum_msg() should be used on enums, and compilers that support
|
||||
// it will print the deprecation warning.
|
||||
// __kpi_deprecated() specifically indicates deprecation of kernel programming
|
||||
// interfaces in Kernel.framework used by KEXTs.
|
||||
|
||||
// __unavailable causes the compiler to error out when encountering
|
||||
// code using the tagged function
|
||||
|
||||
// Delete pseudo-keywords wherever they are not available or needed.
|
||||
|
||||
// We use `__restrict' as a way to define the `restrict' type qualifier
|
||||
// without disturbing older software that is unaware of C99 keywords.
|
||||
|
||||
// Compatibility with compilers and environments that don't support the
|
||||
// nullability feature.
|
||||
|
||||
// __disable_tail_calls causes the compiler to not perform tail call
|
||||
// optimization inside the marked function.
|
||||
|
||||
// __not_tail_called causes the compiler to prevent tail call optimization
|
||||
// on statically bound calls to the function. It has no effect on indirect
|
||||
// calls. Virtual functions, objective-c methods, and functions marked as
|
||||
// "always_inline" cannot be marked as __not_tail_called.
|
||||
|
||||
// __result_use_check warns callers of a function that not using the function
|
||||
// return value is a bug, i.e. dismissing malloc() return value results in a
|
||||
// memory leak.
|
||||
|
||||
// __swift_unavailable causes the compiler to mark a symbol as specifically
|
||||
// unavailable in Swift, regardless of any other availability in C.
|
||||
|
||||
// __abortlike is the attribute to put on functions like abort() that are
|
||||
// typically used to mark assertions. These optimize the codegen
|
||||
// for outlining while still maintaining debugability.
|
||||
|
||||
// Declaring inline functions within headers is error-prone due to differences
|
||||
// across various versions of the C language and extensions. __header_inline
|
||||
// can be used to declare inline functions within system headers. In cases
|
||||
// where you want to force inlining instead of letting the compiler make
|
||||
// the decision, you can use __header_always_inline.
|
||||
//
|
||||
// Be aware that using inline for functions which compilers may also provide
|
||||
// builtins can behave differently under various compilers. If you intend to
|
||||
// provide an inline version of such a function, you may want to use a macro
|
||||
// instead.
|
||||
//
|
||||
// The check for !__GNUC__ || __clang__ is because gcc doesn't correctly
|
||||
// support c99 inline in some cases:
|
||||
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55965
|
||||
|
||||
// Compiler-dependent macros that bracket portions of code where the
|
||||
// "-Wunreachable-code" warning should be ignored. Please use sparingly.
|
||||
|
||||
// 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. Functions declared
|
||||
// with these attributes will cause compilation warnings if there is a
|
||||
// mismatch between the format string and subsequent function parameter
|
||||
// types.
|
||||
|
||||
// Source compatibility only, ID string not emitted in object file
|
||||
|
||||
// __alloc_size can be used to label function arguments that represent the
|
||||
// size of memory that the function allocates and returns. The one-argument
|
||||
// form labels a single argument that gives the allocation size (where the
|
||||
// arguments are numbered from 1):
|
||||
//
|
||||
// void *malloc(size_t __size) __alloc_size(1);
|
||||
//
|
||||
// The two-argument form handles the case where the size is calculated as the
|
||||
// product of two arguments:
|
||||
//
|
||||
// void *calloc(size_t __count, size_t __size) __alloc_size(1,2);
|
||||
|
||||
// COMPILATION ENVIRONMENTS -- see compat(5) for additional detail
|
||||
//
|
||||
// DEFAULT By default newly complied code will get POSIX APIs plus
|
||||
// Apple API extensions in scope.
|
||||
//
|
||||
// Most users will use this compilation environment to avoid
|
||||
// behavioral differences between 32 and 64 bit code.
|
||||
//
|
||||
// LEGACY Defining _NONSTD_SOURCE will get pre-POSIX APIs plus Apple
|
||||
// API extensions in scope.
|
||||
//
|
||||
// This is generally equivalent to the Tiger release compilation
|
||||
// environment, except that it cannot be applied to 64 bit code;
|
||||
// its use is discouraged.
|
||||
//
|
||||
// We expect this environment to be deprecated in the future.
|
||||
//
|
||||
// STRICT Defining _POSIX_C_SOURCE or _XOPEN_SOURCE restricts the
|
||||
// available APIs to exactly the set of APIs defined by the
|
||||
// corresponding standard, based on the value defined.
|
||||
//
|
||||
// A correct, portable definition for _POSIX_C_SOURCE is 200112L.
|
||||
// A correct, portable definition for _XOPEN_SOURCE is 600L.
|
||||
//
|
||||
// Apple API extensions are not visible in this environment,
|
||||
// which can cause Apple specific code to fail to compile,
|
||||
// or behave incorrectly if prototypes are not in scope or
|
||||
// warnings about missing prototypes are not enabled or ignored.
|
||||
//
|
||||
// In any compilation environment, for correct symbol resolution to occur,
|
||||
// function prototypes must be in scope. It is recommended that all Apple
|
||||
// tools users add either the "-Wall" or "-Wimplicit-function-declaration"
|
||||
// compiler flags to their projects to be warned when a function is being
|
||||
// used without a prototype in scope.
|
||||
|
||||
// These settings are particular to each product.
|
||||
// Platform: MacOSX
|
||||
|
||||
// The __DARWIN_ALIAS macros are used to do symbol renaming; they allow
|
||||
// legacy code to use the old symbol, thus maintaining binary compatibility
|
||||
// while new code can use a standards compliant version of the same function.
|
||||
//
|
||||
// __DARWIN_ALIAS is used by itself if the function signature has not
|
||||
// changed, it is used along with a #ifdef check for __DARWIN_UNIX03
|
||||
// if the signature has changed. Because the __LP64__ environment
|
||||
// only supports UNIX03 semantics it causes __DARWIN_UNIX03 to be
|
||||
// defined, but causes __DARWIN_ALIAS to do no symbol mangling.
|
||||
//
|
||||
// As a special case, when XCode is used to target a specific version of the
|
||||
// OS, the manifest constant __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
|
||||
// will be defined by the compiler, with the digits representing major version
|
||||
// time 100 + minor version times 10 (e.g. 10.5 := 1050). If we are targeting
|
||||
// pre-10.5, and it is the default compilation environment, revert the
|
||||
// compilation environment to pre-__DARWIN_UNIX03.
|
||||
|
||||
// symbol suffixes used for symbol versioning
|
||||
|
||||
// symbol versioning macros
|
||||
|
||||
// symbol release macros
|
||||
// Copyright (c) 2010 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
// POSIX.1 requires that the macros we test be defined before any standard
|
||||
// header file is included. This permits us to convert values for feature
|
||||
// testing, as necessary, using only _POSIX_C_SOURCE.
|
||||
//
|
||||
// Here's a quick run-down of the versions:
|
||||
// defined(_POSIX_SOURCE) 1003.1-1988
|
||||
// _POSIX_C_SOURCE == 1L 1003.1-1990
|
||||
// _POSIX_C_SOURCE == 2L 1003.2-1992 C Language Binding Option
|
||||
// _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
|
||||
//
|
||||
// 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.
|
||||
|
||||
// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1L.
|
||||
|
||||
// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2L.
|
||||
|
||||
// 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.
|
||||
|
||||
// POSIX C deprecation macros
|
||||
// Copyright (c) 2010 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
// Set a single macro which will always be defined and can be used to determine
|
||||
// the appropriate namespace. For POSIX, these values will correspond to
|
||||
// _POSIX_C_SOURCE value. Currently there are two additional levels corresponding
|
||||
// to ANSI (_ANSI_SOURCE) and Darwin extensions (_DARWIN_C_SOURCE)
|
||||
|
||||
// If the developer has neither requested a strict language mode nor a version
|
||||
// of POSIX, turn on functionality provided by __STDC_WANT_LIB_EXT1__ as part
|
||||
// of __DARWIN_C_FULL.
|
||||
|
||||
// long long is not supported in c89 (__STRICT_ANSI__), but g++ -ansi and
|
||||
// c99 still want long longs. While not perfect, we allow long longs for
|
||||
// g++.
|
||||
|
||||
// ****************************************
|
||||
//
|
||||
// Public darwin-specific feature macros
|
||||
//
|
||||
|
||||
// _DARWIN_FEATURE_64_BIT_INODE indicates that the ino_t type is 64-bit, and
|
||||
// structures modified for 64-bit inodes (like struct stat) will be used.
|
||||
|
||||
// _DARWIN_FEATURE_64_ONLY_BIT_INODE indicates that the ino_t type may only
|
||||
// be 64-bit; there is no support for 32-bit ino_t when this macro is defined
|
||||
// (and non-zero). There is no struct stat64 either, as the regular
|
||||
// struct stat will already be the 64-bit version.
|
||||
|
||||
// _DARWIN_FEATURE_ONLY_VERS_1050 indicates that only those APIs updated
|
||||
// in 10.5 exists; no pre-10.5 variants are available.
|
||||
|
||||
// _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE indicates only UNIX conforming API
|
||||
// are available (the legacy BSD APIs are not available)
|
||||
|
||||
// _DARWIN_FEATURE_UNIX_CONFORMANCE indicates whether UNIX conformance is on,
|
||||
// and specifies the conformance level (3 is SUSv3)
|
||||
|
||||
// This macro casts away the qualifier from the variable
|
||||
//
|
||||
// Note: use at your own risk, removing qualifiers can result in
|
||||
// catastrophic run-time failures.
|
||||
|
||||
// __XNU_PRIVATE_EXTERN is a linkage decoration indicating that a symbol can be
|
||||
// used from other compilation units, but not other libraries or executables.
|
||||
|
||||
// Architecture validation for current SDK
|
||||
|
||||
// Similar to OS_ENUM/OS_CLOSED_ENUM/OS_OPTIONS/OS_CLOSED_OPTIONS
|
||||
//
|
||||
// This provides more advanced type checking on compilers supporting
|
||||
// the proper extensions, even in C.
|
||||
|
||||
// Copyright (c) 2003-2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
type Errno_t = int32 /* _errno_t.h:30:32 */
|
||||
|
||||
// Error codes
|
||||
|
||||
// 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
|
||||
|
||||
// Intelligent device errors
|
||||
|
||||
// Program loading errors
|
||||
|
||||
// This value is only discrete when compiling __DARWIN_UNIX03, or KERNEL
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
178
vendor/modernc.org/libc/errno/errno_linux_386.go
generated
vendored
Normal file
178
vendor/modernc.org/libc/errno/errno_linux_386.go
generated
vendored
Normal file
@ -0,0 +1,178 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
E2BIG = 7
|
||||
EACCES = 13
|
||||
EADDRINUSE = 98
|
||||
EADDRNOTAVAIL = 99
|
||||
EADV = 68
|
||||
EAFNOSUPPORT = 97
|
||||
EAGAIN = 11
|
||||
EALREADY = 114
|
||||
EBADE = 52
|
||||
EBADF = 9
|
||||
EBADFD = 77
|
||||
EBADMSG = 74
|
||||
EBADR = 53
|
||||
EBADRQC = 56
|
||||
EBADSLT = 57
|
||||
EBFONT = 59
|
||||
EBUSY = 16
|
||||
ECANCELED = 125
|
||||
ECHILD = 10
|
||||
ECHRNG = 44
|
||||
ECOMM = 70
|
||||
ECONNABORTED = 103
|
||||
ECONNREFUSED = 111
|
||||
ECONNRESET = 104
|
||||
EDEADLK = 35
|
||||
EDEADLOCK = 35
|
||||
EDESTADDRREQ = 89
|
||||
EDOM = 33
|
||||
EDOTDOT = 73
|
||||
EDQUOT = 122
|
||||
EEXIST = 17
|
||||
EFAULT = 14
|
||||
EFBIG = 27
|
||||
EHOSTDOWN = 112
|
||||
EHOSTUNREACH = 113
|
||||
EHWPOISON = 133
|
||||
EIDRM = 43
|
||||
EILSEQ = 84
|
||||
EINPROGRESS = 115
|
||||
EINTR = 4
|
||||
EINVAL = 22
|
||||
EIO = 5
|
||||
EISCONN = 106
|
||||
EISDIR = 21
|
||||
EISNAM = 120
|
||||
EKEYEXPIRED = 127
|
||||
EKEYREJECTED = 129
|
||||
EKEYREVOKED = 128
|
||||
EL2HLT = 51
|
||||
EL2NSYNC = 45
|
||||
EL3HLT = 46
|
||||
EL3RST = 47
|
||||
ELIBACC = 79
|
||||
ELIBBAD = 80
|
||||
ELIBEXEC = 83
|
||||
ELIBMAX = 82
|
||||
ELIBSCN = 81
|
||||
ELNRNG = 48
|
||||
ELOOP = 40
|
||||
EMEDIUMTYPE = 124
|
||||
EMFILE = 24
|
||||
EMLINK = 31
|
||||
EMSGSIZE = 90
|
||||
EMULTIHOP = 72
|
||||
ENAMETOOLONG = 36
|
||||
ENAVAIL = 119
|
||||
ENETDOWN = 100
|
||||
ENETRESET = 102
|
||||
ENETUNREACH = 101
|
||||
ENFILE = 23
|
||||
ENOANO = 55
|
||||
ENOBUFS = 105
|
||||
ENOCSI = 50
|
||||
ENODATA = 61
|
||||
ENODEV = 19
|
||||
ENOENT = 2
|
||||
ENOEXEC = 8
|
||||
ENOKEY = 126
|
||||
ENOLCK = 37
|
||||
ENOLINK = 67
|
||||
ENOMEDIUM = 123
|
||||
ENOMEM = 12
|
||||
ENOMSG = 42
|
||||
ENONET = 64
|
||||
ENOPKG = 65
|
||||
ENOPROTOOPT = 92
|
||||
ENOSPC = 28
|
||||
ENOSR = 63
|
||||
ENOSTR = 60
|
||||
ENOSYS = 38
|
||||
ENOTBLK = 15
|
||||
ENOTCONN = 107
|
||||
ENOTDIR = 20
|
||||
ENOTEMPTY = 39
|
||||
ENOTNAM = 118
|
||||
ENOTRECOVERABLE = 131
|
||||
ENOTSOCK = 88
|
||||
ENOTSUP = 95
|
||||
ENOTTY = 25
|
||||
ENOTUNIQ = 76
|
||||
ENXIO = 6
|
||||
EOPNOTSUPP = 95
|
||||
EOVERFLOW = 75
|
||||
EOWNERDEAD = 130
|
||||
EPERM = 1
|
||||
EPFNOSUPPORT = 96
|
||||
EPIPE = 32
|
||||
EPROTO = 71
|
||||
EPROTONOSUPPORT = 93
|
||||
EPROTOTYPE = 91
|
||||
ERANGE = 34
|
||||
EREMCHG = 78
|
||||
EREMOTE = 66
|
||||
EREMOTEIO = 121
|
||||
ERESTART = 85
|
||||
ERFKILL = 132
|
||||
EROFS = 30
|
||||
ESHUTDOWN = 108
|
||||
ESOCKTNOSUPPORT = 94
|
||||
ESPIPE = 29
|
||||
ESRCH = 3
|
||||
ESRMNT = 69
|
||||
ESTALE = 116
|
||||
ESTRPIPE = 86
|
||||
ETIME = 62
|
||||
ETIMEDOUT = 110
|
||||
ETOOMANYREFS = 109
|
||||
ETXTBSY = 26
|
||||
EUCLEAN = 117
|
||||
EUNATCH = 49
|
||||
EUSERS = 87
|
||||
EWOULDBLOCK = 11
|
||||
EXDEV = 18
|
||||
EXFULL = 54
|
||||
X_ASM_GENERIC_ERRNO_BASE_H = 0
|
||||
X_ASM_GENERIC_ERRNO_H = 0
|
||||
X_ATFILE_SOURCE = 1
|
||||
X_BITS_ERRNO_H = 1
|
||||
X_DEFAULT_SOURCE = 1
|
||||
X_ERRNO_H = 1
|
||||
X_FEATURES_H = 1
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_POSIX_C_SOURCE = 200809
|
||||
X_POSIX_SOURCE = 1
|
||||
X_STDC_PREDEF_H = 1
|
||||
X_SYS_CDEFS_H = 1
|
||||
I386 = 1
|
||||
Linux = 1
|
||||
Unix = 1
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint32 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
187
vendor/modernc.org/libc/errno/errno_linux_amd64.go
generated
vendored
Normal file
187
vendor/modernc.org/libc/errno/errno_linux_amd64.go
generated
vendored
Normal file
@ -0,0 +1,187 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
E2BIG = 7
|
||||
EACCES = 13
|
||||
EADDRINUSE = 98
|
||||
EADDRNOTAVAIL = 99
|
||||
EADV = 68
|
||||
EAFNOSUPPORT = 97
|
||||
EAGAIN = 11
|
||||
EALREADY = 114
|
||||
EBADE = 52
|
||||
EBADF = 9
|
||||
EBADFD = 77
|
||||
EBADMSG = 74
|
||||
EBADR = 53
|
||||
EBADRQC = 56
|
||||
EBADSLT = 57
|
||||
EBFONT = 59
|
||||
EBUSY = 16
|
||||
ECANCELED = 125
|
||||
ECHILD = 10
|
||||
ECHRNG = 44
|
||||
ECOMM = 70
|
||||
ECONNABORTED = 103
|
||||
ECONNREFUSED = 111
|
||||
ECONNRESET = 104
|
||||
EDEADLK = 35
|
||||
EDEADLOCK = 35
|
||||
EDESTADDRREQ = 89
|
||||
EDOM = 33
|
||||
EDOTDOT = 73
|
||||
EDQUOT = 122
|
||||
EEXIST = 17
|
||||
EFAULT = 14
|
||||
EFBIG = 27
|
||||
EHOSTDOWN = 112
|
||||
EHOSTUNREACH = 113
|
||||
EHWPOISON = 133
|
||||
EIDRM = 43
|
||||
EILSEQ = 84
|
||||
EINPROGRESS = 115
|
||||
EINTR = 4
|
||||
EINVAL = 22
|
||||
EIO = 5
|
||||
EISCONN = 106
|
||||
EISDIR = 21
|
||||
EISNAM = 120
|
||||
EKEYEXPIRED = 127
|
||||
EKEYREJECTED = 129
|
||||
EKEYREVOKED = 128
|
||||
EL2HLT = 51
|
||||
EL2NSYNC = 45
|
||||
EL3HLT = 46
|
||||
EL3RST = 47
|
||||
ELIBACC = 79
|
||||
ELIBBAD = 80
|
||||
ELIBEXEC = 83
|
||||
ELIBMAX = 82
|
||||
ELIBSCN = 81
|
||||
ELNRNG = 48
|
||||
ELOOP = 40
|
||||
EMEDIUMTYPE = 124
|
||||
EMFILE = 24
|
||||
EMLINK = 31
|
||||
EMSGSIZE = 90
|
||||
EMULTIHOP = 72
|
||||
ENAMETOOLONG = 36
|
||||
ENAVAIL = 119
|
||||
ENETDOWN = 100
|
||||
ENETRESET = 102
|
||||
ENETUNREACH = 101
|
||||
ENFILE = 23
|
||||
ENOANO = 55
|
||||
ENOBUFS = 105
|
||||
ENOCSI = 50
|
||||
ENODATA = 61
|
||||
ENODEV = 19
|
||||
ENOENT = 2
|
||||
ENOEXEC = 8
|
||||
ENOKEY = 126
|
||||
ENOLCK = 37
|
||||
ENOLINK = 67
|
||||
ENOMEDIUM = 123
|
||||
ENOMEM = 12
|
||||
ENOMSG = 42
|
||||
ENONET = 64
|
||||
ENOPKG = 65
|
||||
ENOPROTOOPT = 92
|
||||
ENOSPC = 28
|
||||
ENOSR = 63
|
||||
ENOSTR = 60
|
||||
ENOSYS = 38
|
||||
ENOTBLK = 15
|
||||
ENOTCONN = 107
|
||||
ENOTDIR = 20
|
||||
ENOTEMPTY = 39
|
||||
ENOTNAM = 118
|
||||
ENOTRECOVERABLE = 131
|
||||
ENOTSOCK = 88
|
||||
ENOTSUP = 95
|
||||
ENOTTY = 25
|
||||
ENOTUNIQ = 76
|
||||
ENXIO = 6
|
||||
EOPNOTSUPP = 95
|
||||
EOVERFLOW = 75
|
||||
EOWNERDEAD = 130
|
||||
EPERM = 1
|
||||
EPFNOSUPPORT = 96
|
||||
EPIPE = 32
|
||||
EPROTO = 71
|
||||
EPROTONOSUPPORT = 93
|
||||
EPROTOTYPE = 91
|
||||
ERANGE = 34
|
||||
EREMCHG = 78
|
||||
EREMOTE = 66
|
||||
EREMOTEIO = 121
|
||||
ERESTART = 85
|
||||
ERFKILL = 132
|
||||
EROFS = 30
|
||||
ESHUTDOWN = 108
|
||||
ESOCKTNOSUPPORT = 94
|
||||
ESPIPE = 29
|
||||
ESRCH = 3
|
||||
ESRMNT = 69
|
||||
ESTALE = 116
|
||||
ESTRPIPE = 86
|
||||
ETIME = 62
|
||||
ETIMEDOUT = 110
|
||||
ETOOMANYREFS = 109
|
||||
ETXTBSY = 26
|
||||
EUCLEAN = 117
|
||||
EUNATCH = 49
|
||||
EUSERS = 87
|
||||
EWOULDBLOCK = 11
|
||||
EXDEV = 18
|
||||
EXFULL = 54
|
||||
X_ASM_GENERIC_ERRNO_BASE_H = 0
|
||||
X_ASM_GENERIC_ERRNO_H = 0
|
||||
X_ATFILE_SOURCE = 1
|
||||
X_BITS_ERRNO_H = 1
|
||||
X_DEFAULT_SOURCE = 1
|
||||
X_ERRNO_H = 1
|
||||
X_FEATURES_H = 1
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_LP64 = 1
|
||||
X_POSIX_C_SOURCE = 200809
|
||||
X_POSIX_SOURCE = 1
|
||||
X_STDC_PREDEF_H = 1
|
||||
X_SYS_CDEFS_H = 1
|
||||
Linux = 1
|
||||
Unix = 1
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
177
vendor/modernc.org/libc/errno/errno_linux_arm.go
generated
vendored
Normal file
177
vendor/modernc.org/libc/errno/errno_linux_arm.go
generated
vendored
Normal file
@ -0,0 +1,177 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
E2BIG = 7
|
||||
EACCES = 13
|
||||
EADDRINUSE = 98
|
||||
EADDRNOTAVAIL = 99
|
||||
EADV = 68
|
||||
EAFNOSUPPORT = 97
|
||||
EAGAIN = 11
|
||||
EALREADY = 114
|
||||
EBADE = 52
|
||||
EBADF = 9
|
||||
EBADFD = 77
|
||||
EBADMSG = 74
|
||||
EBADR = 53
|
||||
EBADRQC = 56
|
||||
EBADSLT = 57
|
||||
EBFONT = 59
|
||||
EBUSY = 16
|
||||
ECANCELED = 125
|
||||
ECHILD = 10
|
||||
ECHRNG = 44
|
||||
ECOMM = 70
|
||||
ECONNABORTED = 103
|
||||
ECONNREFUSED = 111
|
||||
ECONNRESET = 104
|
||||
EDEADLK = 35
|
||||
EDEADLOCK = 35
|
||||
EDESTADDRREQ = 89
|
||||
EDOM = 33
|
||||
EDOTDOT = 73
|
||||
EDQUOT = 122
|
||||
EEXIST = 17
|
||||
EFAULT = 14
|
||||
EFBIG = 27
|
||||
EHOSTDOWN = 112
|
||||
EHOSTUNREACH = 113
|
||||
EHWPOISON = 133
|
||||
EIDRM = 43
|
||||
EILSEQ = 84
|
||||
EINPROGRESS = 115
|
||||
EINTR = 4
|
||||
EINVAL = 22
|
||||
EIO = 5
|
||||
EISCONN = 106
|
||||
EISDIR = 21
|
||||
EISNAM = 120
|
||||
EKEYEXPIRED = 127
|
||||
EKEYREJECTED = 129
|
||||
EKEYREVOKED = 128
|
||||
EL2HLT = 51
|
||||
EL2NSYNC = 45
|
||||
EL3HLT = 46
|
||||
EL3RST = 47
|
||||
ELIBACC = 79
|
||||
ELIBBAD = 80
|
||||
ELIBEXEC = 83
|
||||
ELIBMAX = 82
|
||||
ELIBSCN = 81
|
||||
ELNRNG = 48
|
||||
ELOOP = 40
|
||||
EMEDIUMTYPE = 124
|
||||
EMFILE = 24
|
||||
EMLINK = 31
|
||||
EMSGSIZE = 90
|
||||
EMULTIHOP = 72
|
||||
ENAMETOOLONG = 36
|
||||
ENAVAIL = 119
|
||||
ENETDOWN = 100
|
||||
ENETRESET = 102
|
||||
ENETUNREACH = 101
|
||||
ENFILE = 23
|
||||
ENOANO = 55
|
||||
ENOBUFS = 105
|
||||
ENOCSI = 50
|
||||
ENODATA = 61
|
||||
ENODEV = 19
|
||||
ENOENT = 2
|
||||
ENOEXEC = 8
|
||||
ENOKEY = 126
|
||||
ENOLCK = 37
|
||||
ENOLINK = 67
|
||||
ENOMEDIUM = 123
|
||||
ENOMEM = 12
|
||||
ENOMSG = 42
|
||||
ENONET = 64
|
||||
ENOPKG = 65
|
||||
ENOPROTOOPT = 92
|
||||
ENOSPC = 28
|
||||
ENOSR = 63
|
||||
ENOSTR = 60
|
||||
ENOSYS = 38
|
||||
ENOTBLK = 15
|
||||
ENOTCONN = 107
|
||||
ENOTDIR = 20
|
||||
ENOTEMPTY = 39
|
||||
ENOTNAM = 118
|
||||
ENOTRECOVERABLE = 131
|
||||
ENOTSOCK = 88
|
||||
ENOTSUP = 95
|
||||
ENOTTY = 25
|
||||
ENOTUNIQ = 76
|
||||
ENXIO = 6
|
||||
EOPNOTSUPP = 95
|
||||
EOVERFLOW = 75
|
||||
EOWNERDEAD = 130
|
||||
EPERM = 1
|
||||
EPFNOSUPPORT = 96
|
||||
EPIPE = 32
|
||||
EPROTO = 71
|
||||
EPROTONOSUPPORT = 93
|
||||
EPROTOTYPE = 91
|
||||
ERANGE = 34
|
||||
EREMCHG = 78
|
||||
EREMOTE = 66
|
||||
EREMOTEIO = 121
|
||||
ERESTART = 85
|
||||
ERFKILL = 132
|
||||
EROFS = 30
|
||||
ESHUTDOWN = 108
|
||||
ESOCKTNOSUPPORT = 94
|
||||
ESPIPE = 29
|
||||
ESRCH = 3
|
||||
ESRMNT = 69
|
||||
ESTALE = 116
|
||||
ESTRPIPE = 86
|
||||
ETIME = 62
|
||||
ETIMEDOUT = 110
|
||||
ETOOMANYREFS = 109
|
||||
ETXTBSY = 26
|
||||
EUCLEAN = 117
|
||||
EUNATCH = 49
|
||||
EUSERS = 87
|
||||
EWOULDBLOCK = 11
|
||||
EXDEV = 18
|
||||
EXFULL = 54
|
||||
X_ASM_GENERIC_ERRNO_BASE_H = 0
|
||||
X_ASM_GENERIC_ERRNO_H = 0
|
||||
X_ATFILE_SOURCE = 1
|
||||
X_BITS_ERRNO_H = 1
|
||||
X_DEFAULT_SOURCE = 1
|
||||
X_ERRNO_H = 1
|
||||
X_FEATURES_H = 1
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_POSIX_C_SOURCE = 200809
|
||||
X_POSIX_SOURCE = 1
|
||||
X_STDC_PREDEF_H = 1
|
||||
X_SYS_CDEFS_H = 1
|
||||
Linux = 1
|
||||
Unix = 1
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint32 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = uint32 /* <builtin>:15:24 */
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
187
vendor/modernc.org/libc/errno/errno_linux_arm64.go
generated
vendored
Normal file
187
vendor/modernc.org/libc/errno/errno_linux_arm64.go
generated
vendored
Normal file
@ -0,0 +1,187 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
E2BIG = 7
|
||||
EACCES = 13
|
||||
EADDRINUSE = 98
|
||||
EADDRNOTAVAIL = 99
|
||||
EADV = 68
|
||||
EAFNOSUPPORT = 97
|
||||
EAGAIN = 11
|
||||
EALREADY = 114
|
||||
EBADE = 52
|
||||
EBADF = 9
|
||||
EBADFD = 77
|
||||
EBADMSG = 74
|
||||
EBADR = 53
|
||||
EBADRQC = 56
|
||||
EBADSLT = 57
|
||||
EBFONT = 59
|
||||
EBUSY = 16
|
||||
ECANCELED = 125
|
||||
ECHILD = 10
|
||||
ECHRNG = 44
|
||||
ECOMM = 70
|
||||
ECONNABORTED = 103
|
||||
ECONNREFUSED = 111
|
||||
ECONNRESET = 104
|
||||
EDEADLK = 35
|
||||
EDEADLOCK = 35
|
||||
EDESTADDRREQ = 89
|
||||
EDOM = 33
|
||||
EDOTDOT = 73
|
||||
EDQUOT = 122
|
||||
EEXIST = 17
|
||||
EFAULT = 14
|
||||
EFBIG = 27
|
||||
EHOSTDOWN = 112
|
||||
EHOSTUNREACH = 113
|
||||
EHWPOISON = 133
|
||||
EIDRM = 43
|
||||
EILSEQ = 84
|
||||
EINPROGRESS = 115
|
||||
EINTR = 4
|
||||
EINVAL = 22
|
||||
EIO = 5
|
||||
EISCONN = 106
|
||||
EISDIR = 21
|
||||
EISNAM = 120
|
||||
EKEYEXPIRED = 127
|
||||
EKEYREJECTED = 129
|
||||
EKEYREVOKED = 128
|
||||
EL2HLT = 51
|
||||
EL2NSYNC = 45
|
||||
EL3HLT = 46
|
||||
EL3RST = 47
|
||||
ELIBACC = 79
|
||||
ELIBBAD = 80
|
||||
ELIBEXEC = 83
|
||||
ELIBMAX = 82
|
||||
ELIBSCN = 81
|
||||
ELNRNG = 48
|
||||
ELOOP = 40
|
||||
EMEDIUMTYPE = 124
|
||||
EMFILE = 24
|
||||
EMLINK = 31
|
||||
EMSGSIZE = 90
|
||||
EMULTIHOP = 72
|
||||
ENAMETOOLONG = 36
|
||||
ENAVAIL = 119
|
||||
ENETDOWN = 100
|
||||
ENETRESET = 102
|
||||
ENETUNREACH = 101
|
||||
ENFILE = 23
|
||||
ENOANO = 55
|
||||
ENOBUFS = 105
|
||||
ENOCSI = 50
|
||||
ENODATA = 61
|
||||
ENODEV = 19
|
||||
ENOENT = 2
|
||||
ENOEXEC = 8
|
||||
ENOKEY = 126
|
||||
ENOLCK = 37
|
||||
ENOLINK = 67
|
||||
ENOMEDIUM = 123
|
||||
ENOMEM = 12
|
||||
ENOMSG = 42
|
||||
ENONET = 64
|
||||
ENOPKG = 65
|
||||
ENOPROTOOPT = 92
|
||||
ENOSPC = 28
|
||||
ENOSR = 63
|
||||
ENOSTR = 60
|
||||
ENOSYS = 38
|
||||
ENOTBLK = 15
|
||||
ENOTCONN = 107
|
||||
ENOTDIR = 20
|
||||
ENOTEMPTY = 39
|
||||
ENOTNAM = 118
|
||||
ENOTRECOVERABLE = 131
|
||||
ENOTSOCK = 88
|
||||
ENOTSUP = 95
|
||||
ENOTTY = 25
|
||||
ENOTUNIQ = 76
|
||||
ENXIO = 6
|
||||
EOPNOTSUPP = 95
|
||||
EOVERFLOW = 75
|
||||
EOWNERDEAD = 130
|
||||
EPERM = 1
|
||||
EPFNOSUPPORT = 96
|
||||
EPIPE = 32
|
||||
EPROTO = 71
|
||||
EPROTONOSUPPORT = 93
|
||||
EPROTOTYPE = 91
|
||||
ERANGE = 34
|
||||
EREMCHG = 78
|
||||
EREMOTE = 66
|
||||
EREMOTEIO = 121
|
||||
ERESTART = 85
|
||||
ERFKILL = 132
|
||||
EROFS = 30
|
||||
ESHUTDOWN = 108
|
||||
ESOCKTNOSUPPORT = 94
|
||||
ESPIPE = 29
|
||||
ESRCH = 3
|
||||
ESRMNT = 69
|
||||
ESTALE = 116
|
||||
ESTRPIPE = 86
|
||||
ETIME = 62
|
||||
ETIMEDOUT = 110
|
||||
ETOOMANYREFS = 109
|
||||
ETXTBSY = 26
|
||||
EUCLEAN = 117
|
||||
EUNATCH = 49
|
||||
EUSERS = 87
|
||||
EWOULDBLOCK = 11
|
||||
EXDEV = 18
|
||||
EXFULL = 54
|
||||
X_ASM_GENERIC_ERRNO_BASE_H = 0
|
||||
X_ASM_GENERIC_ERRNO_H = 0
|
||||
X_ATFILE_SOURCE = 1
|
||||
X_BITS_ERRNO_H = 1
|
||||
X_DEFAULT_SOURCE = 1
|
||||
X_ERRNO_H = 1
|
||||
X_FEATURES_H = 1
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_LP64 = 1
|
||||
X_POSIX_C_SOURCE = 200809
|
||||
X_POSIX_SOURCE = 1
|
||||
X_STDC_PREDEF_H = 1
|
||||
X_SYS_CDEFS_H = 1
|
||||
Linux = 1
|
||||
Unix = 1
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = uint32 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
187
vendor/modernc.org/libc/errno/errno_linux_s390x.go
generated
vendored
Normal file
187
vendor/modernc.org/libc/errno/errno_linux_s390x.go
generated
vendored
Normal file
@ -0,0 +1,187 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_s390x.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
E2BIG = 7
|
||||
EACCES = 13
|
||||
EADDRINUSE = 98
|
||||
EADDRNOTAVAIL = 99
|
||||
EADV = 68
|
||||
EAFNOSUPPORT = 97
|
||||
EAGAIN = 11
|
||||
EALREADY = 114
|
||||
EBADE = 52
|
||||
EBADF = 9
|
||||
EBADFD = 77
|
||||
EBADMSG = 74
|
||||
EBADR = 53
|
||||
EBADRQC = 56
|
||||
EBADSLT = 57
|
||||
EBFONT = 59
|
||||
EBUSY = 16
|
||||
ECANCELED = 125
|
||||
ECHILD = 10
|
||||
ECHRNG = 44
|
||||
ECOMM = 70
|
||||
ECONNABORTED = 103
|
||||
ECONNREFUSED = 111
|
||||
ECONNRESET = 104
|
||||
EDEADLK = 35
|
||||
EDEADLOCK = 35
|
||||
EDESTADDRREQ = 89
|
||||
EDOM = 33
|
||||
EDOTDOT = 73
|
||||
EDQUOT = 122
|
||||
EEXIST = 17
|
||||
EFAULT = 14
|
||||
EFBIG = 27
|
||||
EHOSTDOWN = 112
|
||||
EHOSTUNREACH = 113
|
||||
EHWPOISON = 133
|
||||
EIDRM = 43
|
||||
EILSEQ = 84
|
||||
EINPROGRESS = 115
|
||||
EINTR = 4
|
||||
EINVAL = 22
|
||||
EIO = 5
|
||||
EISCONN = 106
|
||||
EISDIR = 21
|
||||
EISNAM = 120
|
||||
EKEYEXPIRED = 127
|
||||
EKEYREJECTED = 129
|
||||
EKEYREVOKED = 128
|
||||
EL2HLT = 51
|
||||
EL2NSYNC = 45
|
||||
EL3HLT = 46
|
||||
EL3RST = 47
|
||||
ELIBACC = 79
|
||||
ELIBBAD = 80
|
||||
ELIBEXEC = 83
|
||||
ELIBMAX = 82
|
||||
ELIBSCN = 81
|
||||
ELNRNG = 48
|
||||
ELOOP = 40
|
||||
EMEDIUMTYPE = 124
|
||||
EMFILE = 24
|
||||
EMLINK = 31
|
||||
EMSGSIZE = 90
|
||||
EMULTIHOP = 72
|
||||
ENAMETOOLONG = 36
|
||||
ENAVAIL = 119
|
||||
ENETDOWN = 100
|
||||
ENETRESET = 102
|
||||
ENETUNREACH = 101
|
||||
ENFILE = 23
|
||||
ENOANO = 55
|
||||
ENOBUFS = 105
|
||||
ENOCSI = 50
|
||||
ENODATA = 61
|
||||
ENODEV = 19
|
||||
ENOENT = 2
|
||||
ENOEXEC = 8
|
||||
ENOKEY = 126
|
||||
ENOLCK = 37
|
||||
ENOLINK = 67
|
||||
ENOMEDIUM = 123
|
||||
ENOMEM = 12
|
||||
ENOMSG = 42
|
||||
ENONET = 64
|
||||
ENOPKG = 65
|
||||
ENOPROTOOPT = 92
|
||||
ENOSPC = 28
|
||||
ENOSR = 63
|
||||
ENOSTR = 60
|
||||
ENOSYS = 38
|
||||
ENOTBLK = 15
|
||||
ENOTCONN = 107
|
||||
ENOTDIR = 20
|
||||
ENOTEMPTY = 39
|
||||
ENOTNAM = 118
|
||||
ENOTRECOVERABLE = 131
|
||||
ENOTSOCK = 88
|
||||
ENOTSUP = 95
|
||||
ENOTTY = 25
|
||||
ENOTUNIQ = 76
|
||||
ENXIO = 6
|
||||
EOPNOTSUPP = 95
|
||||
EOVERFLOW = 75
|
||||
EOWNERDEAD = 130
|
||||
EPERM = 1
|
||||
EPFNOSUPPORT = 96
|
||||
EPIPE = 32
|
||||
EPROTO = 71
|
||||
EPROTONOSUPPORT = 93
|
||||
EPROTOTYPE = 91
|
||||
ERANGE = 34
|
||||
EREMCHG = 78
|
||||
EREMOTE = 66
|
||||
EREMOTEIO = 121
|
||||
ERESTART = 85
|
||||
ERFKILL = 132
|
||||
EROFS = 30
|
||||
ESHUTDOWN = 108
|
||||
ESOCKTNOSUPPORT = 94
|
||||
ESPIPE = 29
|
||||
ESRCH = 3
|
||||
ESRMNT = 69
|
||||
ESTALE = 116
|
||||
ESTRPIPE = 86
|
||||
ETIME = 62
|
||||
ETIMEDOUT = 110
|
||||
ETOOMANYREFS = 109
|
||||
ETXTBSY = 26
|
||||
EUCLEAN = 117
|
||||
EUNATCH = 49
|
||||
EUSERS = 87
|
||||
EWOULDBLOCK = 11
|
||||
EXDEV = 18
|
||||
EXFULL = 54
|
||||
X_ASM_GENERIC_ERRNO_BASE_H = 0
|
||||
X_ASM_GENERIC_ERRNO_H = 0
|
||||
X_ATFILE_SOURCE = 1
|
||||
X_BITS_ERRNO_H = 1
|
||||
X_DEFAULT_SOURCE = 1
|
||||
X_ERRNO_H = 1
|
||||
X_FEATURES_H = 1
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_LP64 = 1
|
||||
X_POSIX_C_SOURCE = 200809
|
||||
X_POSIX_SOURCE = 1
|
||||
X_STDC_PREDEF_H = 1
|
||||
X_SYS_CDEFS_H = 1
|
||||
Linux = 1
|
||||
Unix = 1
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
347
vendor/modernc.org/libc/errno/errno_windows_386.go
generated
vendored
Normal file
347
vendor/modernc.org/libc/errno/errno_windows_386.go
generated
vendored
Normal file
@ -0,0 +1,347 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
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_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
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint32 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = uint16 /* <builtin>:15:24 */
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the 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 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 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
|
||||
// fix was applied to trunk. This macro gets just increased on trunk. For
|
||||
// other branches its value won't be modified.
|
||||
|
||||
// mingw.org's version macros: these make gcc to define
|
||||
// MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
|
||||
// and the __mingwthr_key_dtor() function from the MinGW
|
||||
// CRT in its private gthr-win32.h header.
|
||||
|
||||
// Set VC specific compiler target macros.
|
||||
|
||||
// For x86 we have always to prefix by underscore.
|
||||
|
||||
// Special case nameless struct/union.
|
||||
|
||||
// MinGW-w64 has some additional C99 printf/scanf feature support.
|
||||
// So we add some helper macros to ease recognition of them.
|
||||
|
||||
// *
|
||||
// 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.
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ms175759%28v=VS.100%29.aspx
|
||||
// Templates won't work in C, will break if secure API is not enabled, disabled
|
||||
|
||||
// https://blogs.msdn.com/b/sdl/archive/2010/02/16/vc-2010-and-memcpy.aspx?Redirected=true
|
||||
// fallback on default implementation if we can't know the size of the destination
|
||||
|
||||
// Include _cygwin.h if we're building a Cygwin application.
|
||||
|
||||
// Target specific macro replacement for type "long". In the Windows API,
|
||||
// the type long is always 32 bit, even if the target is 64 bit (LLP64).
|
||||
// On 64 bit Cygwin, the type long is 64 bit (LP64). So, to get the right
|
||||
// sized definitions and declarations, all usage of type long in the Windows
|
||||
// headers have to be replaced by the below defined macro __LONG32.
|
||||
|
||||
// C/C++ specific language defines.
|
||||
|
||||
// Note the extern. This is needed to work around GCC's
|
||||
// limitations in handling dllimport attribute.
|
||||
|
||||
// Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
|
||||
// variadiac macro facility, because variadic macros cause syntax
|
||||
// errors with --traditional-cpp.
|
||||
|
||||
// High byte is the major version, low byte is the minor.
|
||||
|
||||
// *
|
||||
// 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 file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
|
||||
|
||||
type Ssize_t = int32 /* crtdefs.h:47:13 */
|
||||
|
||||
type Rsize_t = Size_t /* crtdefs.h:52:16 */
|
||||
|
||||
type Intptr_t = int32 /* crtdefs.h:64:13 */
|
||||
|
||||
type Uintptr_t = uint32 /* crtdefs.h:77:22 */
|
||||
|
||||
type Wint_t = uint16 /* crtdefs.h:106:24 */
|
||||
type Wctype_t = uint16 /* crtdefs.h:107:24 */
|
||||
|
||||
type Errno_t = int32 /* crtdefs.h:113:13 */
|
||||
|
||||
type X__time32_t = int32 /* crtdefs.h:118:14 */
|
||||
|
||||
type X__time64_t = int64 /* crtdefs.h:123:35 */
|
||||
|
||||
type Time_t = X__time32_t /* crtdefs.h:136:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
Frefcount int32
|
||||
Flc_codepage uint32
|
||||
Flc_collate_cp uint32
|
||||
Flc_handle [6]uint32
|
||||
Flc_id [6]LC_ID
|
||||
Flc_category [6]struct {
|
||||
Flocale uintptr
|
||||
Fwlocale uintptr
|
||||
Frefcount uintptr
|
||||
Fwrefcount uintptr
|
||||
}
|
||||
Flc_clike int32
|
||||
Fmb_cur_max int32
|
||||
Flconv_intl_refcount uintptr
|
||||
Flconv_num_refcount uintptr
|
||||
Flconv_mon_refcount uintptr
|
||||
Flconv uintptr
|
||||
Fctype1_refcount uintptr
|
||||
Fctype1 uintptr
|
||||
Fpctype uintptr
|
||||
Fpclmap uintptr
|
||||
Fpcumap uintptr
|
||||
Flc_time_curr uintptr
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
|
||||
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* crtdefs.h:428:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */
|
||||
type X_locale_t = uintptr /* crtdefs.h:431:19 */
|
||||
|
||||
type TagLC_ID = struct {
|
||||
FwLanguage uint16
|
||||
FwCountry uint16
|
||||
FwCodePage uint16
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
|
||||
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
|
||||
|
||||
// Posix thread extensions.
|
||||
|
||||
// Extension defined as by report VC 10+ defines error-numbers.
|
||||
|
||||
// Defined as WSAETIMEDOUT.
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
359
vendor/modernc.org/libc/errno/errno_windows_amd64.go
generated
vendored
Normal file
359
vendor/modernc.org/libc/errno/errno_windows_amd64.go
generated
vendored
Normal file
@ -0,0 +1,359 @@
|
||||
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_windows_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
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
|
||||
WIN64 = 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_AMD64 = 100
|
||||
X_M_X64 = 100
|
||||
X_PGLOBAL = 0
|
||||
X_PTRDIFF_T_ = 0
|
||||
X_PTRDIFF_T_DEFINED = 0
|
||||
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_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_WIN64 = 1
|
||||
X_WINT_T = 0
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = uint16 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the 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 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 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
|
||||
// fix was applied to trunk. This macro gets just increased on trunk. For
|
||||
// other branches its value won't be modified.
|
||||
|
||||
// mingw.org's version macros: these make gcc to define
|
||||
// MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
|
||||
// and the __mingwthr_key_dtor() function from the MinGW
|
||||
// CRT in its private gthr-win32.h header.
|
||||
|
||||
// Set VC specific compiler target macros.
|
||||
|
||||
// MS does not prefix symbols by underscores for 64-bit.
|
||||
// As we have to support older gcc version, which are using underscores
|
||||
// as symbol prefix for x64, we have to check here for the user label
|
||||
// prefix defined by gcc.
|
||||
|
||||
// Special case nameless struct/union.
|
||||
|
||||
// MinGW-w64 has some additional C99 printf/scanf feature support.
|
||||
// So we add some helper macros to ease recognition of them.
|
||||
|
||||
// *
|
||||
// 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.
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ms175759%28v=VS.100%29.aspx
|
||||
// Templates won't work in C, will break if secure API is not enabled, disabled
|
||||
|
||||
// https://blogs.msdn.com/b/sdl/archive/2010/02/16/vc-2010-and-memcpy.aspx?Redirected=true
|
||||
// fallback on default implementation if we can't know the size of the destination
|
||||
|
||||
// Include _cygwin.h if we're building a Cygwin application.
|
||||
|
||||
// Target specific macro replacement for type "long". In the Windows API,
|
||||
// the type long is always 32 bit, even if the target is 64 bit (LLP64).
|
||||
// On 64 bit Cygwin, the type long is 64 bit (LP64). So, to get the right
|
||||
// sized definitions and declarations, all usage of type long in the Windows
|
||||
// headers have to be replaced by the below defined macro __LONG32.
|
||||
|
||||
// C/C++ specific language defines.
|
||||
|
||||
// Note the extern. This is needed to work around GCC's
|
||||
// limitations in handling dllimport attribute.
|
||||
|
||||
// Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
|
||||
// variadiac macro facility, because variadic macros cause syntax
|
||||
// errors with --traditional-cpp.
|
||||
|
||||
// High byte is the major version, low byte is the minor.
|
||||
|
||||
// *
|
||||
// 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 file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
|
||||
|
||||
type Ssize_t = int64 /* crtdefs.h:45:35 */
|
||||
|
||||
type Rsize_t = Size_t /* crtdefs.h:52:16 */
|
||||
|
||||
type Intptr_t = int64 /* crtdefs.h:62:35 */
|
||||
|
||||
type Uintptr_t = uint64 /* crtdefs.h:75:44 */
|
||||
|
||||
type Wint_t = uint16 /* crtdefs.h:106:24 */
|
||||
type Wctype_t = uint16 /* crtdefs.h:107:24 */
|
||||
|
||||
type Errno_t = int32 /* crtdefs.h:113:13 */
|
||||
|
||||
type X__time32_t = int32 /* crtdefs.h:118:14 */
|
||||
|
||||
type X__time64_t = int64 /* crtdefs.h:123:35 */
|
||||
|
||||
type Time_t = X__time64_t /* crtdefs.h:138:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
Frefcount int32
|
||||
Flc_codepage uint32
|
||||
Flc_collate_cp uint32
|
||||
Flc_handle [6]uint32
|
||||
Flc_id [6]LC_ID
|
||||
Flc_category [6]struct {
|
||||
Flocale uintptr
|
||||
Fwlocale uintptr
|
||||
Frefcount uintptr
|
||||
Fwrefcount uintptr
|
||||
}
|
||||
Flc_clike int32
|
||||
Fmb_cur_max int32
|
||||
Flconv_intl_refcount uintptr
|
||||
Flconv_num_refcount uintptr
|
||||
Flconv_mon_refcount uintptr
|
||||
Flconv uintptr
|
||||
Fctype1_refcount uintptr
|
||||
Fctype1 uintptr
|
||||
Fpctype uintptr
|
||||
Fpclmap uintptr
|
||||
Fpcumap uintptr
|
||||
Flc_time_curr uintptr
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
|
||||
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* crtdefs.h:428:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */
|
||||
type X_locale_t = uintptr /* crtdefs.h:431:19 */
|
||||
|
||||
type TagLC_ID = struct {
|
||||
FwLanguage uint16
|
||||
FwCountry uint16
|
||||
FwCodePage uint16
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
|
||||
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
|
||||
|
||||
// Posix thread extensions.
|
||||
|
||||
// Extension defined as by report VC 10+ defines error-numbers.
|
||||
|
||||
// Defined as WSAETIMEDOUT.
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
895
vendor/modernc.org/libc/etc.go
generated
vendored
Normal file
895
vendor/modernc.org/libc/etc.go
generated
vendored
Normal file
@ -0,0 +1,895 @@
|
||||
// Copyright 2020 The Libc Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"modernc.org/libc/errno"
|
||||
"modernc.org/libc/signal"
|
||||
"modernc.org/libc/sys/types"
|
||||
)
|
||||
|
||||
const (
|
||||
allocatorPageOverhead = 4 * unsafe.Sizeof(int(0))
|
||||
stackHeaderSize = unsafe.Sizeof(stackHeader{})
|
||||
stackSegmentSize = 1<<12 - allocatorPageOverhead
|
||||
uintptrSize = unsafe.Sizeof(uintptr(0))
|
||||
)
|
||||
|
||||
var (
|
||||
Covered = map[uintptr]struct{}{}
|
||||
CoveredC = map[string]struct{}{}
|
||||
fToken uintptr
|
||||
tid int32
|
||||
|
||||
atExit []func()
|
||||
atExitMu sync.Mutex
|
||||
|
||||
signals [signal.NSIG]uintptr
|
||||
signalsMu sync.Mutex
|
||||
|
||||
objectMu sync.Mutex
|
||||
objects = map[uintptr]interface{}{}
|
||||
|
||||
tlsBalance int32
|
||||
|
||||
_ = origin
|
||||
_ = trc
|
||||
)
|
||||
|
||||
func init() {
|
||||
if n := stackHeaderSize; n%16 != 0 {
|
||||
panic(fmt.Errorf("internal error: stackHeaderSize %v == %v (mod 16)", n, n%16))
|
||||
}
|
||||
}
|
||||
|
||||
func origin(skip int) string {
|
||||
pc, fn, fl, _ := runtime.Caller(skip)
|
||||
f := runtime.FuncForPC(pc)
|
||||
var fns string
|
||||
if f != nil {
|
||||
fns = f.Name()
|
||||
if x := strings.LastIndex(fns, "."); x > 0 {
|
||||
fns = fns[x+1:]
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf("%s:%d:%s", filepath.Base(fn), fl, fns)
|
||||
}
|
||||
|
||||
func trc(s string, args ...interface{}) string { //TODO-
|
||||
switch {
|
||||
case s == "":
|
||||
s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...)
|
||||
default:
|
||||
s = fmt.Sprintf(s, args...)
|
||||
}
|
||||
r := fmt.Sprintf("%s: TRC %s", origin(2), s)
|
||||
fmt.Fprintf(os.Stdout, "%s\n", r)
|
||||
os.Stdout.Sync()
|
||||
return r
|
||||
}
|
||||
|
||||
func todo(s string, args ...interface{}) string { //TODO-
|
||||
switch {
|
||||
case s == "":
|
||||
s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...)
|
||||
default:
|
||||
s = fmt.Sprintf(s, args...)
|
||||
}
|
||||
r := fmt.Sprintf("%s: TODOTODO %s", origin(2), s) //TODOOK
|
||||
if dmesgs {
|
||||
dmesg("%s", r)
|
||||
}
|
||||
fmt.Fprintf(os.Stdout, "%s\n", r)
|
||||
fmt.Fprintf(os.Stdout, "%s\n", debug.Stack()) //TODO-
|
||||
os.Stdout.Sync()
|
||||
os.Exit(1)
|
||||
panic("unrechable")
|
||||
}
|
||||
|
||||
var coverPCs [1]uintptr //TODO not concurrent safe
|
||||
|
||||
func Cover() {
|
||||
runtime.Callers(2, coverPCs[:])
|
||||
Covered[coverPCs[0]] = struct{}{}
|
||||
}
|
||||
|
||||
func CoverReport(w io.Writer) error {
|
||||
var a []string
|
||||
pcs := make([]uintptr, 1)
|
||||
for pc := range Covered {
|
||||
pcs[0] = pc
|
||||
frame, _ := runtime.CallersFrames(pcs).Next()
|
||||
a = append(a, fmt.Sprintf("%s:%07d:%s", filepath.Base(frame.File), frame.Line, frame.Func.Name()))
|
||||
}
|
||||
sort.Strings(a)
|
||||
_, err := fmt.Fprintf(w, "%s\n", strings.Join(a, "\n"))
|
||||
return err
|
||||
}
|
||||
|
||||
func CoverC(s string) {
|
||||
CoveredC[s] = struct{}{}
|
||||
}
|
||||
|
||||
func CoverCReport(w io.Writer) error {
|
||||
var a []string
|
||||
for k := range CoveredC {
|
||||
a = append(a, k)
|
||||
}
|
||||
sort.Strings(a)
|
||||
_, err := fmt.Fprintf(w, "%s\n", strings.Join(a, "\n"))
|
||||
return err
|
||||
}
|
||||
|
||||
func token() uintptr { return atomic.AddUintptr(&fToken, 1) }
|
||||
|
||||
func addObject(o interface{}) uintptr {
|
||||
t := token()
|
||||
objectMu.Lock()
|
||||
objects[t] = o
|
||||
objectMu.Unlock()
|
||||
return t
|
||||
}
|
||||
|
||||
func getObject(t uintptr) interface{} {
|
||||
objectMu.Lock()
|
||||
o := objects[t]
|
||||
if o == nil {
|
||||
panic(todo("", t))
|
||||
}
|
||||
|
||||
objectMu.Unlock()
|
||||
return o
|
||||
}
|
||||
|
||||
func removeObject(t uintptr) {
|
||||
objectMu.Lock()
|
||||
if _, ok := objects[t]; !ok {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
delete(objects, t)
|
||||
objectMu.Unlock()
|
||||
}
|
||||
|
||||
func (t *TLS) setErrno(err interface{}) {
|
||||
if memgrind {
|
||||
if atomic.SwapInt32(&t.reentryGuard, 1) != 0 {
|
||||
panic(todo("concurrent use of TLS instance %p", t))
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if atomic.SwapInt32(&t.reentryGuard, 0) != 1 {
|
||||
panic(todo("concurrent use of TLS instance %p", t))
|
||||
}
|
||||
}()
|
||||
}
|
||||
// if dmesgs {
|
||||
// dmesg("%v: %T(%v)\n%s", origin(1), err, err, debug.Stack())
|
||||
// }
|
||||
again:
|
||||
switch x := err.(type) {
|
||||
case int:
|
||||
*(*int32)(unsafe.Pointer(t.errnop)) = int32(x)
|
||||
case int32:
|
||||
*(*int32)(unsafe.Pointer(t.errnop)) = x
|
||||
case *os.PathError:
|
||||
err = x.Err
|
||||
goto again
|
||||
case syscall.Errno:
|
||||
*(*int32)(unsafe.Pointer(t.errnop)) = int32(x)
|
||||
case *os.SyscallError:
|
||||
err = x.Err
|
||||
goto again
|
||||
default:
|
||||
panic(todo("%T", x))
|
||||
}
|
||||
}
|
||||
|
||||
// Close frees the resources of t.
|
||||
func (t *TLS) Close() {
|
||||
t.Free(int(unsafe.Sizeof(int32(0))))
|
||||
if memgrind {
|
||||
if t.stackHeaderBalance != 0 {
|
||||
panic(todo("non zero stack header balance: %d", t.stackHeaderBalance))
|
||||
}
|
||||
|
||||
atomic.AddInt32(&tlsBalance, -1)
|
||||
}
|
||||
}
|
||||
|
||||
// Alloc allocates n bytes of thread-local storage. It must be paired with a
|
||||
// call to t.Free(n), using the same n. The order matters. This is ok:
|
||||
//
|
||||
// t.Alloc(11)
|
||||
// t.Alloc(22)
|
||||
// t.Free(22)
|
||||
// t.Free(11)
|
||||
//
|
||||
// This is not correct:
|
||||
//
|
||||
// t.Alloc(11)
|
||||
// t.Alloc(22)
|
||||
// t.Free(11)
|
||||
// t.Free(22)
|
||||
func (t *TLS) Alloc(n int) (r uintptr) {
|
||||
if memgrind {
|
||||
if atomic.SwapInt32(&t.reentryGuard, 1) != 0 {
|
||||
panic(todo("concurrent use of TLS instance %p", t))
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if atomic.SwapInt32(&t.reentryGuard, 0) != 1 {
|
||||
panic(todo("concurrent use of TLS instance %p", t))
|
||||
}
|
||||
}()
|
||||
}
|
||||
n += 15
|
||||
n &^= 15
|
||||
if t.stack.free >= n {
|
||||
r = t.stack.sp
|
||||
t.stack.free -= n
|
||||
t.stack.sp += uintptr(n)
|
||||
return r
|
||||
}
|
||||
//if we have a next stack
|
||||
if nstack := t.stack.next; nstack != 0 {
|
||||
if (*stackHeader)(unsafe.Pointer(nstack)).free >= n {
|
||||
*(*stackHeader)(unsafe.Pointer(t.stack.page)) = t.stack
|
||||
t.stack = *(*stackHeader)(unsafe.Pointer(nstack))
|
||||
r = t.stack.sp
|
||||
t.stack.free -= n
|
||||
t.stack.sp += uintptr(n)
|
||||
return r
|
||||
}
|
||||
nstack := *(*stackHeader)(unsafe.Pointer(t.stack.next))
|
||||
for ; ; nstack = *(*stackHeader)(unsafe.Pointer(nstack.next)) {
|
||||
if memgrind {
|
||||
if atomic.AddInt32(&t.stackHeaderBalance, -1) < 0 {
|
||||
panic(todo("negative stack header balance"))
|
||||
}
|
||||
}
|
||||
Xfree(t, nstack.page)
|
||||
if nstack.next == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
t.stack.next = 0
|
||||
}
|
||||
|
||||
if t.stack.page != 0 {
|
||||
*(*stackHeader)(unsafe.Pointer(t.stack.page)) = t.stack
|
||||
}
|
||||
|
||||
rq := n + int(stackHeaderSize)
|
||||
if rq%int(stackSegmentSize) != 0 {
|
||||
rq -= rq % int(stackSegmentSize)
|
||||
rq += int(stackSegmentSize)
|
||||
}
|
||||
t.stack.free = rq - int(stackHeaderSize)
|
||||
t.stack.prev = t.stack.page
|
||||
|
||||
rq += 15
|
||||
rq &^= 15
|
||||
t.stack.page = Xmalloc(t, types.Size_t(rq))
|
||||
if t.stack.page == 0 {
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
if memgrind {
|
||||
atomic.AddInt32(&t.stackHeaderBalance, 1)
|
||||
}
|
||||
t.stack.sp = t.stack.page + stackHeaderSize
|
||||
|
||||
r = t.stack.sp
|
||||
t.stack.free -= n
|
||||
t.stack.sp += uintptr(n)
|
||||
if t.stack.prev != 0 {
|
||||
(*stackHeader)(unsafe.Pointer(t.stack.prev)).next = t.stack.page
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
//this declares how many stack frames are kept alive before being freed
|
||||
const stackFrameKeepalive = 2
|
||||
|
||||
// Free deallocates n bytes of thread-local storage. See TLS.Alloc for details
|
||||
// on correct usage.
|
||||
func (t *TLS) Free(n int) {
|
||||
if memgrind {
|
||||
if atomic.SwapInt32(&t.reentryGuard, 1) != 0 {
|
||||
panic(todo("concurrent use of TLS instance %p", t))
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if atomic.SwapInt32(&t.reentryGuard, 0) != 1 {
|
||||
panic(todo("concurrent use of TLS instance %p", t))
|
||||
}
|
||||
}()
|
||||
}
|
||||
n += 15
|
||||
n &^= 15
|
||||
t.stack.free += n
|
||||
t.stack.sp -= uintptr(n)
|
||||
if t.stack.sp != t.stack.page+stackHeaderSize {
|
||||
return
|
||||
}
|
||||
|
||||
nstack := t.stack
|
||||
|
||||
//if we are the first one, just free all of them
|
||||
if t.stack.prev == 0 {
|
||||
for ; ; nstack = *(*stackHeader)(unsafe.Pointer(nstack.next)) {
|
||||
if memgrind {
|
||||
if atomic.AddInt32(&t.stackHeaderBalance, -1) < 0 {
|
||||
panic(todo("negative stack header balance"))
|
||||
}
|
||||
}
|
||||
Xfree(t, nstack.page)
|
||||
if nstack.next == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
t.stack = stackHeader{}
|
||||
return
|
||||
}
|
||||
|
||||
//look if we are in the last n stackframes (n=stackFrameKeepalive)
|
||||
//if we find something just return and set the current stack pointer to the previous one
|
||||
for i := 0; i < stackFrameKeepalive; i++ {
|
||||
if nstack.next == 0 {
|
||||
*((*stackHeader)(unsafe.Pointer(t.stack.page))) = t.stack
|
||||
t.stack = *(*stackHeader)(unsafe.Pointer(t.stack.prev))
|
||||
return
|
||||
}
|
||||
nstack = *(*stackHeader)(unsafe.Pointer(nstack.next))
|
||||
}
|
||||
|
||||
//else only free the last
|
||||
if memgrind {
|
||||
if atomic.AddInt32(&t.stackHeaderBalance, -1) < 0 {
|
||||
panic(todo("negative stack header balance"))
|
||||
}
|
||||
}
|
||||
Xfree(t, nstack.page)
|
||||
(*stackHeader)(unsafe.Pointer(nstack.prev)).next = 0
|
||||
*(*stackHeader)(unsafe.Pointer(t.stack.page)) = t.stack
|
||||
t.stack = *(*stackHeader)(unsafe.Pointer(t.stack.prev))
|
||||
}
|
||||
|
||||
type stackHeader struct {
|
||||
free int // bytes left in page
|
||||
page uintptr // stack page
|
||||
prev uintptr // prev stack page = prev stack header
|
||||
next uintptr // next stack page = next stack header
|
||||
sp uintptr // next allocation address
|
||||
_ stackHeaderPadding
|
||||
}
|
||||
|
||||
func cString(t *TLS, s string) uintptr { //TODO-
|
||||
n := len(s)
|
||||
p := Xmalloc(t, types.Size_t(n)+1)
|
||||
if p == 0 {
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
copy((*RawMem)(unsafe.Pointer(p))[:n:n], s)
|
||||
*(*byte)(unsafe.Pointer(p + uintptr(n))) = 0
|
||||
return p
|
||||
}
|
||||
|
||||
// VaList fills a varargs list at p with args and returns uintptr(p). The list
|
||||
// must have been allocated by caller and it must not be in Go managed
|
||||
// memory, ie. it must be pinned. Caller is responsible for freeing the list.
|
||||
//
|
||||
// Individual arguments must be one of int, uint, int32, uint32, int64, uint64,
|
||||
// float64, uintptr or Intptr. Other types will panic.
|
||||
//
|
||||
// Note: The C translated to Go varargs ABI alignment for all types is 8 at all
|
||||
// architectures.
|
||||
func VaList(p uintptr, args ...interface{}) (r uintptr) {
|
||||
if p&7 != 0 {
|
||||
panic("internal error")
|
||||
}
|
||||
|
||||
r = p
|
||||
for _, v := range args {
|
||||
switch x := v.(type) {
|
||||
case int:
|
||||
*(*int64)(unsafe.Pointer(p)) = int64(x)
|
||||
case int32:
|
||||
*(*int64)(unsafe.Pointer(p)) = int64(x)
|
||||
case int64:
|
||||
*(*int64)(unsafe.Pointer(p)) = x
|
||||
case uint:
|
||||
*(*uint64)(unsafe.Pointer(p)) = uint64(x)
|
||||
case uint16:
|
||||
*(*uint64)(unsafe.Pointer(p)) = uint64(x)
|
||||
case uint32:
|
||||
*(*uint64)(unsafe.Pointer(p)) = uint64(x)
|
||||
case uint64:
|
||||
*(*uint64)(unsafe.Pointer(p)) = x
|
||||
case float64:
|
||||
*(*float64)(unsafe.Pointer(p)) = x
|
||||
case uintptr:
|
||||
*(*uintptr)(unsafe.Pointer(p)) = x
|
||||
default:
|
||||
panic(todo("invalid VaList argument type: %T", x))
|
||||
}
|
||||
p += 8
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func VaInt32(app *uintptr) int32 {
|
||||
ap := *(*uintptr)(unsafe.Pointer(app))
|
||||
if ap == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
ap = roundup(ap, 8)
|
||||
v := int32(*(*int64)(unsafe.Pointer(ap)))
|
||||
ap += 8
|
||||
*(*uintptr)(unsafe.Pointer(app)) = ap
|
||||
return v
|
||||
}
|
||||
|
||||
func VaUint32(app *uintptr) uint32 {
|
||||
ap := *(*uintptr)(unsafe.Pointer(app))
|
||||
if ap == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
ap = roundup(ap, 8)
|
||||
v := uint32(*(*uint64)(unsafe.Pointer(ap)))
|
||||
ap += 8
|
||||
*(*uintptr)(unsafe.Pointer(app)) = ap
|
||||
return v
|
||||
}
|
||||
|
||||
func VaInt64(app *uintptr) int64 {
|
||||
ap := *(*uintptr)(unsafe.Pointer(app))
|
||||
if ap == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
ap = roundup(ap, 8)
|
||||
v := *(*int64)(unsafe.Pointer(ap))
|
||||
ap += 8
|
||||
*(*uintptr)(unsafe.Pointer(app)) = ap
|
||||
return v
|
||||
}
|
||||
|
||||
func VaUint64(app *uintptr) uint64 {
|
||||
ap := *(*uintptr)(unsafe.Pointer(app))
|
||||
if ap == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
ap = roundup(ap, 8)
|
||||
v := *(*uint64)(unsafe.Pointer(ap))
|
||||
ap += 8
|
||||
*(*uintptr)(unsafe.Pointer(app)) = ap
|
||||
return v
|
||||
}
|
||||
|
||||
func VaFloat32(app *uintptr) float32 {
|
||||
ap := *(*uintptr)(unsafe.Pointer(app))
|
||||
if ap == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
ap = roundup(ap, 8)
|
||||
v := *(*float64)(unsafe.Pointer(ap))
|
||||
ap += 8
|
||||
*(*uintptr)(unsafe.Pointer(app)) = ap
|
||||
return float32(v)
|
||||
}
|
||||
|
||||
func VaFloat64(app *uintptr) float64 {
|
||||
ap := *(*uintptr)(unsafe.Pointer(app))
|
||||
if ap == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
ap = roundup(ap, 8)
|
||||
v := *(*float64)(unsafe.Pointer(ap))
|
||||
ap += 8
|
||||
*(*uintptr)(unsafe.Pointer(app)) = ap
|
||||
return v
|
||||
}
|
||||
|
||||
func VaUintptr(app *uintptr) uintptr {
|
||||
ap := *(*uintptr)(unsafe.Pointer(app))
|
||||
if ap == 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
ap = roundup(ap, 8)
|
||||
v := *(*uintptr)(unsafe.Pointer(ap))
|
||||
ap += 8
|
||||
*(*uintptr)(unsafe.Pointer(app)) = ap
|
||||
return v
|
||||
}
|
||||
|
||||
func roundup(n, to uintptr) uintptr {
|
||||
if r := n % to; r != 0 {
|
||||
return n + to - r
|
||||
}
|
||||
|
||||
return n
|
||||
}
|
||||
|
||||
func GoString(s uintptr) string {
|
||||
if s == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
var buf []byte
|
||||
for {
|
||||
b := *(*byte)(unsafe.Pointer(s))
|
||||
if b == 0 {
|
||||
return string(buf)
|
||||
}
|
||||
|
||||
buf = append(buf, b)
|
||||
s++
|
||||
}
|
||||
}
|
||||
|
||||
// GoBytes returns a byte slice from a C char* having length len bytes.
|
||||
func GoBytes(s uintptr, len int) []byte {
|
||||
if len == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return (*RawMem)(unsafe.Pointer(s))[:len:len]
|
||||
}
|
||||
|
||||
func Bool32(b bool) int32 {
|
||||
if b {
|
||||
return 1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func Bool64(b bool) int64 {
|
||||
if b {
|
||||
return 1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
type sorter struct {
|
||||
len int
|
||||
base uintptr
|
||||
sz uintptr
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
t *TLS
|
||||
}
|
||||
|
||||
func (s *sorter) Len() int { return s.len }
|
||||
|
||||
func (s *sorter) Less(i, j int) bool {
|
||||
return s.f(s.t, s.base+uintptr(i)*s.sz, s.base+uintptr(j)*s.sz) < 0
|
||||
}
|
||||
|
||||
func (s *sorter) Swap(i, j int) {
|
||||
p := uintptr(s.base + uintptr(i)*s.sz)
|
||||
q := uintptr(s.base + uintptr(j)*s.sz)
|
||||
for i := 0; i < int(s.sz); i++ {
|
||||
*(*byte)(unsafe.Pointer(p)), *(*byte)(unsafe.Pointer(q)) = *(*byte)(unsafe.Pointer(q)), *(*byte)(unsafe.Pointer(p))
|
||||
p++
|
||||
q++
|
||||
}
|
||||
}
|
||||
|
||||
func CString(s string) (uintptr, error) {
|
||||
n := len(s)
|
||||
p := Xmalloc(nil, types.Size_t(n)+1)
|
||||
if p == 0 {
|
||||
return 0, fmt.Errorf("CString: cannot allocate %d bytes", n+1)
|
||||
}
|
||||
|
||||
copy((*RawMem)(unsafe.Pointer(p))[:n:n], s)
|
||||
*(*byte)(unsafe.Pointer(p + uintptr(n))) = 0
|
||||
return p, nil
|
||||
}
|
||||
|
||||
func GetEnviron() (r []string) {
|
||||
for p := Environ(); ; p += unsafe.Sizeof(p) {
|
||||
q := *(*uintptr)(unsafe.Pointer(p))
|
||||
if q == 0 {
|
||||
return r
|
||||
}
|
||||
|
||||
r = append(r, GoString(q))
|
||||
}
|
||||
}
|
||||
|
||||
func strToUint64(t *TLS, s uintptr, base int32) (seenDigits, neg bool, next uintptr, n uint64, err int32) {
|
||||
var c byte
|
||||
out:
|
||||
for {
|
||||
c = *(*byte)(unsafe.Pointer(s))
|
||||
switch c {
|
||||
case ' ', '\t', '\n', '\r', '\v', '\f':
|
||||
s++
|
||||
case '+':
|
||||
s++
|
||||
break out
|
||||
case '-':
|
||||
s++
|
||||
neg = true
|
||||
break out
|
||||
default:
|
||||
break out
|
||||
}
|
||||
}
|
||||
for {
|
||||
c = *(*byte)(unsafe.Pointer(s))
|
||||
var digit uint64
|
||||
switch base {
|
||||
case 10:
|
||||
switch {
|
||||
case c >= '0' && c <= '9':
|
||||
seenDigits = true
|
||||
digit = uint64(c) - '0'
|
||||
default:
|
||||
return seenDigits, neg, s, n, 0
|
||||
}
|
||||
case 16:
|
||||
if c >= 'A' && c <= 'F' {
|
||||
c = c + ('a' - 'A')
|
||||
}
|
||||
switch {
|
||||
case c >= '0' && c <= '9':
|
||||
seenDigits = true
|
||||
digit = uint64(c) - '0'
|
||||
case c >= 'a' && c <= 'f':
|
||||
seenDigits = true
|
||||
digit = uint64(c) - 'a' + 10
|
||||
default:
|
||||
return seenDigits, neg, s, n, 0
|
||||
}
|
||||
default:
|
||||
panic(todo("", base))
|
||||
}
|
||||
n0 := n
|
||||
n = uint64(base)*n + digit
|
||||
if n < n0 { // overflow
|
||||
return seenDigits, neg, s, n0, errno.ERANGE
|
||||
}
|
||||
|
||||
s++
|
||||
}
|
||||
}
|
||||
|
||||
func strToFloatt64(t *TLS, s uintptr, bits int) (n float64, errno int32) {
|
||||
var b []byte
|
||||
var neg bool
|
||||
|
||||
defer func() {
|
||||
var err error
|
||||
if n, err = strconv.ParseFloat(string(b), bits); err != nil {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
if neg {
|
||||
n = -n
|
||||
}
|
||||
}()
|
||||
|
||||
var c byte
|
||||
out:
|
||||
for {
|
||||
c = *(*byte)(unsafe.Pointer(s))
|
||||
switch c {
|
||||
case ' ', '\t', '\n', '\r', '\v', '\f':
|
||||
s++
|
||||
case '+':
|
||||
s++
|
||||
break out
|
||||
case '-':
|
||||
s++
|
||||
neg = true
|
||||
break out
|
||||
default:
|
||||
break out
|
||||
}
|
||||
}
|
||||
for {
|
||||
c = *(*byte)(unsafe.Pointer(s))
|
||||
switch {
|
||||
case c >= '0' && c <= '9':
|
||||
b = append(b, c)
|
||||
case c == '.':
|
||||
b = append(b, c)
|
||||
s++
|
||||
for {
|
||||
c = *(*byte)(unsafe.Pointer(s))
|
||||
switch {
|
||||
case c >= '0' && c <= '9':
|
||||
b = append(b, c)
|
||||
case c == 'e' || c == 'E':
|
||||
b = append(b, c)
|
||||
s++
|
||||
for {
|
||||
c = *(*byte)(unsafe.Pointer(s))
|
||||
switch {
|
||||
case c == '+' || c == '-':
|
||||
b = append(b, c)
|
||||
s++
|
||||
for {
|
||||
c = *(*byte)(unsafe.Pointer(s))
|
||||
switch {
|
||||
case c >= '0' && c <= '9':
|
||||
b = append(b, c)
|
||||
default:
|
||||
return
|
||||
}
|
||||
|
||||
s++
|
||||
}
|
||||
default:
|
||||
panic(todo("%q %q", b, string(c)))
|
||||
}
|
||||
}
|
||||
default:
|
||||
return
|
||||
}
|
||||
|
||||
s++
|
||||
}
|
||||
default:
|
||||
panic(todo("%q %q", b, string(c)))
|
||||
}
|
||||
|
||||
s++
|
||||
}
|
||||
}
|
||||
|
||||
func parseZone(s string) (name string, off int) {
|
||||
_, name, off, _ = parseZoneOffset(s, false)
|
||||
return name, off
|
||||
}
|
||||
|
||||
func parseZoneOffset(s string, offOpt bool) (string, string, int, bool) {
|
||||
s0 := s
|
||||
name := s
|
||||
for len(s) != 0 {
|
||||
switch c := s[0]; {
|
||||
case c >= 'A' && c <= 'Z', c >= 'a' && c <= 'z', c == '_', c == '/':
|
||||
s = s[1:]
|
||||
default:
|
||||
name = name[:len(name)-len(s)]
|
||||
if len(name) < 3 {
|
||||
panic(todo("%q", s0))
|
||||
}
|
||||
|
||||
if offOpt {
|
||||
if len(s) == 0 {
|
||||
return "", name, 0, false
|
||||
}
|
||||
|
||||
if c := s[0]; (c < '0' || c > '9') && c != '+' && c != '-' {
|
||||
return s, name, 0, false
|
||||
}
|
||||
}
|
||||
|
||||
s, off := parseOffset(s)
|
||||
return s, name, off, true
|
||||
}
|
||||
}
|
||||
return "", s0, 0, true
|
||||
}
|
||||
|
||||
// [+|-]hh[:mm[:ss]]
|
||||
func parseOffset(s string) (string, int) {
|
||||
if len(s) == 0 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
k := 1
|
||||
switch s[0] {
|
||||
case '+':
|
||||
// nop
|
||||
s = s[1:]
|
||||
case '-':
|
||||
k = -1
|
||||
s = s[1:]
|
||||
}
|
||||
s, hh, ok := parseUint(s)
|
||||
if !ok {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
n := hh * 3600
|
||||
if len(s) == 0 || s[0] != ':' {
|
||||
return s, k * n
|
||||
}
|
||||
|
||||
s = s[1:] // ':'
|
||||
if len(s) == 0 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
s, mm, ok := parseUint(s)
|
||||
if !ok {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
n += mm * 60
|
||||
if len(s) == 0 || s[0] != ':' {
|
||||
return s, k * n
|
||||
}
|
||||
|
||||
s = s[1:] // ':'
|
||||
if len(s) == 0 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
s, ss, _ := parseUint(s)
|
||||
return s, k * (n + ss)
|
||||
}
|
||||
|
||||
func parseUint(s string) (string, int, bool) {
|
||||
var ok bool
|
||||
var r int
|
||||
for len(s) != 0 {
|
||||
switch c := s[0]; {
|
||||
case c >= '0' && c <= '9':
|
||||
ok = true
|
||||
r0 := r
|
||||
r = 10*r + int(c) - '0'
|
||||
if r < r0 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
s = s[1:]
|
||||
default:
|
||||
return s, r, ok
|
||||
}
|
||||
}
|
||||
return s, r, ok
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/a/53052382
|
||||
//
|
||||
// isTimeDST returns true if time t occurs within daylight saving time
|
||||
// for its time zone.
|
||||
func isTimeDST(t time.Time) bool {
|
||||
// If the most recent (within the last year) clock change
|
||||
// was forward then assume the change was from std to dst.
|
||||
hh, mm, _ := t.UTC().Clock()
|
||||
tClock := hh*60 + mm
|
||||
for m := -1; m > -12; m-- {
|
||||
// assume dst lasts for at least one month
|
||||
hh, mm, _ := t.AddDate(0, m, 0).UTC().Clock()
|
||||
clock := hh*60 + mm
|
||||
if clock != tClock {
|
||||
return clock > tClock
|
||||
}
|
||||
}
|
||||
// assume no dst
|
||||
return false
|
||||
}
|
5
vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/fcntl/capi_darwin_arm64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fcntl/capi_darwin_arm64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_arm64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/fcntl/capi_linux_386.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fcntl/capi_linux_386.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/fcntl/capi_linux_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fcntl/capi_linux_amd64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/fcntl/capi_linux_arm.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fcntl/capi_linux_arm.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/fcntl/capi_linux_arm64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fcntl/capi_linux_arm64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/fcntl/capi_linux_s390x.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fcntl/capi_linux_s390x.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_s390x.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/fcntl/capi_windows_386.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fcntl/capi_windows_386.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/fcntl/capi_windows_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fcntl/capi_windows_amd64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_windows_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
2055
vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go
generated
vendored
Normal file
2055
vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2046
vendor/modernc.org/libc/fcntl/fcntl_darwin_arm64.go
generated
vendored
Normal file
2046
vendor/modernc.org/libc/fcntl/fcntl_darwin_arm64.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
964
vendor/modernc.org/libc/fcntl/fcntl_linux_386.go
generated
vendored
Normal file
964
vendor/modernc.org/libc/fcntl/fcntl_linux_386.go
generated
vendored
Normal file
@ -0,0 +1,964 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
AT_EACCESS = 0x200
|
||||
AT_FDCWD = -100
|
||||
AT_REMOVEDIR = 0x200
|
||||
AT_SYMLINK_FOLLOW = 0x400
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
FAPPEND = 1024
|
||||
FASYNC = 8192
|
||||
FD_CLOEXEC = 1
|
||||
FFSYNC = 1052672
|
||||
FNDELAY = 2048
|
||||
FNONBLOCK = 2048
|
||||
F_DUPFD = 0
|
||||
F_DUPFD_CLOEXEC = 1030
|
||||
F_EXLCK = 4
|
||||
F_GETFD = 1
|
||||
F_GETFL = 3
|
||||
F_GETLK = 12
|
||||
F_GETLK64 = 12
|
||||
F_GETOWN = 9
|
||||
F_LOCK = 1
|
||||
F_OK = 0
|
||||
F_RDLCK = 0
|
||||
F_SETFD = 2
|
||||
F_SETFL = 4
|
||||
F_SETLK = 13
|
||||
F_SETLK64 = 13
|
||||
F_SETLKW = 14
|
||||
F_SETLKW64 = 14
|
||||
F_SETOWN = 8
|
||||
F_SHLCK = 8
|
||||
F_TEST = 3
|
||||
F_TLOCK = 2
|
||||
F_ULOCK = 0
|
||||
F_UNLCK = 2
|
||||
F_WRLCK = 1
|
||||
LOCK_EX = 2
|
||||
LOCK_NB = 4
|
||||
LOCK_SH = 1
|
||||
LOCK_UN = 8
|
||||
O_ACCMODE = 0003
|
||||
O_APPEND = 02000
|
||||
O_ASYNC = 020000
|
||||
O_CLOEXEC = 524288
|
||||
O_CREAT = 0100
|
||||
O_DIRECTORY = 65536
|
||||
O_DSYNC = 4096
|
||||
O_EXCL = 0200
|
||||
O_FSYNC = 1052672
|
||||
O_NDELAY = 2048
|
||||
O_NOCTTY = 0400
|
||||
O_NOFOLLOW = 131072
|
||||
O_NONBLOCK = 04000
|
||||
O_RDONLY = 00
|
||||
O_RDWR = 02
|
||||
O_RSYNC = 1052672
|
||||
O_SYNC = 04010000
|
||||
O_TRUNC = 01000
|
||||
O_WRONLY = 01
|
||||
POSIX_FADV_DONTNEED = 4
|
||||
POSIX_FADV_NOREUSE = 5
|
||||
POSIX_FADV_NORMAL = 0
|
||||
POSIX_FADV_RANDOM = 1
|
||||
POSIX_FADV_SEQUENTIAL = 2
|
||||
POSIX_FADV_WILLNEED = 3
|
||||
R_OK = 4
|
||||
SEEK_CUR = 1
|
||||
SEEK_END = 2
|
||||
SEEK_SET = 0
|
||||
S_IFBLK = 24576
|
||||
S_IFCHR = 8192
|
||||
S_IFDIR = 16384
|
||||
S_IFIFO = 4096
|
||||
S_IFLNK = 40960
|
||||
S_IFMT = 61440
|
||||
S_IFREG = 32768
|
||||
S_IFSOCK = 49152
|
||||
S_IRGRP = 32
|
||||
S_IROTH = 4
|
||||
S_IRUSR = 256
|
||||
S_IRWXG = 56
|
||||
S_IRWXO = 7
|
||||
S_IRWXU = 448
|
||||
S_ISGID = 1024
|
||||
S_ISUID = 2048
|
||||
S_ISVTX = 512
|
||||
S_IWGRP = 16
|
||||
S_IWOTH = 2
|
||||
S_IWUSR = 128
|
||||
S_IXGRP = 8
|
||||
S_IXOTH = 1
|
||||
S_IXUSR = 64
|
||||
UTIME_NOW = 1073741823
|
||||
UTIME_OMIT = 1073741822
|
||||
W_OK = 2
|
||||
X_OK = 1
|
||||
X_ATFILE_SOURCE = 1
|
||||
X_BITS_STAT_H = 1
|
||||
X_BITS_TYPESIZES_H = 1
|
||||
X_BITS_TYPES_H = 1
|
||||
X_DEFAULT_SOURCE = 1
|
||||
X_FCNTL_H = 1
|
||||
X_FEATURES_H = 1
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_MKNOD_VER = 1
|
||||
X_MKNOD_VER_LINUX = 1
|
||||
X_MKNOD_VER_SVR4 = 2
|
||||
X_POSIX_C_SOURCE = 200809
|
||||
X_POSIX_SOURCE = 1
|
||||
X_STATBUF_ST_BLKSIZE = 0
|
||||
X_STATBUF_ST_NSEC = 0
|
||||
X_STATBUF_ST_RDEV = 0
|
||||
X_STAT_VER = 3
|
||||
X_STAT_VER_KERNEL = 1
|
||||
X_STAT_VER_LINUX = 3
|
||||
X_STAT_VER_LINUX_OLD = 1
|
||||
X_STAT_VER_SVR4 = 2
|
||||
X_STDC_PREDEF_H = 1
|
||||
X_STRUCT_TIMESPEC = 1
|
||||
X_SYS_CDEFS_H = 1
|
||||
I386 = 1
|
||||
Linux = 1
|
||||
Unix = 1
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint32 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// POSIX Standard: 6.5 File Control Operations <fcntl.h>
|
||||
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// These are defined by the user (or the compiler)
|
||||
// to specify the desired environment:
|
||||
//
|
||||
// __STRICT_ANSI__ ISO Standard C.
|
||||
// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
|
||||
// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
|
||||
// __STDC_WANT_LIB_EXT2__
|
||||
// Extensions to ISO C99 from TR 27431-2:2010.
|
||||
// __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
// Extensions to ISO C11 from TS 18661-1:2014.
|
||||
// __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
// Extensions to ISO C11 from TS 18661-4:2015.
|
||||
// __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
// Extensions to ISO C11 from TS 18661-3:2015.
|
||||
//
|
||||
// _POSIX_SOURCE IEEE Std 1003.1.
|
||||
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
|
||||
// if >=199309L, add IEEE Std 1003.1b-1993;
|
||||
// if >=199506L, add IEEE Std 1003.1c-1995;
|
||||
// if >=200112L, all of IEEE 1003.1-2004
|
||||
// if >=200809L, all of IEEE 1003.1-2008
|
||||
// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
|
||||
// Single Unix conformance is wanted, to 600 for the
|
||||
// sixth revision, to 700 for the seventh revision.
|
||||
// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
|
||||
// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
|
||||
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
|
||||
// _FILE_OFFSET_BITS=N Select default filesystem interface.
|
||||
// _ATFILE_SOURCE Additional *at interfaces.
|
||||
// _GNU_SOURCE All of the above, plus GNU extensions.
|
||||
// _DEFAULT_SOURCE The default set of features (taking precedence over
|
||||
// __STRICT_ANSI__).
|
||||
//
|
||||
// _FORTIFY_SOURCE Add security hardening to many library functions.
|
||||
// Set to 1 or 2; 2 performs stricter checks than 1.
|
||||
//
|
||||
// _REENTRANT, _THREAD_SAFE
|
||||
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
|
||||
//
|
||||
// The `-ansi' switch to the GNU C compiler, and standards conformance
|
||||
// options such as `-std=c99', define __STRICT_ANSI__. If none of
|
||||
// these are defined, or if _DEFAULT_SOURCE is defined, the default is
|
||||
// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
|
||||
// 200809L, as well as enabling miscellaneous functions from BSD and
|
||||
// SVID. If more than one of these are defined, they accumulate. For
|
||||
// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
|
||||
// give you ISO C, 1003.1, and 1003.2, but nothing else.
|
||||
//
|
||||
// These are defined by this file and are used by the
|
||||
// header files to decide what to declare or define:
|
||||
//
|
||||
// __GLIBC_USE (F) Define things from feature set F. This is defined
|
||||
// to 1 or 0; the subsequent macros are either defined
|
||||
// or undefined, and those tests should be moved to
|
||||
// __GLIBC_USE.
|
||||
// __USE_ISOC11 Define ISO C11 things.
|
||||
// __USE_ISOC99 Define ISO C99 things.
|
||||
// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
|
||||
// __USE_ISOCXX11 Define ISO C++11 things.
|
||||
// __USE_POSIX Define IEEE Std 1003.1 things.
|
||||
// __USE_POSIX2 Define IEEE Std 1003.2 things.
|
||||
// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
|
||||
// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
|
||||
// __USE_XOPEN Define XPG things.
|
||||
// __USE_XOPEN_EXTENDED Define X/Open Unix things.
|
||||
// __USE_UNIX98 Define Single Unix V2 things.
|
||||
// __USE_XOPEN2K Define XPG6 things.
|
||||
// __USE_XOPEN2KXSI Define XPG6 XSI things.
|
||||
// __USE_XOPEN2K8 Define XPG7 things.
|
||||
// __USE_XOPEN2K8XSI Define XPG7 XSI things.
|
||||
// __USE_LARGEFILE Define correct standard I/O things.
|
||||
// __USE_LARGEFILE64 Define LFS things with separate names.
|
||||
// __USE_FILE_OFFSET64 Define 64bit interface as default.
|
||||
// __USE_MISC Define things from 4.3BSD or System V Unix.
|
||||
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
|
||||
// __USE_GNU Define GNU extensions.
|
||||
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
|
||||
//
|
||||
// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
|
||||
// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
|
||||
// only for compatibility. All new code should use the other symbols
|
||||
// to test for features.
|
||||
//
|
||||
// All macros listed above as possibly being defined by this file are
|
||||
// explicitly undefined if they are not explicitly defined.
|
||||
// Feature-test macros that are not defined by the user or compiler
|
||||
// but are implied by the other feature-test macros defined (or by the
|
||||
// lack of any definitions) are defined by the file.
|
||||
//
|
||||
// ISO C feature test macros depend on the definition of the macro
|
||||
// when an affected header is included, not when the first system
|
||||
// header is included, and so they are handled in
|
||||
// <bits/libc-header-start.h>, which does not have a multiple include
|
||||
// guard. Feature test macros that can be handled from the first
|
||||
// system header included are handled here.
|
||||
|
||||
// Undefine everything, so we get a clean slate.
|
||||
|
||||
// Suppress kernel-name space pollution unless user expressedly asks
|
||||
// for it.
|
||||
|
||||
// Convenience macro to test the version of gcc.
|
||||
// Use like this:
|
||||
// #if __GNUC_PREREQ (2,8)
|
||||
// ... code requiring gcc 2.8 or later ...
|
||||
// #endif
|
||||
// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
|
||||
// added in 2.0.
|
||||
|
||||
// Similarly for clang. Features added to GCC after version 4.2 may
|
||||
// or may not also be available in clang, and clang's definitions of
|
||||
// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
|
||||
// features can be queried via __has_extension/__has_feature.
|
||||
|
||||
// Whether to use feature set F.
|
||||
|
||||
// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
|
||||
// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
|
||||
// issue a warning; the expectation is that the source is being
|
||||
// transitioned to use the new macro.
|
||||
|
||||
// If _GNU_SOURCE was defined by the user, turn on all the other features.
|
||||
|
||||
// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
|
||||
// define _DEFAULT_SOURCE.
|
||||
|
||||
// This is to enable the ISO C11 extension.
|
||||
|
||||
// This is to enable the ISO C99 extension.
|
||||
|
||||
// This is to enable the ISO C90 Amendment 1:1995 extension.
|
||||
|
||||
// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
|
||||
// is defined, use POSIX.1-2008 (or another version depending on
|
||||
// _XOPEN_SOURCE).
|
||||
|
||||
// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
|
||||
// defined in all multithreaded code. GNU libc has not required this
|
||||
// for many years. We now treat them as compatibility synonyms for
|
||||
// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
|
||||
// comprehensive support for multithreaded code. Using them never
|
||||
// lowers the selected level of POSIX conformance, only raises it.
|
||||
|
||||
// The function 'gets' existed in C89, but is impossible to use
|
||||
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
|
||||
// compatibility with various implementations of <cstdio>, this test
|
||||
// must consider only the value of __cplusplus when compiling C++.
|
||||
|
||||
// Get definitions of __STDC_* predefined macros, if the compiler has
|
||||
// not preincluded this header automatically.
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// This macro indicates that the installed library is the GNU C Library.
|
||||
// For historic reasons the value now is 6 and this will stay from now
|
||||
// on. The use of this variable is deprecated. Use __GLIBC__ and
|
||||
// __GLIBC_MINOR__ now (see below) when you want to test for a specific
|
||||
// GNU C library version and use the values in <gnu/lib-names.h> to get
|
||||
// the sonames of the shared libraries.
|
||||
|
||||
// Major and minor version number of the GNU C library package. Use
|
||||
// these macros to test for features in specific releases.
|
||||
|
||||
// This is here only because every header file already includes this one.
|
||||
// Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// We are almost always included from features.h.
|
||||
|
||||
// The GNU libc does not support any K&R compilers or the traditional mode
|
||||
// of ISO C compilers anymore. Check for some of the combinations not
|
||||
// anymore supported.
|
||||
|
||||
// Some user header file might have defined this before.
|
||||
|
||||
// All functions, except those with callbacks or those that
|
||||
// synchronize memory, are leaf functions.
|
||||
|
||||
// GCC can always grok prototypes. For C++ programs we add throw()
|
||||
// to help it optimize the function calls. But this works only with
|
||||
// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
|
||||
// as non-throwing using a function attribute since programs can use
|
||||
// the -fexceptions options for C code as well.
|
||||
|
||||
// Compilers that are not clang may object to
|
||||
// #if defined __clang__ && __has_extension(...)
|
||||
// even though they do not need to evaluate the right-hand side of the &&.
|
||||
|
||||
// These two macros are not used in glibc anymore. They are kept here
|
||||
// only because some other projects expect the macros to be defined.
|
||||
|
||||
// For these things, GCC behaves the ANSI way normally,
|
||||
// and the non-ANSI way under -traditional.
|
||||
|
||||
// This is not a typedef so `const __ptr_t' does the right thing.
|
||||
|
||||
// C++ needs to know that types and declarations are C, not C++.
|
||||
|
||||
// Fortify support.
|
||||
|
||||
// Support for flexible arrays.
|
||||
// Headers that should use flexible arrays only if they're "real"
|
||||
// (e.g. only if they won't affect sizeof()) should test
|
||||
// #if __glibc_c99_flexarr_available.
|
||||
|
||||
// __asm__ ("xyz") is used throughout the headers to rename functions
|
||||
// at the assembly language level. This is wrapped by the __REDIRECT
|
||||
// macro, in order to support compilers that can do this some other
|
||||
// way. When compilers don't support asm-names at all, we have to do
|
||||
// preprocessor tricks instead (which don't have exactly the right
|
||||
// semantics, but it's the best we can do).
|
||||
//
|
||||
// Example:
|
||||
// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
|
||||
|
||||
//
|
||||
// #elif __SOME_OTHER_COMPILER__
|
||||
//
|
||||
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
|
||||
|
||||
// GCC has various useful declarations that can be made with the
|
||||
// `__attribute__' syntax. All of the ways we use this do fine if
|
||||
// they are omitted for compilers that don't understand it.
|
||||
|
||||
// At some point during the gcc 2.96 development the `malloc' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
|
||||
// Tell the compiler which arguments to an allocation function
|
||||
// indicate the size of the allocation.
|
||||
|
||||
// At some point during the gcc 2.96 development the `pure' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
|
||||
// This declaration tells the compiler that the value is constant.
|
||||
|
||||
// At some point during the gcc 3.1 development the `used' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
|
||||
// Since version 3.2, gcc allows marking deprecated functions.
|
||||
|
||||
// Since version 4.5, gcc also allows one to specify the message printed
|
||||
// when a deprecated function is used. clang claims to be gcc 4.2, but
|
||||
// may also support this feature.
|
||||
|
||||
// At some point during the gcc 2.8 development the `format_arg' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
// If several `format_arg' attributes are given for the same function, in
|
||||
// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
|
||||
// all designated arguments are considered.
|
||||
|
||||
// At some point during the gcc 2.97 development the `strfmon' format
|
||||
// attribute for functions was introduced. We don't want to use it
|
||||
// unconditionally (although this would be possible) since it
|
||||
// generates warnings.
|
||||
|
||||
// The nonull function attribute allows to mark pointer parameters which
|
||||
// must not be NULL.
|
||||
|
||||
// If fortification mode, we warn about unused results of certain
|
||||
// function calls which can lead to problems.
|
||||
|
||||
// Forces a function to be always inlined.
|
||||
// The Linux kernel defines __always_inline in stddef.h (283d7573), and
|
||||
// it conflicts with this definition. Therefore undefine it first to
|
||||
// allow either header to be included first.
|
||||
|
||||
// Associate error messages with the source location of the call site rather
|
||||
// than with the source location inside the function.
|
||||
|
||||
// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
|
||||
// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
|
||||
// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
|
||||
// older than 4.3 may define these macros and still not guarantee GNU inlining
|
||||
// semantics.
|
||||
//
|
||||
// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
|
||||
// semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and
|
||||
// __GNUC_GNU_INLINE__ macro definitions.
|
||||
|
||||
// GCC 4.3 and above allow passing all anonymous arguments of an
|
||||
// __extern_always_inline function to some other vararg function.
|
||||
|
||||
// It is possible to compile containing GCC extensions even if GCC is
|
||||
// run in pedantic mode if the uses are carefully marked using the
|
||||
// `__extension__' keyword. But this is not generally available before
|
||||
// version 2.8.
|
||||
|
||||
// __restrict is known in EGCS 1.2 and above.
|
||||
|
||||
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
|
||||
// array_name[restrict]
|
||||
// GCC 3.1 supports this.
|
||||
|
||||
// Describes a char array whose address can safely be passed as the first
|
||||
// argument to strncpy and strncat, as the char array is not necessarily
|
||||
// a NUL-terminated string.
|
||||
|
||||
// Determine the wordsize from the preprocessor defines.
|
||||
|
||||
// Properties of long double type. ldbl-96 version.
|
||||
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// long double is distinct from double, so there is nothing to
|
||||
// define here.
|
||||
|
||||
// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
|
||||
// intended for use in preprocessor macros.
|
||||
//
|
||||
// Note: MESSAGE must be a _single_ string; concatenation of string
|
||||
// literals is not supported.
|
||||
|
||||
// Generic selection (ISO C11) is a C-only feature, available in GCC
|
||||
// since version 4.9. Previous versions do not provide generic
|
||||
// selection, even though they might set __STDC_VERSION__ to 201112L,
|
||||
// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
|
||||
// when testing __STDC_VERSION__ for generic selection support.
|
||||
// On the other hand, Clang also defines __GNUC__, so a clang-specific
|
||||
// check is required to enable the use of generic selection.
|
||||
|
||||
// If we don't have __REDIRECT, prototypes will be missing if
|
||||
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
|
||||
|
||||
// Decide whether we can define 'extern inline' functions in headers.
|
||||
|
||||
// This is here only because every header file already includes this one.
|
||||
// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
|
||||
// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
|
||||
// that will always return failure (and set errno to ENOSYS).
|
||||
// This file is automatically generated.
|
||||
// This file selects the right generated file of `__stub_FUNCTION' macros
|
||||
// based on the architecture being compiled for.
|
||||
|
||||
// This file is automatically generated.
|
||||
// It defines a symbol `__stub_FUNCTION' for each function
|
||||
// in the C library which is a stub, meaning it will fail
|
||||
// every time called, usually setting errno to ENOSYS.
|
||||
|
||||
// This must be early so <bits/fcntl.h> can define types winningly.
|
||||
|
||||
// Get __mode_t, __dev_t and __off_t .
|
||||
// bits/types.h -- definitions of __*_t types underlying *_t types.
|
||||
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Never include this file directly; use <sys/types.h> instead.
|
||||
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Determine the wordsize from the preprocessor defines.
|
||||
|
||||
// Convenience types.
|
||||
type X__u_char = uint8 /* types.h:30:23 */
|
||||
type X__u_short = uint16 /* types.h:31:28 */
|
||||
type X__u_int = uint32 /* types.h:32:22 */
|
||||
type X__u_long = uint32 /* types.h:33:27 */
|
||||
|
||||
// Fixed-size types, underlying types depend on word size and compiler.
|
||||
type X__int8_t = int8 /* types.h:36:21 */
|
||||
type X__uint8_t = uint8 /* types.h:37:23 */
|
||||
type X__int16_t = int16 /* types.h:38:26 */
|
||||
type X__uint16_t = uint16 /* types.h:39:28 */
|
||||
type X__int32_t = int32 /* types.h:40:20 */
|
||||
type X__uint32_t = uint32 /* types.h:41:22 */
|
||||
type X__int64_t = int64 /* types.h:46:44 */
|
||||
type X__uint64_t = uint64 /* types.h:47:46 */
|
||||
|
||||
// Smallest types with at least a given width.
|
||||
type X__int_least8_t = X__int8_t /* types.h:51:18 */
|
||||
type X__uint_least8_t = X__uint8_t /* types.h:52:19 */
|
||||
type X__int_least16_t = X__int16_t /* types.h:53:19 */
|
||||
type X__uint_least16_t = X__uint16_t /* types.h:54:20 */
|
||||
type X__int_least32_t = X__int32_t /* types.h:55:19 */
|
||||
type X__uint_least32_t = X__uint32_t /* types.h:56:20 */
|
||||
type X__int_least64_t = X__int64_t /* types.h:57:19 */
|
||||
type X__uint_least64_t = X__uint64_t /* types.h:58:20 */
|
||||
|
||||
// quad_t is also 64 bits.
|
||||
type X__quad_t = int64 /* types.h:65:37 */
|
||||
type X__u_quad_t = uint64 /* types.h:66:46 */
|
||||
|
||||
// Largest integral types.
|
||||
type X__intmax_t = int64 /* types.h:74:37 */
|
||||
type X__uintmax_t = uint64 /* types.h:75:46 */
|
||||
|
||||
// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
|
||||
// macros for each of the OS types we define below. The definitions
|
||||
// of those macros must use the following macros for underlying types.
|
||||
// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
|
||||
// variants of each of the following integer types on this machine.
|
||||
//
|
||||
// 16 -- "natural" 16-bit type (always short)
|
||||
// 32 -- "natural" 32-bit type (always int)
|
||||
// 64 -- "natural" 64-bit type (long or long long)
|
||||
// LONG32 -- 32-bit type, traditionally long
|
||||
// QUAD -- 64-bit type, always long long
|
||||
// WORD -- natural type of __WORDSIZE bits (int or long)
|
||||
// LONGWORD -- type of __WORDSIZE bits, traditionally long
|
||||
//
|
||||
// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
|
||||
// conventional uses of `long' or `long long' type modifiers match the
|
||||
// types we define, even when a less-adorned type would be the same size.
|
||||
// This matters for (somewhat) portably writing printf/scanf formats for
|
||||
// these types, where using the appropriate l or ll format modifiers can
|
||||
// make the typedefs and the formats match up across all GNU platforms. If
|
||||
// we used `long' when it's 64 bits where `long long' is expected, then the
|
||||
// compiler would warn about the formats not matching the argument types,
|
||||
// and the programmer changing them to shut up the compiler would break the
|
||||
// program's portability.
|
||||
//
|
||||
// Here we assume what is presently the case in all the GCC configurations
|
||||
// we support: long long is always 64 bits, long is always word/address size,
|
||||
// and int is always 32 bits.
|
||||
|
||||
// We want __extension__ before typedef's that use nonstandard base types
|
||||
// such as `long long' in C89 mode.
|
||||
// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
|
||||
// Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// See <bits/types.h> for the meaning of these macros. This file exists so
|
||||
// that <bits/types.h> need not vary across different GNU platforms.
|
||||
|
||||
// X32 kernel interface is 64-bit.
|
||||
|
||||
// Number of descriptors that can fit in an `fd_set'.
|
||||
|
||||
type X__dev_t = X__u_quad_t /* types.h:143:25 */ // Type of device numbers.
|
||||
type X__uid_t = uint32 /* types.h:144:25 */ // Type of user identifications.
|
||||
type X__gid_t = uint32 /* types.h:145:25 */ // Type of group identifications.
|
||||
type X__ino_t = uint32 /* types.h:146:25 */ // Type of file serial numbers.
|
||||
type X__ino64_t = X__u_quad_t /* types.h:147:27 */ // Type of file serial numbers (LFS).
|
||||
type X__mode_t = uint32 /* types.h:148:26 */ // Type of file attribute bitmasks.
|
||||
type X__nlink_t = uint32 /* types.h:149:27 */ // Type of file link counts.
|
||||
type X__off_t = int32 /* types.h:150:25 */ // Type of file sizes and offsets.
|
||||
type X__off64_t = X__quad_t /* types.h:151:27 */ // Type of file sizes and offsets (LFS).
|
||||
type X__pid_t = int32 /* types.h:152:25 */ // Type of process identifications.
|
||||
type X__fsid_t = struct{ F__val [2]int32 } /* types.h:153:26 */ // Type of file system IDs.
|
||||
type X__clock_t = int32 /* types.h:154:27 */ // Type of CPU usage counts.
|
||||
type X__rlim_t = uint32 /* types.h:155:26 */ // Type for resource measurement.
|
||||
type X__rlim64_t = X__u_quad_t /* types.h:156:28 */ // Type for resource measurement (LFS).
|
||||
type X__id_t = uint32 /* types.h:157:24 */ // General type for IDs.
|
||||
type X__time_t = int32 /* types.h:158:26 */ // Seconds since the Epoch.
|
||||
type X__useconds_t = uint32 /* types.h:159:30 */ // Count of microseconds.
|
||||
type X__suseconds_t = int32 /* types.h:160:31 */ // Signed count of microseconds.
|
||||
|
||||
type X__daddr_t = int32 /* types.h:162:27 */ // The type of a disk address.
|
||||
type X__key_t = int32 /* types.h:163:25 */ // Type of an IPC key.
|
||||
|
||||
// Clock ID used in clock and timer functions.
|
||||
type X__clockid_t = int32 /* types.h:166:29 */
|
||||
|
||||
// Timer ID returned by `timer_create'.
|
||||
type X__timer_t = uintptr /* types.h:169:12 */
|
||||
|
||||
// Type to represent block size.
|
||||
type X__blksize_t = int32 /* types.h:172:29 */
|
||||
|
||||
// Types from the Large File Support interface.
|
||||
|
||||
// Type to count number of disk blocks.
|
||||
type X__blkcnt_t = int32 /* types.h:177:28 */
|
||||
type X__blkcnt64_t = X__quad_t /* types.h:178:30 */
|
||||
|
||||
// Type to count file system blocks.
|
||||
type X__fsblkcnt_t = uint32 /* types.h:181:30 */
|
||||
type X__fsblkcnt64_t = X__u_quad_t /* types.h:182:32 */
|
||||
|
||||
// Type to count file system nodes.
|
||||
type X__fsfilcnt_t = uint32 /* types.h:185:30 */
|
||||
type X__fsfilcnt64_t = X__u_quad_t /* types.h:186:32 */
|
||||
|
||||
// Type of miscellaneous file system fields.
|
||||
type X__fsword_t = int32 /* types.h:189:28 */
|
||||
|
||||
type X__ssize_t = int32 /* types.h:191:27 */ // Type of a byte count, or error.
|
||||
|
||||
// Signed long type used in system calls.
|
||||
type X__syscall_slong_t = int32 /* types.h:194:33 */
|
||||
// Unsigned long type used in system calls.
|
||||
type X__syscall_ulong_t = uint32 /* types.h:196:33 */
|
||||
|
||||
// These few don't really vary by system, they always correspond
|
||||
// to one of the other defined types.
|
||||
type X__loff_t = X__off64_t /* types.h:200:19 */ // Type of file sizes and offsets (LFS).
|
||||
type X__caddr_t = uintptr /* types.h:201:14 */
|
||||
|
||||
// Duplicates info from stdint.h but this is used in unistd.h.
|
||||
type X__intptr_t = int32 /* types.h:204:25 */
|
||||
|
||||
// Duplicate info from sys/socket.h.
|
||||
type X__socklen_t = uint32 /* types.h:207:23 */
|
||||
|
||||
// C99: An integer type that can be accessed as an atomic entity,
|
||||
// even in the presence of asynchronous interrupts.
|
||||
// It is not currently necessary for this to be machine-specific.
|
||||
type X__sig_atomic_t = int32 /* types.h:212:13 */
|
||||
|
||||
// Get the definitions of O_*, F_*, FD_*: all the
|
||||
// numbers and flag bits for `open', `fcntl', et al.
|
||||
// O_*, F_*, FD_* bit values for Linux/x86.
|
||||
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
type Flock = struct {
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
Fl_start X__off64_t
|
||||
Fl_len X__off64_t
|
||||
Fl_pid X__pid_t
|
||||
} /* fcntl.h:35:1 */
|
||||
|
||||
// Include generic Linux declarations.
|
||||
// O_*, F_*, FD_* bit values for Linux.
|
||||
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// This file contains shared definitions between Linux architectures
|
||||
// and is included by <bits/fcntl.h> to declare them. The various
|
||||
// #ifndef cases allow the architecture specific file to define those
|
||||
// values with different values.
|
||||
//
|
||||
// A minimal <bits/fcntl.h> contains just:
|
||||
//
|
||||
// struct flock {...}
|
||||
// #ifdef __USE_LARGEFILE64
|
||||
// struct flock64 {...}
|
||||
// #endif
|
||||
// #include <bits/fcntl-linux.h>
|
||||
|
||||
// open/fcntl.
|
||||
|
||||
// open file description locks.
|
||||
//
|
||||
// Usually record locks held by a process are released on *any* close and are
|
||||
// not inherited across a fork.
|
||||
//
|
||||
// These cmd values will set locks that conflict with process-associated record
|
||||
// locks, but are "owned" by the opened file description, not the process.
|
||||
// This means that they are inherited across fork or clone with CLONE_FILES
|
||||
// like BSD (flock) locks, and they are only released automatically when the
|
||||
// last reference to the the file description against which they were acquired
|
||||
// is put.
|
||||
|
||||
// For now, Linux has no separate synchronicity options for read
|
||||
// operations. We define O_RSYNC therefore as the same as O_SYNC
|
||||
// since this is a superset.
|
||||
|
||||
// Values for the second argument to `fcntl'.
|
||||
|
||||
// For F_[GET|SET]FD.
|
||||
|
||||
// For posix fcntl() and `l_type' field of a `struct flock' for lockf().
|
||||
|
||||
// For old implementation of BSD flock.
|
||||
|
||||
// Operations for BSD flock, also used by the kernel implementation.
|
||||
|
||||
// Define some more compatibility macros to be backward compatible with
|
||||
// BSD systems which did not managed to hide these kernel macros.
|
||||
|
||||
// Advise to `posix_fadvise'.
|
||||
|
||||
// Values for `*at' functions.
|
||||
|
||||
// Detect if open needs mode as a third argument (or for openat as a fourth
|
||||
// argument).
|
||||
|
||||
// POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
|
||||
// Earlier POSIX standards permitted any type ending in `_t' to be defined
|
||||
// by any POSIX header, so we don't conditionalize the definitions here.
|
||||
type Mode_t = X__mode_t /* fcntl.h:50:18 */
|
||||
|
||||
type Off_t = X__off64_t /* fcntl.h:58:19 */
|
||||
|
||||
type Pid_t = X__pid_t /* fcntl.h:69:17 */
|
||||
|
||||
// For XPG all symbols from <sys/stat.h> should also be available.
|
||||
// NB: Include guard matches what <linux/time.h> uses.
|
||||
|
||||
// bits/types.h -- definitions of __*_t types underlying *_t types.
|
||||
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Never include this file directly; use <sys/types.h> instead.
|
||||
|
||||
// POSIX.1b structure for a time value. This is like a `struct timeval' but
|
||||
// has nanoseconds instead of microseconds.
|
||||
type Timespec = struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
} /* struct_timespec.h:9:1 */
|
||||
|
||||
// Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Versions of the `struct stat' data structure.
|
||||
|
||||
// i386 versions of the `xmknod' interface.
|
||||
|
||||
type Stat = struct {
|
||||
Fst_dev X__dev_t
|
||||
F__pad1 uint16
|
||||
_ [2]byte
|
||||
F__st_ino X__ino_t
|
||||
Fst_mode X__mode_t
|
||||
Fst_nlink X__nlink_t
|
||||
Fst_uid X__uid_t
|
||||
Fst_gid X__gid_t
|
||||
Fst_rdev X__dev_t
|
||||
F__pad2 uint16
|
||||
_ [2]byte
|
||||
Fst_size X__off64_t
|
||||
Fst_blksize X__blksize_t
|
||||
Fst_blocks X__blkcnt64_t
|
||||
Fst_atim struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
}
|
||||
Fst_mtim struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
}
|
||||
Fst_ctim struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
}
|
||||
Fst_ino X__ino64_t
|
||||
} /* stat.h:46:1 */
|
||||
|
||||
// Define some inlines helping to catch common problems.
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
980
vendor/modernc.org/libc/fcntl/fcntl_linux_amd64.go
generated
vendored
Normal file
980
vendor/modernc.org/libc/fcntl/fcntl_linux_amd64.go
generated
vendored
Normal file
@ -0,0 +1,980 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
AT_EACCESS = 0x200
|
||||
AT_FDCWD = -100
|
||||
AT_REMOVEDIR = 0x200
|
||||
AT_SYMLINK_FOLLOW = 0x400
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
FAPPEND = 1024
|
||||
FASYNC = 8192
|
||||
FD_CLOEXEC = 1
|
||||
FFSYNC = 1052672
|
||||
FNDELAY = 2048
|
||||
FNONBLOCK = 2048
|
||||
F_DUPFD = 0
|
||||
F_DUPFD_CLOEXEC = 1030
|
||||
F_EXLCK = 4
|
||||
F_GETFD = 1
|
||||
F_GETFL = 3
|
||||
F_GETLK = 5
|
||||
F_GETLK64 = 5
|
||||
F_GETOWN = 9
|
||||
F_LOCK = 1
|
||||
F_OK = 0
|
||||
F_RDLCK = 0
|
||||
F_SETFD = 2
|
||||
F_SETFL = 4
|
||||
F_SETLK = 6
|
||||
F_SETLK64 = 6
|
||||
F_SETLKW = 7
|
||||
F_SETLKW64 = 7
|
||||
F_SETOWN = 8
|
||||
F_SHLCK = 8
|
||||
F_TEST = 3
|
||||
F_TLOCK = 2
|
||||
F_ULOCK = 0
|
||||
F_UNLCK = 2
|
||||
F_WRLCK = 1
|
||||
LOCK_EX = 2
|
||||
LOCK_NB = 4
|
||||
LOCK_SH = 1
|
||||
LOCK_UN = 8
|
||||
O_ACCMODE = 0003
|
||||
O_APPEND = 02000
|
||||
O_ASYNC = 020000
|
||||
O_CLOEXEC = 524288
|
||||
O_CREAT = 0100
|
||||
O_DIRECTORY = 65536
|
||||
O_DSYNC = 4096
|
||||
O_EXCL = 0200
|
||||
O_FSYNC = 1052672
|
||||
O_NDELAY = 2048
|
||||
O_NOCTTY = 0400
|
||||
O_NOFOLLOW = 131072
|
||||
O_NONBLOCK = 04000
|
||||
O_RDONLY = 00
|
||||
O_RDWR = 02
|
||||
O_RSYNC = 1052672
|
||||
O_SYNC = 04010000
|
||||
O_TRUNC = 01000
|
||||
O_WRONLY = 01
|
||||
POSIX_FADV_DONTNEED = 4
|
||||
POSIX_FADV_NOREUSE = 5
|
||||
POSIX_FADV_NORMAL = 0
|
||||
POSIX_FADV_RANDOM = 1
|
||||
POSIX_FADV_SEQUENTIAL = 2
|
||||
POSIX_FADV_WILLNEED = 3
|
||||
R_OK = 4
|
||||
SEEK_CUR = 1
|
||||
SEEK_END = 2
|
||||
SEEK_SET = 0
|
||||
S_IFBLK = 24576
|
||||
S_IFCHR = 8192
|
||||
S_IFDIR = 16384
|
||||
S_IFIFO = 4096
|
||||
S_IFLNK = 40960
|
||||
S_IFMT = 61440
|
||||
S_IFREG = 32768
|
||||
S_IFSOCK = 49152
|
||||
S_IRGRP = 32
|
||||
S_IROTH = 4
|
||||
S_IRUSR = 256
|
||||
S_IRWXG = 56
|
||||
S_IRWXO = 7
|
||||
S_IRWXU = 448
|
||||
S_ISGID = 1024
|
||||
S_ISUID = 2048
|
||||
S_ISVTX = 512
|
||||
S_IWGRP = 16
|
||||
S_IWOTH = 2
|
||||
S_IWUSR = 128
|
||||
S_IXGRP = 8
|
||||
S_IXOTH = 1
|
||||
S_IXUSR = 64
|
||||
UTIME_NOW = 1073741823
|
||||
UTIME_OMIT = 1073741822
|
||||
W_OK = 2
|
||||
X_OK = 1
|
||||
X_ATFILE_SOURCE = 1
|
||||
X_BITS_STAT_H = 1
|
||||
X_BITS_TYPESIZES_H = 1
|
||||
X_BITS_TYPES_H = 1
|
||||
X_DEFAULT_SOURCE = 1
|
||||
X_FCNTL_H = 1
|
||||
X_FEATURES_H = 1
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_LP64 = 1
|
||||
X_MKNOD_VER_LINUX = 0
|
||||
X_POSIX_C_SOURCE = 200809
|
||||
X_POSIX_SOURCE = 1
|
||||
X_STATBUF_ST_BLKSIZE = 0
|
||||
X_STATBUF_ST_NSEC = 0
|
||||
X_STATBUF_ST_RDEV = 0
|
||||
X_STAT_VER = 1
|
||||
X_STAT_VER_KERNEL = 0
|
||||
X_STAT_VER_LINUX = 1
|
||||
X_STDC_PREDEF_H = 1
|
||||
X_STRUCT_TIMESPEC = 1
|
||||
X_SYS_CDEFS_H = 1
|
||||
Linux = 1
|
||||
Unix = 1
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// POSIX Standard: 6.5 File Control Operations <fcntl.h>
|
||||
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// These are defined by the user (or the compiler)
|
||||
// to specify the desired environment:
|
||||
//
|
||||
// __STRICT_ANSI__ ISO Standard C.
|
||||
// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
|
||||
// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
|
||||
// __STDC_WANT_LIB_EXT2__
|
||||
// Extensions to ISO C99 from TR 27431-2:2010.
|
||||
// __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
// Extensions to ISO C11 from TS 18661-1:2014.
|
||||
// __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
// Extensions to ISO C11 from TS 18661-4:2015.
|
||||
// __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
// Extensions to ISO C11 from TS 18661-3:2015.
|
||||
//
|
||||
// _POSIX_SOURCE IEEE Std 1003.1.
|
||||
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
|
||||
// if >=199309L, add IEEE Std 1003.1b-1993;
|
||||
// if >=199506L, add IEEE Std 1003.1c-1995;
|
||||
// if >=200112L, all of IEEE 1003.1-2004
|
||||
// if >=200809L, all of IEEE 1003.1-2008
|
||||
// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
|
||||
// Single Unix conformance is wanted, to 600 for the
|
||||
// sixth revision, to 700 for the seventh revision.
|
||||
// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
|
||||
// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
|
||||
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
|
||||
// _FILE_OFFSET_BITS=N Select default filesystem interface.
|
||||
// _ATFILE_SOURCE Additional *at interfaces.
|
||||
// _GNU_SOURCE All of the above, plus GNU extensions.
|
||||
// _DEFAULT_SOURCE The default set of features (taking precedence over
|
||||
// __STRICT_ANSI__).
|
||||
//
|
||||
// _FORTIFY_SOURCE Add security hardening to many library functions.
|
||||
// Set to 1 or 2; 2 performs stricter checks than 1.
|
||||
//
|
||||
// _REENTRANT, _THREAD_SAFE
|
||||
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
|
||||
//
|
||||
// The `-ansi' switch to the GNU C compiler, and standards conformance
|
||||
// options such as `-std=c99', define __STRICT_ANSI__. If none of
|
||||
// these are defined, or if _DEFAULT_SOURCE is defined, the default is
|
||||
// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
|
||||
// 200809L, as well as enabling miscellaneous functions from BSD and
|
||||
// SVID. If more than one of these are defined, they accumulate. For
|
||||
// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
|
||||
// give you ISO C, 1003.1, and 1003.2, but nothing else.
|
||||
//
|
||||
// These are defined by this file and are used by the
|
||||
// header files to decide what to declare or define:
|
||||
//
|
||||
// __GLIBC_USE (F) Define things from feature set F. This is defined
|
||||
// to 1 or 0; the subsequent macros are either defined
|
||||
// or undefined, and those tests should be moved to
|
||||
// __GLIBC_USE.
|
||||
// __USE_ISOC11 Define ISO C11 things.
|
||||
// __USE_ISOC99 Define ISO C99 things.
|
||||
// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
|
||||
// __USE_ISOCXX11 Define ISO C++11 things.
|
||||
// __USE_POSIX Define IEEE Std 1003.1 things.
|
||||
// __USE_POSIX2 Define IEEE Std 1003.2 things.
|
||||
// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
|
||||
// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
|
||||
// __USE_XOPEN Define XPG things.
|
||||
// __USE_XOPEN_EXTENDED Define X/Open Unix things.
|
||||
// __USE_UNIX98 Define Single Unix V2 things.
|
||||
// __USE_XOPEN2K Define XPG6 things.
|
||||
// __USE_XOPEN2KXSI Define XPG6 XSI things.
|
||||
// __USE_XOPEN2K8 Define XPG7 things.
|
||||
// __USE_XOPEN2K8XSI Define XPG7 XSI things.
|
||||
// __USE_LARGEFILE Define correct standard I/O things.
|
||||
// __USE_LARGEFILE64 Define LFS things with separate names.
|
||||
// __USE_FILE_OFFSET64 Define 64bit interface as default.
|
||||
// __USE_MISC Define things from 4.3BSD or System V Unix.
|
||||
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
|
||||
// __USE_GNU Define GNU extensions.
|
||||
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
|
||||
//
|
||||
// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
|
||||
// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
|
||||
// only for compatibility. All new code should use the other symbols
|
||||
// to test for features.
|
||||
//
|
||||
// All macros listed above as possibly being defined by this file are
|
||||
// explicitly undefined if they are not explicitly defined.
|
||||
// Feature-test macros that are not defined by the user or compiler
|
||||
// but are implied by the other feature-test macros defined (or by the
|
||||
// lack of any definitions) are defined by the file.
|
||||
//
|
||||
// ISO C feature test macros depend on the definition of the macro
|
||||
// when an affected header is included, not when the first system
|
||||
// header is included, and so they are handled in
|
||||
// <bits/libc-header-start.h>, which does not have a multiple include
|
||||
// guard. Feature test macros that can be handled from the first
|
||||
// system header included are handled here.
|
||||
|
||||
// Undefine everything, so we get a clean slate.
|
||||
|
||||
// Suppress kernel-name space pollution unless user expressedly asks
|
||||
// for it.
|
||||
|
||||
// Convenience macro to test the version of gcc.
|
||||
// Use like this:
|
||||
// #if __GNUC_PREREQ (2,8)
|
||||
// ... code requiring gcc 2.8 or later ...
|
||||
// #endif
|
||||
// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
|
||||
// added in 2.0.
|
||||
|
||||
// Similarly for clang. Features added to GCC after version 4.2 may
|
||||
// or may not also be available in clang, and clang's definitions of
|
||||
// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
|
||||
// features can be queried via __has_extension/__has_feature.
|
||||
|
||||
// Whether to use feature set F.
|
||||
|
||||
// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
|
||||
// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
|
||||
// issue a warning; the expectation is that the source is being
|
||||
// transitioned to use the new macro.
|
||||
|
||||
// If _GNU_SOURCE was defined by the user, turn on all the other features.
|
||||
|
||||
// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
|
||||
// define _DEFAULT_SOURCE.
|
||||
|
||||
// This is to enable the ISO C11 extension.
|
||||
|
||||
// This is to enable the ISO C99 extension.
|
||||
|
||||
// This is to enable the ISO C90 Amendment 1:1995 extension.
|
||||
|
||||
// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
|
||||
// is defined, use POSIX.1-2008 (or another version depending on
|
||||
// _XOPEN_SOURCE).
|
||||
|
||||
// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
|
||||
// defined in all multithreaded code. GNU libc has not required this
|
||||
// for many years. We now treat them as compatibility synonyms for
|
||||
// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
|
||||
// comprehensive support for multithreaded code. Using them never
|
||||
// lowers the selected level of POSIX conformance, only raises it.
|
||||
|
||||
// The function 'gets' existed in C89, but is impossible to use
|
||||
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
|
||||
// compatibility with various implementations of <cstdio>, this test
|
||||
// must consider only the value of __cplusplus when compiling C++.
|
||||
|
||||
// Get definitions of __STDC_* predefined macros, if the compiler has
|
||||
// not preincluded this header automatically.
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// This macro indicates that the installed library is the GNU C Library.
|
||||
// For historic reasons the value now is 6 and this will stay from now
|
||||
// on. The use of this variable is deprecated. Use __GLIBC__ and
|
||||
// __GLIBC_MINOR__ now (see below) when you want to test for a specific
|
||||
// GNU C library version and use the values in <gnu/lib-names.h> to get
|
||||
// the sonames of the shared libraries.
|
||||
|
||||
// Major and minor version number of the GNU C library package. Use
|
||||
// these macros to test for features in specific releases.
|
||||
|
||||
// This is here only because every header file already includes this one.
|
||||
// Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// We are almost always included from features.h.
|
||||
|
||||
// The GNU libc does not support any K&R compilers or the traditional mode
|
||||
// of ISO C compilers anymore. Check for some of the combinations not
|
||||
// anymore supported.
|
||||
|
||||
// Some user header file might have defined this before.
|
||||
|
||||
// All functions, except those with callbacks or those that
|
||||
// synchronize memory, are leaf functions.
|
||||
|
||||
// GCC can always grok prototypes. For C++ programs we add throw()
|
||||
// to help it optimize the function calls. But this works only with
|
||||
// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
|
||||
// as non-throwing using a function attribute since programs can use
|
||||
// the -fexceptions options for C code as well.
|
||||
|
||||
// Compilers that are not clang may object to
|
||||
// #if defined __clang__ && __has_extension(...)
|
||||
// even though they do not need to evaluate the right-hand side of the &&.
|
||||
|
||||
// These two macros are not used in glibc anymore. They are kept here
|
||||
// only because some other projects expect the macros to be defined.
|
||||
|
||||
// For these things, GCC behaves the ANSI way normally,
|
||||
// and the non-ANSI way under -traditional.
|
||||
|
||||
// This is not a typedef so `const __ptr_t' does the right thing.
|
||||
|
||||
// C++ needs to know that types and declarations are C, not C++.
|
||||
|
||||
// Fortify support.
|
||||
|
||||
// Support for flexible arrays.
|
||||
// Headers that should use flexible arrays only if they're "real"
|
||||
// (e.g. only if they won't affect sizeof()) should test
|
||||
// #if __glibc_c99_flexarr_available.
|
||||
|
||||
// __asm__ ("xyz") is used throughout the headers to rename functions
|
||||
// at the assembly language level. This is wrapped by the __REDIRECT
|
||||
// macro, in order to support compilers that can do this some other
|
||||
// way. When compilers don't support asm-names at all, we have to do
|
||||
// preprocessor tricks instead (which don't have exactly the right
|
||||
// semantics, but it's the best we can do).
|
||||
//
|
||||
// Example:
|
||||
// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
|
||||
|
||||
//
|
||||
// #elif __SOME_OTHER_COMPILER__
|
||||
//
|
||||
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
|
||||
|
||||
// GCC has various useful declarations that can be made with the
|
||||
// `__attribute__' syntax. All of the ways we use this do fine if
|
||||
// they are omitted for compilers that don't understand it.
|
||||
|
||||
// At some point during the gcc 2.96 development the `malloc' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
|
||||
// Tell the compiler which arguments to an allocation function
|
||||
// indicate the size of the allocation.
|
||||
|
||||
// At some point during the gcc 2.96 development the `pure' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
|
||||
// This declaration tells the compiler that the value is constant.
|
||||
|
||||
// At some point during the gcc 3.1 development the `used' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
|
||||
// Since version 3.2, gcc allows marking deprecated functions.
|
||||
|
||||
// Since version 4.5, gcc also allows one to specify the message printed
|
||||
// when a deprecated function is used. clang claims to be gcc 4.2, but
|
||||
// may also support this feature.
|
||||
|
||||
// At some point during the gcc 2.8 development the `format_arg' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
// If several `format_arg' attributes are given for the same function, in
|
||||
// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
|
||||
// all designated arguments are considered.
|
||||
|
||||
// At some point during the gcc 2.97 development the `strfmon' format
|
||||
// attribute for functions was introduced. We don't want to use it
|
||||
// unconditionally (although this would be possible) since it
|
||||
// generates warnings.
|
||||
|
||||
// The nonull function attribute allows to mark pointer parameters which
|
||||
// must not be NULL.
|
||||
|
||||
// If fortification mode, we warn about unused results of certain
|
||||
// function calls which can lead to problems.
|
||||
|
||||
// Forces a function to be always inlined.
|
||||
// The Linux kernel defines __always_inline in stddef.h (283d7573), and
|
||||
// it conflicts with this definition. Therefore undefine it first to
|
||||
// allow either header to be included first.
|
||||
|
||||
// Associate error messages with the source location of the call site rather
|
||||
// than with the source location inside the function.
|
||||
|
||||
// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
|
||||
// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
|
||||
// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
|
||||
// older than 4.3 may define these macros and still not guarantee GNU inlining
|
||||
// semantics.
|
||||
//
|
||||
// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
|
||||
// semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and
|
||||
// __GNUC_GNU_INLINE__ macro definitions.
|
||||
|
||||
// GCC 4.3 and above allow passing all anonymous arguments of an
|
||||
// __extern_always_inline function to some other vararg function.
|
||||
|
||||
// It is possible to compile containing GCC extensions even if GCC is
|
||||
// run in pedantic mode if the uses are carefully marked using the
|
||||
// `__extension__' keyword. But this is not generally available before
|
||||
// version 2.8.
|
||||
|
||||
// __restrict is known in EGCS 1.2 and above.
|
||||
|
||||
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
|
||||
// array_name[restrict]
|
||||
// GCC 3.1 supports this.
|
||||
|
||||
// Describes a char array whose address can safely be passed as the first
|
||||
// argument to strncpy and strncat, as the char array is not necessarily
|
||||
// a NUL-terminated string.
|
||||
|
||||
// Determine the wordsize from the preprocessor defines.
|
||||
|
||||
// Both x86-64 and x32 use the 64-bit system call interface.
|
||||
// Properties of long double type. ldbl-96 version.
|
||||
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// long double is distinct from double, so there is nothing to
|
||||
// define here.
|
||||
|
||||
// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
|
||||
// intended for use in preprocessor macros.
|
||||
//
|
||||
// Note: MESSAGE must be a _single_ string; concatenation of string
|
||||
// literals is not supported.
|
||||
|
||||
// Generic selection (ISO C11) is a C-only feature, available in GCC
|
||||
// since version 4.9. Previous versions do not provide generic
|
||||
// selection, even though they might set __STDC_VERSION__ to 201112L,
|
||||
// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
|
||||
// when testing __STDC_VERSION__ for generic selection support.
|
||||
// On the other hand, Clang also defines __GNUC__, so a clang-specific
|
||||
// check is required to enable the use of generic selection.
|
||||
|
||||
// If we don't have __REDIRECT, prototypes will be missing if
|
||||
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
|
||||
|
||||
// Decide whether we can define 'extern inline' functions in headers.
|
||||
|
||||
// This is here only because every header file already includes this one.
|
||||
// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
|
||||
// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
|
||||
// that will always return failure (and set errno to ENOSYS).
|
||||
// This file is automatically generated.
|
||||
// This file selects the right generated file of `__stub_FUNCTION' macros
|
||||
// based on the architecture being compiled for.
|
||||
|
||||
// This file is automatically generated.
|
||||
// It defines a symbol `__stub_FUNCTION' for each function
|
||||
// in the C library which is a stub, meaning it will fail
|
||||
// every time called, usually setting errno to ENOSYS.
|
||||
|
||||
// This must be early so <bits/fcntl.h> can define types winningly.
|
||||
|
||||
// Get __mode_t, __dev_t and __off_t .
|
||||
// bits/types.h -- definitions of __*_t types underlying *_t types.
|
||||
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Never include this file directly; use <sys/types.h> instead.
|
||||
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Determine the wordsize from the preprocessor defines.
|
||||
|
||||
// Both x86-64 and x32 use the 64-bit system call interface.
|
||||
|
||||
// Convenience types.
|
||||
type X__u_char = uint8 /* types.h:30:23 */
|
||||
type X__u_short = uint16 /* types.h:31:28 */
|
||||
type X__u_int = uint32 /* types.h:32:22 */
|
||||
type X__u_long = uint64 /* types.h:33:27 */
|
||||
|
||||
// Fixed-size types, underlying types depend on word size and compiler.
|
||||
type X__int8_t = int8 /* types.h:36:21 */
|
||||
type X__uint8_t = uint8 /* types.h:37:23 */
|
||||
type X__int16_t = int16 /* types.h:38:26 */
|
||||
type X__uint16_t = uint16 /* types.h:39:28 */
|
||||
type X__int32_t = int32 /* types.h:40:20 */
|
||||
type X__uint32_t = uint32 /* types.h:41:22 */
|
||||
type X__int64_t = int64 /* types.h:43:25 */
|
||||
type X__uint64_t = uint64 /* types.h:44:27 */
|
||||
|
||||
// Smallest types with at least a given width.
|
||||
type X__int_least8_t = X__int8_t /* types.h:51:18 */
|
||||
type X__uint_least8_t = X__uint8_t /* types.h:52:19 */
|
||||
type X__int_least16_t = X__int16_t /* types.h:53:19 */
|
||||
type X__uint_least16_t = X__uint16_t /* types.h:54:20 */
|
||||
type X__int_least32_t = X__int32_t /* types.h:55:19 */
|
||||
type X__uint_least32_t = X__uint32_t /* types.h:56:20 */
|
||||
type X__int_least64_t = X__int64_t /* types.h:57:19 */
|
||||
type X__uint_least64_t = X__uint64_t /* types.h:58:20 */
|
||||
|
||||
// quad_t is also 64 bits.
|
||||
type X__quad_t = int64 /* types.h:62:18 */
|
||||
type X__u_quad_t = uint64 /* types.h:63:27 */
|
||||
|
||||
// Largest integral types.
|
||||
type X__intmax_t = int64 /* types.h:71:18 */
|
||||
type X__uintmax_t = uint64 /* types.h:72:27 */
|
||||
|
||||
// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
|
||||
// macros for each of the OS types we define below. The definitions
|
||||
// of those macros must use the following macros for underlying types.
|
||||
// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
|
||||
// variants of each of the following integer types on this machine.
|
||||
//
|
||||
// 16 -- "natural" 16-bit type (always short)
|
||||
// 32 -- "natural" 32-bit type (always int)
|
||||
// 64 -- "natural" 64-bit type (long or long long)
|
||||
// LONG32 -- 32-bit type, traditionally long
|
||||
// QUAD -- 64-bit type, always long long
|
||||
// WORD -- natural type of __WORDSIZE bits (int or long)
|
||||
// LONGWORD -- type of __WORDSIZE bits, traditionally long
|
||||
//
|
||||
// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
|
||||
// conventional uses of `long' or `long long' type modifiers match the
|
||||
// types we define, even when a less-adorned type would be the same size.
|
||||
// This matters for (somewhat) portably writing printf/scanf formats for
|
||||
// these types, where using the appropriate l or ll format modifiers can
|
||||
// make the typedefs and the formats match up across all GNU platforms. If
|
||||
// we used `long' when it's 64 bits where `long long' is expected, then the
|
||||
// compiler would warn about the formats not matching the argument types,
|
||||
// and the programmer changing them to shut up the compiler would break the
|
||||
// program's portability.
|
||||
//
|
||||
// Here we assume what is presently the case in all the GCC configurations
|
||||
// we support: long long is always 64 bits, long is always word/address size,
|
||||
// and int is always 32 bits.
|
||||
|
||||
// No need to mark the typedef with __extension__.
|
||||
// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
|
||||
// Copyright (C) 2012-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// See <bits/types.h> for the meaning of these macros. This file exists so
|
||||
// that <bits/types.h> need not vary across different GNU platforms.
|
||||
|
||||
// X32 kernel interface is 64-bit.
|
||||
|
||||
// Tell the libc code that off_t and off64_t are actually the same type
|
||||
// for all ABI purposes, even if possibly expressed as different base types
|
||||
// for C type-checking purposes.
|
||||
|
||||
// Same for ino_t and ino64_t.
|
||||
|
||||
// And for __rlim_t and __rlim64_t.
|
||||
|
||||
// Number of descriptors that can fit in an `fd_set'.
|
||||
|
||||
type X__dev_t = uint64 /* types.h:143:25 */ // Type of device numbers.
|
||||
type X__uid_t = uint32 /* types.h:144:25 */ // Type of user identifications.
|
||||
type X__gid_t = uint32 /* types.h:145:25 */ // Type of group identifications.
|
||||
type X__ino_t = uint64 /* types.h:146:25 */ // Type of file serial numbers.
|
||||
type X__ino64_t = uint64 /* types.h:147:27 */ // Type of file serial numbers (LFS).
|
||||
type X__mode_t = uint32 /* types.h:148:26 */ // Type of file attribute bitmasks.
|
||||
type X__nlink_t = uint64 /* types.h:149:27 */ // Type of file link counts.
|
||||
type X__off_t = int64 /* types.h:150:25 */ // Type of file sizes and offsets.
|
||||
type X__off64_t = int64 /* types.h:151:27 */ // Type of file sizes and offsets (LFS).
|
||||
type X__pid_t = int32 /* types.h:152:25 */ // Type of process identifications.
|
||||
type X__fsid_t = struct{ F__val [2]int32 } /* types.h:153:26 */ // Type of file system IDs.
|
||||
type X__clock_t = int64 /* types.h:154:27 */ // Type of CPU usage counts.
|
||||
type X__rlim_t = uint64 /* types.h:155:26 */ // Type for resource measurement.
|
||||
type X__rlim64_t = uint64 /* types.h:156:28 */ // Type for resource measurement (LFS).
|
||||
type X__id_t = uint32 /* types.h:157:24 */ // General type for IDs.
|
||||
type X__time_t = int64 /* types.h:158:26 */ // Seconds since the Epoch.
|
||||
type X__useconds_t = uint32 /* types.h:159:30 */ // Count of microseconds.
|
||||
type X__suseconds_t = int64 /* types.h:160:31 */ // Signed count of microseconds.
|
||||
|
||||
type X__daddr_t = int32 /* types.h:162:27 */ // The type of a disk address.
|
||||
type X__key_t = int32 /* types.h:163:25 */ // Type of an IPC key.
|
||||
|
||||
// Clock ID used in clock and timer functions.
|
||||
type X__clockid_t = int32 /* types.h:166:29 */
|
||||
|
||||
// Timer ID returned by `timer_create'.
|
||||
type X__timer_t = uintptr /* types.h:169:12 */
|
||||
|
||||
// Type to represent block size.
|
||||
type X__blksize_t = int64 /* types.h:172:29 */
|
||||
|
||||
// Types from the Large File Support interface.
|
||||
|
||||
// Type to count number of disk blocks.
|
||||
type X__blkcnt_t = int64 /* types.h:177:28 */
|
||||
type X__blkcnt64_t = int64 /* types.h:178:30 */
|
||||
|
||||
// Type to count file system blocks.
|
||||
type X__fsblkcnt_t = uint64 /* types.h:181:30 */
|
||||
type X__fsblkcnt64_t = uint64 /* types.h:182:32 */
|
||||
|
||||
// Type to count file system nodes.
|
||||
type X__fsfilcnt_t = uint64 /* types.h:185:30 */
|
||||
type X__fsfilcnt64_t = uint64 /* types.h:186:32 */
|
||||
|
||||
// Type of miscellaneous file system fields.
|
||||
type X__fsword_t = int64 /* types.h:189:28 */
|
||||
|
||||
type X__ssize_t = int64 /* types.h:191:27 */ // Type of a byte count, or error.
|
||||
|
||||
// Signed long type used in system calls.
|
||||
type X__syscall_slong_t = int64 /* types.h:194:33 */
|
||||
// Unsigned long type used in system calls.
|
||||
type X__syscall_ulong_t = uint64 /* types.h:196:33 */
|
||||
|
||||
// These few don't really vary by system, they always correspond
|
||||
// to one of the other defined types.
|
||||
type X__loff_t = X__off64_t /* types.h:200:19 */ // Type of file sizes and offsets (LFS).
|
||||
type X__caddr_t = uintptr /* types.h:201:14 */
|
||||
|
||||
// Duplicates info from stdint.h but this is used in unistd.h.
|
||||
type X__intptr_t = int64 /* types.h:204:25 */
|
||||
|
||||
// Duplicate info from sys/socket.h.
|
||||
type X__socklen_t = uint32 /* types.h:207:23 */
|
||||
|
||||
// C99: An integer type that can be accessed as an atomic entity,
|
||||
// even in the presence of asynchronous interrupts.
|
||||
// It is not currently necessary for this to be machine-specific.
|
||||
type X__sig_atomic_t = int32 /* types.h:212:13 */
|
||||
|
||||
// Get the definitions of O_*, F_*, FD_*: all the
|
||||
// numbers and flag bits for `open', `fcntl', et al.
|
||||
// O_*, F_*, FD_* bit values for Linux/x86.
|
||||
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Not necessary, we always have 64-bit offsets.
|
||||
|
||||
type Flock = struct {
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
_ [4]byte
|
||||
Fl_start X__off64_t
|
||||
Fl_len X__off64_t
|
||||
Fl_pid X__pid_t
|
||||
_ [4]byte
|
||||
} /* fcntl.h:35:1 */
|
||||
|
||||
// Include generic Linux declarations.
|
||||
// O_*, F_*, FD_* bit values for Linux.
|
||||
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// This file contains shared definitions between Linux architectures
|
||||
// and is included by <bits/fcntl.h> to declare them. The various
|
||||
// #ifndef cases allow the architecture specific file to define those
|
||||
// values with different values.
|
||||
//
|
||||
// A minimal <bits/fcntl.h> contains just:
|
||||
//
|
||||
// struct flock {...}
|
||||
// #ifdef __USE_LARGEFILE64
|
||||
// struct flock64 {...}
|
||||
// #endif
|
||||
// #include <bits/fcntl-linux.h>
|
||||
|
||||
// open/fcntl.
|
||||
|
||||
// open file description locks.
|
||||
//
|
||||
// Usually record locks held by a process are released on *any* close and are
|
||||
// not inherited across a fork.
|
||||
//
|
||||
// These cmd values will set locks that conflict with process-associated record
|
||||
// locks, but are "owned" by the opened file description, not the process.
|
||||
// This means that they are inherited across fork or clone with CLONE_FILES
|
||||
// like BSD (flock) locks, and they are only released automatically when the
|
||||
// last reference to the the file description against which they were acquired
|
||||
// is put.
|
||||
|
||||
// For now, Linux has no separate synchronicity options for read
|
||||
// operations. We define O_RSYNC therefore as the same as O_SYNC
|
||||
// since this is a superset.
|
||||
|
||||
// Values for the second argument to `fcntl'.
|
||||
|
||||
// For F_[GET|SET]FD.
|
||||
|
||||
// For posix fcntl() and `l_type' field of a `struct flock' for lockf().
|
||||
|
||||
// For old implementation of BSD flock.
|
||||
|
||||
// Operations for BSD flock, also used by the kernel implementation.
|
||||
|
||||
// Define some more compatibility macros to be backward compatible with
|
||||
// BSD systems which did not managed to hide these kernel macros.
|
||||
|
||||
// Advise to `posix_fadvise'.
|
||||
|
||||
// Values for `*at' functions.
|
||||
|
||||
// Detect if open needs mode as a third argument (or for openat as a fourth
|
||||
// argument).
|
||||
|
||||
// POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
|
||||
// Earlier POSIX standards permitted any type ending in `_t' to be defined
|
||||
// by any POSIX header, so we don't conditionalize the definitions here.
|
||||
type Mode_t = X__mode_t /* fcntl.h:50:18 */
|
||||
|
||||
type Off_t = X__off64_t /* fcntl.h:58:19 */
|
||||
|
||||
type Pid_t = X__pid_t /* fcntl.h:69:17 */
|
||||
|
||||
// For XPG all symbols from <sys/stat.h> should also be available.
|
||||
// NB: Include guard matches what <linux/time.h> uses.
|
||||
|
||||
// bits/types.h -- definitions of __*_t types underlying *_t types.
|
||||
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Never include this file directly; use <sys/types.h> instead.
|
||||
|
||||
// POSIX.1b structure for a time value. This is like a `struct timeval' but
|
||||
// has nanoseconds instead of microseconds.
|
||||
type Timespec = struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
} /* struct_timespec.h:9:1 */
|
||||
|
||||
// Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Versions of the `struct stat' data structure.
|
||||
|
||||
// x86-64 versions of the `xmknod' interface.
|
||||
|
||||
type Stat = struct {
|
||||
Fst_dev X__dev_t
|
||||
Fst_ino X__ino_t
|
||||
Fst_nlink X__nlink_t
|
||||
Fst_mode X__mode_t
|
||||
Fst_uid X__uid_t
|
||||
Fst_gid X__gid_t
|
||||
F__pad0 int32
|
||||
Fst_rdev X__dev_t
|
||||
Fst_size X__off_t
|
||||
Fst_blksize X__blksize_t
|
||||
Fst_blocks X__blkcnt_t
|
||||
Fst_atim struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
}
|
||||
Fst_mtim struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
}
|
||||
Fst_ctim struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
}
|
||||
F__glibc_reserved [3]X__syscall_slong_t
|
||||
} /* stat.h:46:1 */
|
||||
|
||||
// Define some inlines helping to catch common problems.
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
1010
vendor/modernc.org/libc/fcntl/fcntl_linux_arm.go
generated
vendored
Normal file
1010
vendor/modernc.org/libc/fcntl/fcntl_linux_arm.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1044
vendor/modernc.org/libc/fcntl/fcntl_linux_arm64.go
generated
vendored
Normal file
1044
vendor/modernc.org/libc/fcntl/fcntl_linux_arm64.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
982
vendor/modernc.org/libc/fcntl/fcntl_linux_s390x.go
generated
vendored
Normal file
982
vendor/modernc.org/libc/fcntl/fcntl_linux_s390x.go
generated
vendored
Normal file
@ -0,0 +1,982 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_s390x.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
AT_EACCESS = 0x200
|
||||
AT_FDCWD = -100
|
||||
AT_REMOVEDIR = 0x200
|
||||
AT_SYMLINK_FOLLOW = 0x400
|
||||
AT_SYMLINK_NOFOLLOW = 0x100
|
||||
FAPPEND = 1024
|
||||
FASYNC = 8192
|
||||
FD_CLOEXEC = 1
|
||||
FFSYNC = 1052672
|
||||
FNDELAY = 2048
|
||||
FNONBLOCK = 2048
|
||||
F_DUPFD = 0
|
||||
F_DUPFD_CLOEXEC = 1030
|
||||
F_EXLCK = 4
|
||||
F_GETFD = 1
|
||||
F_GETFL = 3
|
||||
F_GETLK = 5
|
||||
F_GETLK64 = 5
|
||||
F_GETOWN = 9
|
||||
F_LOCK = 1
|
||||
F_OK = 0
|
||||
F_RDLCK = 0
|
||||
F_SETFD = 2
|
||||
F_SETFL = 4
|
||||
F_SETLK = 6
|
||||
F_SETLK64 = 6
|
||||
F_SETLKW = 7
|
||||
F_SETLKW64 = 7
|
||||
F_SETOWN = 8
|
||||
F_SHLCK = 8
|
||||
F_TEST = 3
|
||||
F_TLOCK = 2
|
||||
F_ULOCK = 0
|
||||
F_UNLCK = 2
|
||||
F_WRLCK = 1
|
||||
LOCK_EX = 2
|
||||
LOCK_NB = 4
|
||||
LOCK_SH = 1
|
||||
LOCK_UN = 8
|
||||
O_ACCMODE = 0003
|
||||
O_APPEND = 02000
|
||||
O_ASYNC = 020000
|
||||
O_CLOEXEC = 524288
|
||||
O_CREAT = 0100
|
||||
O_DIRECTORY = 65536
|
||||
O_DSYNC = 4096
|
||||
O_EXCL = 0200
|
||||
O_FSYNC = 1052672
|
||||
O_NDELAY = 2048
|
||||
O_NOCTTY = 0400
|
||||
O_NOFOLLOW = 131072
|
||||
O_NONBLOCK = 04000
|
||||
O_RDONLY = 00
|
||||
O_RDWR = 02
|
||||
O_RSYNC = 1052672
|
||||
O_SYNC = 04010000
|
||||
O_TRUNC = 01000
|
||||
O_WRONLY = 01
|
||||
POSIX_FADV_DONTNEED = 6
|
||||
POSIX_FADV_NOREUSE = 7
|
||||
POSIX_FADV_NORMAL = 0
|
||||
POSIX_FADV_RANDOM = 1
|
||||
POSIX_FADV_SEQUENTIAL = 2
|
||||
POSIX_FADV_WILLNEED = 3
|
||||
R_OK = 4
|
||||
SEEK_CUR = 1
|
||||
SEEK_END = 2
|
||||
SEEK_SET = 0
|
||||
S_IFBLK = 24576
|
||||
S_IFCHR = 8192
|
||||
S_IFDIR = 16384
|
||||
S_IFIFO = 4096
|
||||
S_IFLNK = 40960
|
||||
S_IFMT = 61440
|
||||
S_IFREG = 32768
|
||||
S_IFSOCK = 49152
|
||||
S_IRGRP = 32
|
||||
S_IROTH = 4
|
||||
S_IRUSR = 256
|
||||
S_IRWXG = 56
|
||||
S_IRWXO = 7
|
||||
S_IRWXU = 448
|
||||
S_ISGID = 1024
|
||||
S_ISUID = 2048
|
||||
S_ISVTX = 512
|
||||
S_IWGRP = 16
|
||||
S_IWOTH = 2
|
||||
S_IWUSR = 128
|
||||
S_IXGRP = 8
|
||||
S_IXOTH = 1
|
||||
S_IXUSR = 64
|
||||
UTIME_NOW = 1073741823
|
||||
UTIME_OMIT = 1073741822
|
||||
W_OK = 2
|
||||
X_OK = 1
|
||||
X_ATFILE_SOURCE = 1
|
||||
X_BITS_STAT_H = 1
|
||||
X_BITS_TYPESIZES_H = 1
|
||||
X_BITS_TYPES_H = 1
|
||||
X_DEFAULT_SOURCE = 1
|
||||
X_FCNTL_H = 1
|
||||
X_FEATURES_H = 1
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_LP64 = 1
|
||||
X_MKNOD_VER_LINUX = 0
|
||||
X_POSIX_C_SOURCE = 200809
|
||||
X_POSIX_SOURCE = 1
|
||||
X_STATBUF_ST_BLKSIZE = 0
|
||||
X_STATBUF_ST_NSEC = 0
|
||||
X_STATBUF_ST_RDEV = 0
|
||||
X_STAT_VER = 1
|
||||
X_STAT_VER_KERNEL = 0
|
||||
X_STAT_VER_LINUX = 1
|
||||
X_STDC_PREDEF_H = 1
|
||||
X_STRUCT_TIMESPEC = 1
|
||||
X_SYS_CDEFS_H = 1
|
||||
Linux = 1
|
||||
Unix = 1
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// POSIX Standard: 6.5 File Control Operations <fcntl.h>
|
||||
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// These are defined by the user (or the compiler)
|
||||
// to specify the desired environment:
|
||||
//
|
||||
// __STRICT_ANSI__ ISO Standard C.
|
||||
// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
|
||||
// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
|
||||
// __STDC_WANT_LIB_EXT2__
|
||||
// Extensions to ISO C99 from TR 27431-2:2010.
|
||||
// __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
// Extensions to ISO C11 from TS 18661-1:2014.
|
||||
// __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
// Extensions to ISO C11 from TS 18661-4:2015.
|
||||
// __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
// Extensions to ISO C11 from TS 18661-3:2015.
|
||||
//
|
||||
// _POSIX_SOURCE IEEE Std 1003.1.
|
||||
// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
|
||||
// if >=199309L, add IEEE Std 1003.1b-1993;
|
||||
// if >=199506L, add IEEE Std 1003.1c-1995;
|
||||
// if >=200112L, all of IEEE 1003.1-2004
|
||||
// if >=200809L, all of IEEE 1003.1-2008
|
||||
// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
|
||||
// Single Unix conformance is wanted, to 600 for the
|
||||
// sixth revision, to 700 for the seventh revision.
|
||||
// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
|
||||
// _LARGEFILE_SOURCE Some more functions for correct standard I/O.
|
||||
// _LARGEFILE64_SOURCE Additional functionality from LFS for large files.
|
||||
// _FILE_OFFSET_BITS=N Select default filesystem interface.
|
||||
// _ATFILE_SOURCE Additional *at interfaces.
|
||||
// _GNU_SOURCE All of the above, plus GNU extensions.
|
||||
// _DEFAULT_SOURCE The default set of features (taking precedence over
|
||||
// __STRICT_ANSI__).
|
||||
//
|
||||
// _FORTIFY_SOURCE Add security hardening to many library functions.
|
||||
// Set to 1 or 2; 2 performs stricter checks than 1.
|
||||
//
|
||||
// _REENTRANT, _THREAD_SAFE
|
||||
// Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
|
||||
//
|
||||
// The `-ansi' switch to the GNU C compiler, and standards conformance
|
||||
// options such as `-std=c99', define __STRICT_ANSI__. If none of
|
||||
// these are defined, or if _DEFAULT_SOURCE is defined, the default is
|
||||
// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
|
||||
// 200809L, as well as enabling miscellaneous functions from BSD and
|
||||
// SVID. If more than one of these are defined, they accumulate. For
|
||||
// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
|
||||
// give you ISO C, 1003.1, and 1003.2, but nothing else.
|
||||
//
|
||||
// These are defined by this file and are used by the
|
||||
// header files to decide what to declare or define:
|
||||
//
|
||||
// __GLIBC_USE (F) Define things from feature set F. This is defined
|
||||
// to 1 or 0; the subsequent macros are either defined
|
||||
// or undefined, and those tests should be moved to
|
||||
// __GLIBC_USE.
|
||||
// __USE_ISOC11 Define ISO C11 things.
|
||||
// __USE_ISOC99 Define ISO C99 things.
|
||||
// __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
|
||||
// __USE_ISOCXX11 Define ISO C++11 things.
|
||||
// __USE_POSIX Define IEEE Std 1003.1 things.
|
||||
// __USE_POSIX2 Define IEEE Std 1003.2 things.
|
||||
// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things.
|
||||
// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things.
|
||||
// __USE_XOPEN Define XPG things.
|
||||
// __USE_XOPEN_EXTENDED Define X/Open Unix things.
|
||||
// __USE_UNIX98 Define Single Unix V2 things.
|
||||
// __USE_XOPEN2K Define XPG6 things.
|
||||
// __USE_XOPEN2KXSI Define XPG6 XSI things.
|
||||
// __USE_XOPEN2K8 Define XPG7 things.
|
||||
// __USE_XOPEN2K8XSI Define XPG7 XSI things.
|
||||
// __USE_LARGEFILE Define correct standard I/O things.
|
||||
// __USE_LARGEFILE64 Define LFS things with separate names.
|
||||
// __USE_FILE_OFFSET64 Define 64bit interface as default.
|
||||
// __USE_MISC Define things from 4.3BSD or System V Unix.
|
||||
// __USE_ATFILE Define *at interfaces and AT_* constants for them.
|
||||
// __USE_GNU Define GNU extensions.
|
||||
// __USE_FORTIFY_LEVEL Additional security measures used, according to level.
|
||||
//
|
||||
// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
|
||||
// defined by this file unconditionally. `__GNU_LIBRARY__' is provided
|
||||
// only for compatibility. All new code should use the other symbols
|
||||
// to test for features.
|
||||
//
|
||||
// All macros listed above as possibly being defined by this file are
|
||||
// explicitly undefined if they are not explicitly defined.
|
||||
// Feature-test macros that are not defined by the user or compiler
|
||||
// but are implied by the other feature-test macros defined (or by the
|
||||
// lack of any definitions) are defined by the file.
|
||||
//
|
||||
// ISO C feature test macros depend on the definition of the macro
|
||||
// when an affected header is included, not when the first system
|
||||
// header is included, and so they are handled in
|
||||
// <bits/libc-header-start.h>, which does not have a multiple include
|
||||
// guard. Feature test macros that can be handled from the first
|
||||
// system header included are handled here.
|
||||
|
||||
// Undefine everything, so we get a clean slate.
|
||||
|
||||
// Suppress kernel-name space pollution unless user expressedly asks
|
||||
// for it.
|
||||
|
||||
// Convenience macro to test the version of gcc.
|
||||
// Use like this:
|
||||
// #if __GNUC_PREREQ (2,8)
|
||||
// ... code requiring gcc 2.8 or later ...
|
||||
// #endif
|
||||
// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
|
||||
// added in 2.0.
|
||||
|
||||
// Similarly for clang. Features added to GCC after version 4.2 may
|
||||
// or may not also be available in clang, and clang's definitions of
|
||||
// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such
|
||||
// features can be queried via __has_extension/__has_feature.
|
||||
|
||||
// Whether to use feature set F.
|
||||
|
||||
// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
|
||||
// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not
|
||||
// issue a warning; the expectation is that the source is being
|
||||
// transitioned to use the new macro.
|
||||
|
||||
// If _GNU_SOURCE was defined by the user, turn on all the other features.
|
||||
|
||||
// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
|
||||
// define _DEFAULT_SOURCE.
|
||||
|
||||
// This is to enable the ISO C11 extension.
|
||||
|
||||
// This is to enable the ISO C99 extension.
|
||||
|
||||
// This is to enable the ISO C90 Amendment 1:1995 extension.
|
||||
|
||||
// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
|
||||
// is defined, use POSIX.1-2008 (or another version depending on
|
||||
// _XOPEN_SOURCE).
|
||||
|
||||
// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
|
||||
// defined in all multithreaded code. GNU libc has not required this
|
||||
// for many years. We now treat them as compatibility synonyms for
|
||||
// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
|
||||
// comprehensive support for multithreaded code. Using them never
|
||||
// lowers the selected level of POSIX conformance, only raises it.
|
||||
|
||||
// The function 'gets' existed in C89, but is impossible to use
|
||||
// safely. It has been removed from ISO C11 and ISO C++14. Note: for
|
||||
// compatibility with various implementations of <cstdio>, this test
|
||||
// must consider only the value of __cplusplus when compiling C++.
|
||||
|
||||
// Get definitions of __STDC_* predefined macros, if the compiler has
|
||||
// not preincluded this header automatically.
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// This macro indicates that the installed library is the GNU C Library.
|
||||
// For historic reasons the value now is 6 and this will stay from now
|
||||
// on. The use of this variable is deprecated. Use __GLIBC__ and
|
||||
// __GLIBC_MINOR__ now (see below) when you want to test for a specific
|
||||
// GNU C library version and use the values in <gnu/lib-names.h> to get
|
||||
// the sonames of the shared libraries.
|
||||
|
||||
// Major and minor version number of the GNU C library package. Use
|
||||
// these macros to test for features in specific releases.
|
||||
|
||||
// This is here only because every header file already includes this one.
|
||||
// Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// We are almost always included from features.h.
|
||||
|
||||
// The GNU libc does not support any K&R compilers or the traditional mode
|
||||
// of ISO C compilers anymore. Check for some of the combinations not
|
||||
// anymore supported.
|
||||
|
||||
// Some user header file might have defined this before.
|
||||
|
||||
// All functions, except those with callbacks or those that
|
||||
// synchronize memory, are leaf functions.
|
||||
|
||||
// GCC can always grok prototypes. For C++ programs we add throw()
|
||||
// to help it optimize the function calls. But this works only with
|
||||
// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
|
||||
// as non-throwing using a function attribute since programs can use
|
||||
// the -fexceptions options for C code as well.
|
||||
|
||||
// Compilers that are not clang may object to
|
||||
// #if defined __clang__ && __has_extension(...)
|
||||
// even though they do not need to evaluate the right-hand side of the &&.
|
||||
|
||||
// These two macros are not used in glibc anymore. They are kept here
|
||||
// only because some other projects expect the macros to be defined.
|
||||
|
||||
// For these things, GCC behaves the ANSI way normally,
|
||||
// and the non-ANSI way under -traditional.
|
||||
|
||||
// This is not a typedef so `const __ptr_t' does the right thing.
|
||||
|
||||
// C++ needs to know that types and declarations are C, not C++.
|
||||
|
||||
// Fortify support.
|
||||
|
||||
// Support for flexible arrays.
|
||||
// Headers that should use flexible arrays only if they're "real"
|
||||
// (e.g. only if they won't affect sizeof()) should test
|
||||
// #if __glibc_c99_flexarr_available.
|
||||
|
||||
// __asm__ ("xyz") is used throughout the headers to rename functions
|
||||
// at the assembly language level. This is wrapped by the __REDIRECT
|
||||
// macro, in order to support compilers that can do this some other
|
||||
// way. When compilers don't support asm-names at all, we have to do
|
||||
// preprocessor tricks instead (which don't have exactly the right
|
||||
// semantics, but it's the best we can do).
|
||||
//
|
||||
// Example:
|
||||
// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
|
||||
|
||||
//
|
||||
// #elif __SOME_OTHER_COMPILER__
|
||||
//
|
||||
// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias)
|
||||
|
||||
// GCC has various useful declarations that can be made with the
|
||||
// `__attribute__' syntax. All of the ways we use this do fine if
|
||||
// they are omitted for compilers that don't understand it.
|
||||
|
||||
// At some point during the gcc 2.96 development the `malloc' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
|
||||
// Tell the compiler which arguments to an allocation function
|
||||
// indicate the size of the allocation.
|
||||
|
||||
// At some point during the gcc 2.96 development the `pure' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
|
||||
// This declaration tells the compiler that the value is constant.
|
||||
|
||||
// At some point during the gcc 3.1 development the `used' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
|
||||
// Since version 3.2, gcc allows marking deprecated functions.
|
||||
|
||||
// Since version 4.5, gcc also allows one to specify the message printed
|
||||
// when a deprecated function is used. clang claims to be gcc 4.2, but
|
||||
// may also support this feature.
|
||||
|
||||
// At some point during the gcc 2.8 development the `format_arg' attribute
|
||||
// for functions was introduced. We don't want to use it unconditionally
|
||||
// (although this would be possible) since it generates warnings.
|
||||
// If several `format_arg' attributes are given for the same function, in
|
||||
// gcc-3.0 and older, all but the last one are ignored. In newer gccs,
|
||||
// all designated arguments are considered.
|
||||
|
||||
// At some point during the gcc 2.97 development the `strfmon' format
|
||||
// attribute for functions was introduced. We don't want to use it
|
||||
// unconditionally (although this would be possible) since it
|
||||
// generates warnings.
|
||||
|
||||
// The nonull function attribute allows to mark pointer parameters which
|
||||
// must not be NULL.
|
||||
|
||||
// If fortification mode, we warn about unused results of certain
|
||||
// function calls which can lead to problems.
|
||||
|
||||
// Forces a function to be always inlined.
|
||||
// The Linux kernel defines __always_inline in stddef.h (283d7573), and
|
||||
// it conflicts with this definition. Therefore undefine it first to
|
||||
// allow either header to be included first.
|
||||
|
||||
// Associate error messages with the source location of the call site rather
|
||||
// than with the source location inside the function.
|
||||
|
||||
// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
|
||||
// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
|
||||
// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
|
||||
// older than 4.3 may define these macros and still not guarantee GNU inlining
|
||||
// semantics.
|
||||
//
|
||||
// clang++ identifies itself as gcc-4.2, but has support for GNU inlining
|
||||
// semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and
|
||||
// __GNUC_GNU_INLINE__ macro definitions.
|
||||
|
||||
// GCC 4.3 and above allow passing all anonymous arguments of an
|
||||
// __extern_always_inline function to some other vararg function.
|
||||
|
||||
// It is possible to compile containing GCC extensions even if GCC is
|
||||
// run in pedantic mode if the uses are carefully marked using the
|
||||
// `__extension__' keyword. But this is not generally available before
|
||||
// version 2.8.
|
||||
|
||||
// __restrict is known in EGCS 1.2 and above.
|
||||
|
||||
// ISO C99 also allows to declare arrays as non-overlapping. The syntax is
|
||||
// array_name[restrict]
|
||||
// GCC 3.1 supports this.
|
||||
|
||||
// Describes a char array whose address can safely be passed as the first
|
||||
// argument to strncpy and strncat, as the char array is not necessarily
|
||||
// a NUL-terminated string.
|
||||
|
||||
// Determine the wordsize from the preprocessor defines.
|
||||
|
||||
// Properties of long double type. ldbl-opt version.
|
||||
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
|
||||
// intended for use in preprocessor macros.
|
||||
//
|
||||
// Note: MESSAGE must be a _single_ string; concatenation of string
|
||||
// literals is not supported.
|
||||
|
||||
// Generic selection (ISO C11) is a C-only feature, available in GCC
|
||||
// since version 4.9. Previous versions do not provide generic
|
||||
// selection, even though they might set __STDC_VERSION__ to 201112L,
|
||||
// when in -std=c11 mode. Thus, we must check for !defined __GNUC__
|
||||
// when testing __STDC_VERSION__ for generic selection support.
|
||||
// On the other hand, Clang also defines __GNUC__, so a clang-specific
|
||||
// check is required to enable the use of generic selection.
|
||||
|
||||
// If we don't have __REDIRECT, prototypes will be missing if
|
||||
// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
|
||||
|
||||
// Decide whether we can define 'extern inline' functions in headers.
|
||||
|
||||
// This is here only because every header file already includes this one.
|
||||
// Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
|
||||
// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
|
||||
// that will always return failure (and set errno to ENOSYS).
|
||||
// This file is automatically generated.
|
||||
// This file selects the right generated file of `__stub_FUNCTION' macros
|
||||
// based on the architecture being compiled for.
|
||||
|
||||
// Determine the wordsize from the preprocessor defines.
|
||||
|
||||
// This file is automatically generated.
|
||||
// It defines a symbol `__stub_FUNCTION' for each function
|
||||
// in the C library which is a stub, meaning it will fail
|
||||
// every time called, usually setting errno to ENOSYS.
|
||||
|
||||
// This must be early so <bits/fcntl.h> can define types winningly.
|
||||
|
||||
// Get __mode_t, __dev_t and __off_t .
|
||||
// bits/types.h -- definitions of __*_t types underlying *_t types.
|
||||
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Never include this file directly; use <sys/types.h> instead.
|
||||
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Determine the wordsize from the preprocessor defines.
|
||||
|
||||
// Convenience types.
|
||||
type X__u_char = uint8 /* types.h:30:23 */
|
||||
type X__u_short = uint16 /* types.h:31:28 */
|
||||
type X__u_int = uint32 /* types.h:32:22 */
|
||||
type X__u_long = uint64 /* types.h:33:27 */
|
||||
|
||||
// Fixed-size types, underlying types depend on word size and compiler.
|
||||
type X__int8_t = int8 /* types.h:36:21 */
|
||||
type X__uint8_t = uint8 /* types.h:37:23 */
|
||||
type X__int16_t = int16 /* types.h:38:26 */
|
||||
type X__uint16_t = uint16 /* types.h:39:28 */
|
||||
type X__int32_t = int32 /* types.h:40:20 */
|
||||
type X__uint32_t = uint32 /* types.h:41:22 */
|
||||
type X__int64_t = int64 /* types.h:43:25 */
|
||||
type X__uint64_t = uint64 /* types.h:44:27 */
|
||||
|
||||
// Smallest types with at least a given width.
|
||||
type X__int_least8_t = X__int8_t /* types.h:51:18 */
|
||||
type X__uint_least8_t = X__uint8_t /* types.h:52:19 */
|
||||
type X__int_least16_t = X__int16_t /* types.h:53:19 */
|
||||
type X__uint_least16_t = X__uint16_t /* types.h:54:20 */
|
||||
type X__int_least32_t = X__int32_t /* types.h:55:19 */
|
||||
type X__uint_least32_t = X__uint32_t /* types.h:56:20 */
|
||||
type X__int_least64_t = X__int64_t /* types.h:57:19 */
|
||||
type X__uint_least64_t = X__uint64_t /* types.h:58:20 */
|
||||
|
||||
// quad_t is also 64 bits.
|
||||
type X__quad_t = int64 /* types.h:62:18 */
|
||||
type X__u_quad_t = uint64 /* types.h:63:27 */
|
||||
|
||||
// Largest integral types.
|
||||
type X__intmax_t = int64 /* types.h:71:18 */
|
||||
type X__uintmax_t = uint64 /* types.h:72:27 */
|
||||
|
||||
// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
|
||||
// macros for each of the OS types we define below. The definitions
|
||||
// of those macros must use the following macros for underlying types.
|
||||
// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
|
||||
// variants of each of the following integer types on this machine.
|
||||
//
|
||||
// 16 -- "natural" 16-bit type (always short)
|
||||
// 32 -- "natural" 32-bit type (always int)
|
||||
// 64 -- "natural" 64-bit type (long or long long)
|
||||
// LONG32 -- 32-bit type, traditionally long
|
||||
// QUAD -- 64-bit type, always long long
|
||||
// WORD -- natural type of __WORDSIZE bits (int or long)
|
||||
// LONGWORD -- type of __WORDSIZE bits, traditionally long
|
||||
//
|
||||
// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
|
||||
// conventional uses of `long' or `long long' type modifiers match the
|
||||
// types we define, even when a less-adorned type would be the same size.
|
||||
// This matters for (somewhat) portably writing printf/scanf formats for
|
||||
// these types, where using the appropriate l or ll format modifiers can
|
||||
// make the typedefs and the formats match up across all GNU platforms. If
|
||||
// we used `long' when it's 64 bits where `long long' is expected, then the
|
||||
// compiler would warn about the formats not matching the argument types,
|
||||
// and the programmer changing them to shut up the compiler would break the
|
||||
// program's portability.
|
||||
//
|
||||
// Here we assume what is presently the case in all the GCC configurations
|
||||
// we support: long long is always 64 bits, long is always word/address size,
|
||||
// and int is always 32 bits.
|
||||
|
||||
// No need to mark the typedef with __extension__.
|
||||
// bits/typesizes.h -- underlying types for *_t. Linux/s390 version.
|
||||
// Copyright (C) 2003-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// See <bits/types.h> for the meaning of these macros. This file exists so
|
||||
// that <bits/types.h> need not vary across different GNU platforms.
|
||||
|
||||
// size_t is unsigned long int on s390 -m31.
|
||||
|
||||
// Tell the libc code that off_t and off64_t are actually the same type
|
||||
// for all ABI purposes, even if possibly expressed as different base types
|
||||
// for C type-checking purposes.
|
||||
|
||||
// Same for ino_t and ino64_t.
|
||||
|
||||
// And for __rlim_t and __rlim64_t.
|
||||
|
||||
// Number of descriptors that can fit in an `fd_set'.
|
||||
|
||||
type X__dev_t = uint64 /* types.h:143:25 */ // Type of device numbers.
|
||||
type X__uid_t = uint32 /* types.h:144:25 */ // Type of user identifications.
|
||||
type X__gid_t = uint32 /* types.h:145:25 */ // Type of group identifications.
|
||||
type X__ino_t = uint64 /* types.h:146:25 */ // Type of file serial numbers.
|
||||
type X__ino64_t = uint64 /* types.h:147:27 */ // Type of file serial numbers (LFS).
|
||||
type X__mode_t = uint32 /* types.h:148:26 */ // Type of file attribute bitmasks.
|
||||
type X__nlink_t = uint64 /* types.h:149:27 */ // Type of file link counts.
|
||||
type X__off_t = int64 /* types.h:150:25 */ // Type of file sizes and offsets.
|
||||
type X__off64_t = int64 /* types.h:151:27 */ // Type of file sizes and offsets (LFS).
|
||||
type X__pid_t = int32 /* types.h:152:25 */ // Type of process identifications.
|
||||
type X__fsid_t = struct{ F__val [2]int32 } /* types.h:153:26 */ // Type of file system IDs.
|
||||
type X__clock_t = int64 /* types.h:154:27 */ // Type of CPU usage counts.
|
||||
type X__rlim_t = uint64 /* types.h:155:26 */ // Type for resource measurement.
|
||||
type X__rlim64_t = uint64 /* types.h:156:28 */ // Type for resource measurement (LFS).
|
||||
type X__id_t = uint32 /* types.h:157:24 */ // General type for IDs.
|
||||
type X__time_t = int64 /* types.h:158:26 */ // Seconds since the Epoch.
|
||||
type X__useconds_t = uint32 /* types.h:159:30 */ // Count of microseconds.
|
||||
type X__suseconds_t = int64 /* types.h:160:31 */ // Signed count of microseconds.
|
||||
|
||||
type X__daddr_t = int32 /* types.h:162:27 */ // The type of a disk address.
|
||||
type X__key_t = int32 /* types.h:163:25 */ // Type of an IPC key.
|
||||
|
||||
// Clock ID used in clock and timer functions.
|
||||
type X__clockid_t = int32 /* types.h:166:29 */
|
||||
|
||||
// Timer ID returned by `timer_create'.
|
||||
type X__timer_t = uintptr /* types.h:169:12 */
|
||||
|
||||
// Type to represent block size.
|
||||
type X__blksize_t = int64 /* types.h:172:29 */
|
||||
|
||||
// Types from the Large File Support interface.
|
||||
|
||||
// Type to count number of disk blocks.
|
||||
type X__blkcnt_t = int64 /* types.h:177:28 */
|
||||
type X__blkcnt64_t = int64 /* types.h:178:30 */
|
||||
|
||||
// Type to count file system blocks.
|
||||
type X__fsblkcnt_t = uint64 /* types.h:181:30 */
|
||||
type X__fsblkcnt64_t = uint64 /* types.h:182:32 */
|
||||
|
||||
// Type to count file system nodes.
|
||||
type X__fsfilcnt_t = uint64 /* types.h:185:30 */
|
||||
type X__fsfilcnt64_t = uint64 /* types.h:186:32 */
|
||||
|
||||
// Type of miscellaneous file system fields.
|
||||
type X__fsword_t = int64 /* types.h:189:28 */
|
||||
|
||||
type X__ssize_t = int64 /* types.h:191:27 */ // Type of a byte count, or error.
|
||||
|
||||
// Signed long type used in system calls.
|
||||
type X__syscall_slong_t = int64 /* types.h:194:33 */
|
||||
// Unsigned long type used in system calls.
|
||||
type X__syscall_ulong_t = uint64 /* types.h:196:33 */
|
||||
|
||||
// These few don't really vary by system, they always correspond
|
||||
// to one of the other defined types.
|
||||
type X__loff_t = X__off64_t /* types.h:200:19 */ // Type of file sizes and offsets (LFS).
|
||||
type X__caddr_t = uintptr /* types.h:201:14 */
|
||||
|
||||
// Duplicates info from stdint.h but this is used in unistd.h.
|
||||
type X__intptr_t = int64 /* types.h:204:25 */
|
||||
|
||||
// Duplicate info from sys/socket.h.
|
||||
type X__socklen_t = uint32 /* types.h:207:23 */
|
||||
|
||||
// C99: An integer type that can be accessed as an atomic entity,
|
||||
// even in the presence of asynchronous interrupts.
|
||||
// It is not currently necessary for this to be machine-specific.
|
||||
type X__sig_atomic_t = int32 /* types.h:212:13 */
|
||||
|
||||
// Get the definitions of O_*, F_*, FD_*: all the
|
||||
// numbers and flag bits for `open', `fcntl', et al.
|
||||
// O_*, F_*, FD_* bit values for Linux.
|
||||
// Copyright (C) 2000-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Determine the wordsize from the preprocessor defines.
|
||||
|
||||
// Not necessary, files are always with 64bit off_t.
|
||||
|
||||
// Not necessary, we always have 64-bit offsets.
|
||||
|
||||
type Flock = struct {
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
_ [4]byte
|
||||
Fl_start X__off_t
|
||||
Fl_len X__off_t
|
||||
Fl_pid X__pid_t
|
||||
_ [4]byte
|
||||
} /* fcntl.h:37:1 */
|
||||
|
||||
// Include generic Linux declarations.
|
||||
// O_*, F_*, FD_* bit values for Linux.
|
||||
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// This file contains shared definitions between Linux architectures
|
||||
// and is included by <bits/fcntl.h> to declare them. The various
|
||||
// #ifndef cases allow the architecture specific file to define those
|
||||
// values with different values.
|
||||
//
|
||||
// A minimal <bits/fcntl.h> contains just:
|
||||
//
|
||||
// struct flock {...}
|
||||
// #ifdef __USE_LARGEFILE64
|
||||
// struct flock64 {...}
|
||||
// #endif
|
||||
// #include <bits/fcntl-linux.h>
|
||||
|
||||
// open/fcntl.
|
||||
|
||||
// open file description locks.
|
||||
//
|
||||
// Usually record locks held by a process are released on *any* close and are
|
||||
// not inherited across a fork.
|
||||
//
|
||||
// These cmd values will set locks that conflict with process-associated record
|
||||
// locks, but are "owned" by the opened file description, not the process.
|
||||
// This means that they are inherited across fork or clone with CLONE_FILES
|
||||
// like BSD (flock) locks, and they are only released automatically when the
|
||||
// last reference to the the file description against which they were acquired
|
||||
// is put.
|
||||
|
||||
// For now, Linux has no separate synchronicity options for read
|
||||
// operations. We define O_RSYNC therefore as the same as O_SYNC
|
||||
// since this is a superset.
|
||||
|
||||
// Values for the second argument to `fcntl'.
|
||||
|
||||
// For F_[GET|SET]FD.
|
||||
|
||||
// For posix fcntl() and `l_type' field of a `struct flock' for lockf().
|
||||
|
||||
// For old implementation of BSD flock.
|
||||
|
||||
// Operations for BSD flock, also used by the kernel implementation.
|
||||
|
||||
// Define some more compatibility macros to be backward compatible with
|
||||
// BSD systems which did not managed to hide these kernel macros.
|
||||
|
||||
// Advise to `posix_fadvise'.
|
||||
|
||||
// Values for `*at' functions.
|
||||
|
||||
// Detect if open needs mode as a third argument (or for openat as a fourth
|
||||
// argument).
|
||||
|
||||
// POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
|
||||
// Earlier POSIX standards permitted any type ending in `_t' to be defined
|
||||
// by any POSIX header, so we don't conditionalize the definitions here.
|
||||
type Mode_t = X__mode_t /* fcntl.h:50:18 */
|
||||
|
||||
type Off_t = X__off64_t /* fcntl.h:58:19 */
|
||||
|
||||
type Pid_t = X__pid_t /* fcntl.h:69:17 */
|
||||
|
||||
// For XPG all symbols from <sys/stat.h> should also be available.
|
||||
// NB: Include guard matches what <linux/time.h> uses.
|
||||
|
||||
// bits/types.h -- definitions of __*_t types underlying *_t types.
|
||||
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Never include this file directly; use <sys/types.h> instead.
|
||||
|
||||
// POSIX.1b structure for a time value. This is like a `struct timeval' but
|
||||
// has nanoseconds instead of microseconds.
|
||||
type Timespec = struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
} /* struct_timespec.h:9:1 */
|
||||
|
||||
// Copyright (C) 2000-2018 Free Software Foundation, Inc.
|
||||
// This file is part of the GNU C Library.
|
||||
//
|
||||
// The GNU C Library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// The GNU C Library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with the GNU C Library; if not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Determine the wordsize from the preprocessor defines.
|
||||
|
||||
// Versions of the `struct stat' data structure.
|
||||
|
||||
// Versions of the `xmknod' interface.
|
||||
|
||||
type Stat = struct {
|
||||
Fst_dev X__dev_t
|
||||
Fst_ino X__ino_t
|
||||
Fst_nlink X__nlink_t
|
||||
Fst_mode X__mode_t
|
||||
Fst_uid X__uid_t
|
||||
Fst_gid X__gid_t
|
||||
F__glibc_reserved0 int32
|
||||
Fst_rdev X__dev_t
|
||||
Fst_size X__off_t
|
||||
Fst_atim struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
}
|
||||
Fst_mtim struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
}
|
||||
Fst_ctim struct {
|
||||
Ftv_sec X__time_t
|
||||
Ftv_nsec X__syscall_slong_t
|
||||
}
|
||||
Fst_blksize X__blksize_t
|
||||
Fst_blocks X__blkcnt_t
|
||||
F__glibc_reserved [3]int64
|
||||
} /* stat.h:50:1 */
|
||||
|
||||
// Define some inlines helping to catch common problems.
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
408
vendor/modernc.org/libc/fcntl/fcntl_windows_386.go
generated
vendored
Normal file
408
vendor/modernc.org/libc/fcntl/fcntl_windows_386.go
generated
vendored
Normal file
@ -0,0 +1,408 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
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_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
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint32 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = uint16 /* <builtin>:15:24 */
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the 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 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 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
|
||||
// fix was applied to trunk. This macro gets just increased on trunk. For
|
||||
// other branches its value won't be modified.
|
||||
|
||||
// mingw.org's version macros: these make gcc to define
|
||||
// MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
|
||||
// and the __mingwthr_key_dtor() function from the MinGW
|
||||
// CRT in its private gthr-win32.h header.
|
||||
|
||||
// Set VC specific compiler target macros.
|
||||
|
||||
// For x86 we have always to prefix by underscore.
|
||||
|
||||
// Special case nameless struct/union.
|
||||
|
||||
// MinGW-w64 has some additional C99 printf/scanf feature support.
|
||||
// So we add some helper macros to ease recognition of them.
|
||||
|
||||
// *
|
||||
// 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.
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ms175759%28v=VS.100%29.aspx
|
||||
// Templates won't work in C, will break if secure API is not enabled, disabled
|
||||
|
||||
// https://blogs.msdn.com/b/sdl/archive/2010/02/16/vc-2010-and-memcpy.aspx?Redirected=true
|
||||
// fallback on default implementation if we can't know the size of the destination
|
||||
|
||||
// Include _cygwin.h if we're building a Cygwin application.
|
||||
|
||||
// Target specific macro replacement for type "long". In the Windows API,
|
||||
// the type long is always 32 bit, even if the target is 64 bit (LLP64).
|
||||
// On 64 bit Cygwin, the type long is 64 bit (LP64). So, to get the right
|
||||
// sized definitions and declarations, all usage of type long in the Windows
|
||||
// headers have to be replaced by the below defined macro __LONG32.
|
||||
|
||||
// C/C++ specific language defines.
|
||||
|
||||
// Note the extern. This is needed to work around GCC's
|
||||
// limitations in handling dllimport attribute.
|
||||
|
||||
// Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
|
||||
// variadiac macro facility, because variadic macros cause syntax
|
||||
// errors with --traditional-cpp.
|
||||
|
||||
// High byte is the major version, low byte is the minor.
|
||||
|
||||
// *
|
||||
// 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 file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
|
||||
|
||||
type Ssize_t = int32 /* crtdefs.h:47:13 */
|
||||
|
||||
type Rsize_t = Size_t /* crtdefs.h:52:16 */
|
||||
|
||||
type Intptr_t = int32 /* crtdefs.h:64:13 */
|
||||
|
||||
type Uintptr_t = uint32 /* crtdefs.h:77:22 */
|
||||
|
||||
type Wint_t = uint16 /* crtdefs.h:106:24 */
|
||||
type Wctype_t = uint16 /* crtdefs.h:107:24 */
|
||||
|
||||
type Errno_t = int32 /* crtdefs.h:113:13 */
|
||||
|
||||
type X__time32_t = int32 /* crtdefs.h:118:14 */
|
||||
|
||||
type X__time64_t = int64 /* crtdefs.h:123:35 */
|
||||
|
||||
type Time_t = X__time32_t /* crtdefs.h:136:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
Frefcount int32
|
||||
Flc_codepage uint32
|
||||
Flc_collate_cp uint32
|
||||
Flc_handle [6]uint32
|
||||
Flc_id [6]LC_ID
|
||||
Flc_category [6]struct {
|
||||
Flocale uintptr
|
||||
Fwlocale uintptr
|
||||
Frefcount uintptr
|
||||
Fwrefcount uintptr
|
||||
}
|
||||
Flc_clike int32
|
||||
Fmb_cur_max int32
|
||||
Flconv_intl_refcount uintptr
|
||||
Flconv_num_refcount uintptr
|
||||
Flconv_mon_refcount uintptr
|
||||
Flconv uintptr
|
||||
Fctype1_refcount uintptr
|
||||
Fctype1 uintptr
|
||||
Fpctype uintptr
|
||||
Fpclmap uintptr
|
||||
Fpcumap uintptr
|
||||
Flc_time_curr uintptr
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
|
||||
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* crtdefs.h:428:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */
|
||||
type X_locale_t = uintptr /* crtdefs.h:431:19 */
|
||||
|
||||
type TagLC_ID = struct {
|
||||
FwLanguage uint16
|
||||
FwCountry uint16
|
||||
FwCodePage uint16
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
|
||||
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
|
||||
type X_fsize_t = uint32 /* io.h:29:25 */
|
||||
|
||||
type X_finddata32_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]int8
|
||||
} /* io.h:35:3 */
|
||||
|
||||
type X_finddata32i64_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize int64
|
||||
Fname [260]int8
|
||||
_ [4]byte
|
||||
} /* io.h:44:3 */
|
||||
|
||||
type X_finddata64i32_t = struct {
|
||||
Fattrib uint32
|
||||
_ [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]int8
|
||||
} /* io.h:53:3 */
|
||||
|
||||
type X__finddata64_t = struct {
|
||||
Fattrib uint32
|
||||
_ [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize int64
|
||||
Fname [260]int8
|
||||
_ [4]byte
|
||||
} /* io.h:62:3 */
|
||||
|
||||
type X_wfinddata32_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:94:3 */
|
||||
|
||||
type X_wfinddata32i64_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize int64
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:103:3 */
|
||||
|
||||
type X_wfinddata64i32_t = struct {
|
||||
Fattrib uint32
|
||||
_ [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]Wchar_t
|
||||
_ [4]byte
|
||||
} /* io.h:112:3 */
|
||||
|
||||
type X_wfinddata64_t = struct {
|
||||
Fattrib uint32
|
||||
_ [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize int64
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:121:3 */
|
||||
|
||||
type X_off_t = int32 /* _mingw_off_t.h:5:16 */
|
||||
type Off32_t = int32 /* _mingw_off_t.h:7:16 */
|
||||
|
||||
type X_off64_t = int64 /* _mingw_off_t.h:13:39 */
|
||||
type Off64_t = int64 /* _mingw_off_t.h:15:39 */
|
||||
|
||||
type Off_t = Off64_t /* _mingw_off_t.h:24:17 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
420
vendor/modernc.org/libc/fcntl/fcntl_windows_amd64.go
generated
vendored
Normal file
420
vendor/modernc.org/libc/fcntl/fcntl_windows_amd64.go
generated
vendored
Normal file
@ -0,0 +1,420 @@
|
||||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_windows_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
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
|
||||
WIN64 = 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_AMD64 = 100
|
||||
X_M_X64 = 100
|
||||
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_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_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_WIN64 = 1
|
||||
X_WINT_T = 0
|
||||
X_WIO_DEFINED = 0
|
||||
X_WSTRING_DEFINED = 0
|
||||
X_WSTRING_S_DEFINED = 0
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = uint16 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the 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 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 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
|
||||
// fix was applied to trunk. This macro gets just increased on trunk. For
|
||||
// other branches its value won't be modified.
|
||||
|
||||
// mingw.org's version macros: these make gcc to define
|
||||
// MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
|
||||
// and the __mingwthr_key_dtor() function from the MinGW
|
||||
// CRT in its private gthr-win32.h header.
|
||||
|
||||
// Set VC specific compiler target macros.
|
||||
|
||||
// MS does not prefix symbols by underscores for 64-bit.
|
||||
// As we have to support older gcc version, which are using underscores
|
||||
// as symbol prefix for x64, we have to check here for the user label
|
||||
// prefix defined by gcc.
|
||||
|
||||
// Special case nameless struct/union.
|
||||
|
||||
// MinGW-w64 has some additional C99 printf/scanf feature support.
|
||||
// So we add some helper macros to ease recognition of them.
|
||||
|
||||
// *
|
||||
// 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.
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ms175759%28v=VS.100%29.aspx
|
||||
// Templates won't work in C, will break if secure API is not enabled, disabled
|
||||
|
||||
// https://blogs.msdn.com/b/sdl/archive/2010/02/16/vc-2010-and-memcpy.aspx?Redirected=true
|
||||
// fallback on default implementation if we can't know the size of the destination
|
||||
|
||||
// Include _cygwin.h if we're building a Cygwin application.
|
||||
|
||||
// Target specific macro replacement for type "long". In the Windows API,
|
||||
// the type long is always 32 bit, even if the target is 64 bit (LLP64).
|
||||
// On 64 bit Cygwin, the type long is 64 bit (LP64). So, to get the right
|
||||
// sized definitions and declarations, all usage of type long in the Windows
|
||||
// headers have to be replaced by the below defined macro __LONG32.
|
||||
|
||||
// C/C++ specific language defines.
|
||||
|
||||
// Note the extern. This is needed to work around GCC's
|
||||
// limitations in handling dllimport attribute.
|
||||
|
||||
// Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
|
||||
// variadiac macro facility, because variadic macros cause syntax
|
||||
// errors with --traditional-cpp.
|
||||
|
||||
// High byte is the major version, low byte is the minor.
|
||||
|
||||
// *
|
||||
// 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 file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
|
||||
|
||||
type Ssize_t = int64 /* crtdefs.h:45:35 */
|
||||
|
||||
type Rsize_t = Size_t /* crtdefs.h:52:16 */
|
||||
|
||||
type Intptr_t = int64 /* crtdefs.h:62:35 */
|
||||
|
||||
type Uintptr_t = uint64 /* crtdefs.h:75:44 */
|
||||
|
||||
type Wint_t = uint16 /* crtdefs.h:106:24 */
|
||||
type Wctype_t = uint16 /* crtdefs.h:107:24 */
|
||||
|
||||
type Errno_t = int32 /* crtdefs.h:113:13 */
|
||||
|
||||
type X__time32_t = int32 /* crtdefs.h:118:14 */
|
||||
|
||||
type X__time64_t = int64 /* crtdefs.h:123:35 */
|
||||
|
||||
type Time_t = X__time64_t /* crtdefs.h:138:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
Frefcount int32
|
||||
Flc_codepage uint32
|
||||
Flc_collate_cp uint32
|
||||
Flc_handle [6]uint32
|
||||
Flc_id [6]LC_ID
|
||||
Flc_category [6]struct {
|
||||
Flocale uintptr
|
||||
Fwlocale uintptr
|
||||
Frefcount uintptr
|
||||
Fwrefcount uintptr
|
||||
}
|
||||
Flc_clike int32
|
||||
Fmb_cur_max int32
|
||||
Flconv_intl_refcount uintptr
|
||||
Flconv_num_refcount uintptr
|
||||
Flconv_mon_refcount uintptr
|
||||
Flconv uintptr
|
||||
Fctype1_refcount uintptr
|
||||
Fctype1 uintptr
|
||||
Fpctype uintptr
|
||||
Fpclmap uintptr
|
||||
Fpcumap uintptr
|
||||
Flc_time_curr uintptr
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
|
||||
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* crtdefs.h:428:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */
|
||||
type X_locale_t = uintptr /* crtdefs.h:431:19 */
|
||||
|
||||
type TagLC_ID = struct {
|
||||
FwLanguage uint16
|
||||
FwCountry uint16
|
||||
FwCodePage uint16
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
|
||||
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
|
||||
type X_fsize_t = uint32 /* io.h:29:25 */
|
||||
|
||||
type X_finddata32_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]int8
|
||||
} /* io.h:35:3 */
|
||||
|
||||
type X_finddata32i64_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize int64
|
||||
Fname [260]int8
|
||||
_ [4]byte
|
||||
} /* io.h:44:3 */
|
||||
|
||||
type X_finddata64i32_t = struct {
|
||||
Fattrib uint32
|
||||
_ [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]int8
|
||||
} /* io.h:53:3 */
|
||||
|
||||
type X__finddata64_t = struct {
|
||||
Fattrib uint32
|
||||
_ [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize int64
|
||||
Fname [260]int8
|
||||
_ [4]byte
|
||||
} /* io.h:62:3 */
|
||||
|
||||
type X_wfinddata32_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:94:3 */
|
||||
|
||||
type X_wfinddata32i64_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize int64
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:103:3 */
|
||||
|
||||
type X_wfinddata64i32_t = struct {
|
||||
Fattrib uint32
|
||||
_ [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]Wchar_t
|
||||
_ [4]byte
|
||||
} /* io.h:112:3 */
|
||||
|
||||
type X_wfinddata64_t = struct {
|
||||
Fattrib uint32
|
||||
_ [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize int64
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:121:3 */
|
||||
|
||||
type X_off_t = int32 /* _mingw_off_t.h:5:16 */
|
||||
type Off32_t = int32 /* _mingw_off_t.h:7:16 */
|
||||
|
||||
type X_off64_t = int64 /* _mingw_off_t.h:13:39 */
|
||||
type Off64_t = int64 /* _mingw_off_t.h:15:39 */
|
||||
|
||||
type Off_t = Off64_t /* _mingw_off_t.h:24:17 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
9
vendor/modernc.org/libc/fsync.go
generated
vendored
Normal file
9
vendor/modernc.org/libc/fsync.go
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// Copyright 2020 The Libc Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !libc.nofsync
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
const noFsync = false
|
5
vendor/modernc.org/libc/fts/capi_darwin_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fts/capi_darwin_amd64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT.
|
||||
|
||||
package fts
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
vendor/modernc.org/libc/fts/capi_darwin_arm64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fts/capi_darwin_arm64.go
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_darwin_arm64.go -pkgname fts', DO NOT EDIT.
|
||||
|
||||
package fts
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user