Update dependencies (#333)

This commit is contained in:
tobi 2021-11-27 15:26:58 +01:00 committed by GitHub
commit 182b4eea73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
848 changed files with 377869 additions and 107280 deletions

4
vendor/modernc.org/cc/v3/Makefile generated vendored
View file

@ -95,8 +95,8 @@ edit:
editor: lexer.go
gofmt -l -s -w *.go
GO111MODULE=off go test -o /dev/null -c
GO111MODULE=off go install 2>&1 | tee log
go test -o /dev/null -c
go install 2>&1 | tee log
ast.go lexer.go stringer.go: lexer.l parser.yy enum.go
go generate

17
vendor/modernc.org/cc/v3/abi.go generated vendored
View file

@ -50,10 +50,9 @@ func NewABI(os, arch string) (ABI, error) {
return ABI{}, fmt.Errorf("unsupported os/arch pair: %s-%s", os, arch)
}
abi := ABI{
ByteOrder: order,
Types: make(map[Kind]ABIType, len(types)),
//TODO: depends on the OS?
SignedChar: true,
ByteOrder: order,
Types: make(map[Kind]ABIType, len(types)),
SignedChar: abiSignedChar[[2]string{os, arch}],
os: os,
arch: arch,
}
@ -276,10 +275,10 @@ func (a *ABI) layout(ctx *context, n Node, t *structType) *structType {
off := f.offset
m[off] = append(m[off], f)
}
for _, a := range m {
for _, s := range m {
var first *field
var w byte
for _, f := range a {
for _, f := range s {
if first == nil {
first = f
}
@ -291,11 +290,15 @@ func (a *ABI) layout(ctx *context, n Node, t *structType) *structType {
}
}
w = normalizeBitFieldWidth(w)
for _, f := range a {
for _, f := range s {
if f.isBitField {
f.blockStart = first
f.blockWidth = w
}
if a.ByteOrder == binary.BigEndian {
f.bitFieldOffset = w - f.bitFieldWidth - f.bitFieldOffset
f.bitFieldMask = (uint64(1)<<f.bitFieldWidth - 1) << f.bitFieldOffset
}
}
}
}()

View file

@ -3,13 +3,31 @@ 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,
}
var (
abiByteOrders = map[string]binary.ByteOrder{
"amd64": binary.LittleEndian,
"386": binary.LittleEndian,
"arm": binary.LittleEndian,
"arm64": binary.LittleEndian,
"s390x": binary.BigEndian,
}
abiSignedChar = map[[2]string]bool{
{"linux", "arm"}: false,
{"linux", "arm64"}: false,
{"linux", "s390x"}: false,
{"darwin", "amd64"}: true,
{"darwin", "arm64"}: true,
{"freebsd", "amd64"}: true,
{"linux", "386"}: true,
{"linux", "amd64"}: true,
{"netbsd", "amd64"}: true,
{"openbsd", "amd64"}: true,
{"windows", "386"}: true,
{"windows", "amd64"}: true,
}
)
// abiTypes contains size and alignment information for known OS/arch pairs.
//
@ -364,4 +382,73 @@ var abiTypes = map[[2]string]map[Kind]ABIType{
Int128: {16, 16, 16},
UInt128: {16, 16, 16},
},
// gcc (GCC) 8.4.0
{"openbsd", "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},
},
// gcc (GCC) 10.3.0
{"netbsd", "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},
},
}

2
vendor/modernc.org/cc/v3/ast.go generated vendored
View file

@ -670,6 +670,7 @@ func (n *AssignmentExpression) Position() (r token.Position) {
// AtomicTypeSpecifier:
// "_Atomic" '(' TypeName ')'
type AtomicTypeSpecifier struct {
list []*TypeSpecifier
Token Token
Token2 Token
Token3 Token
@ -1339,6 +1340,7 @@ type Declarator struct {
called bool
fnDef bool
hasInitializer bool
implicit bool
AttributeSpecifierList *AttributeSpecifierList
DirectDeclarator *DirectDeclarator
Pointer *Pointer

39
vendor/modernc.org/cc/v3/ast2.go generated vendored
View file

@ -414,16 +414,16 @@ func Preprocess(cfg *Config, includePaths, sysIncludePaths []string, sources []S
func wTok(w io.Writer, tok Token) (err error) {
switch tok.Rune {
case STRINGLITERAL, LONGSTRINGLITERAL:
_, err = fmt.Fprintf(w, `%s"%s"`, tok.Sep, cQuotedString(tok.String()))
_, err = fmt.Fprintf(w, `%s"%s"`, tok.Sep, cQuotedString(tok.String(), true))
case CHARCONST, LONGCHARCONST:
_, err = fmt.Fprintf(w, `%s'%s'`, tok.Sep, cQuotedString(tok.String()))
_, err = fmt.Fprintf(w, `%s'%s'`, tok.Sep, cQuotedString(tok.String(), false))
default:
_, err = fmt.Fprintf(w, "%s%s", tok.Sep, tok)
}
return err
}
func cQuotedString(s string) []byte {
func cQuotedString(s string, isString bool) []byte {
var b []byte
for i := 0; i < len(s); i++ {
c := s[i]
@ -447,7 +447,20 @@ func cQuotedString(s string) []byte {
b = append(b, '\\', '\\')
continue
case '"':
b = append(b, '\\', '"')
switch {
case isString:
b = append(b, '\\', '"')
default:
b = append(b, '"')
}
continue
case '\'':
switch {
case isString:
b = append(b, '\'')
default:
b = append(b, '\\', '\'')
}
continue
}
@ -590,7 +603,11 @@ func (n *BlockItem) Closure() map[StringID]struct{} { return n.closure }
// FunctionDefinition returns the nested function (case BlockItemFuncDef).
func (n *BlockItem) FunctionDefinition() *FunctionDefinition { return n.fn }
func (n *Declarator) IsStatic() bool { return n.td != nil && n.td.static() }
func (n *Declarator) IsStatic() bool { return n.td != nil && n.td.static() }
// IsImplicit reports whether n was not declared nor defined, only inferred.
func (n *Declarator) IsImplicit() bool { return n.implicit }
func (n *Declarator) isVisible(at int32) bool { return at == 0 || n.DirectDeclarator.ends() < at }
func (n *Declarator) setLHS(lhs *Declarator) {
@ -790,7 +807,8 @@ func (n *AndExpression) Promote() Type { return n.promote }
func (n *InitDeclarator) Value() *InitializerValue { return n.initializer }
// FirstDesignatorField returns the first field a designator denotes, if any.
// FirstDesignatorField returns the first field a designator of an union type
// denotes, if any.
func (n *Initializer) FirstDesignatorField() Field { return n.field0 }
// TrailingComma returns the comma token following n, if any.
@ -894,6 +912,15 @@ func (n *EnumSpecifier) LexicalScope() Scope { return n.lexicalScope }
// // TypeSpecifierTypedefName was resolved in, if any.
// func (n *TypeSpecifier) ResolvedIn() Scope { return n.resolvedIn }
func (n *TypeSpecifier) list() (r []*TypeSpecifier) {
switch n.Case {
case TypeSpecifierAtomic:
return n.AtomicTypeSpecifier.list
default:
return []*TypeSpecifier{n}
}
}
// // LexicalScope returns the lexical scope of n.
// func (n *UnaryExpression) LexicalScope() Scope { return n.lexicalScope }

16
vendor/modernc.org/cc/v3/cc.go generated vendored
View file

@ -509,14 +509,18 @@ type Config struct {
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 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
// IncludeFileHandler, when non nil, is called by the preprocessor for every
// successfully included file.
IncludeFileHandler func(pos gotoken.Position, includePath string)
MaxErrors int // 0: default (10), < 0: unlimited, n: n.
CheckExternInlineFnBodies bool // Translate will consider extern inline function bodies.

567
vendor/modernc.org/cc/v3/check.go generated vendored

File diff suppressed because it is too large Load diff

30
vendor/modernc.org/cc/v3/cpp.go generated vendored
View file

@ -7,6 +7,7 @@ package cc // import "modernc.org/cc/v3"
import (
"bytes"
"fmt"
gotoken "go/token"
"math"
"os"
"path/filepath"
@ -2182,6 +2183,8 @@ func decodeEscapeSequence(ctx *context, tok cppToken, s string) (rune, int) {
return 7, 2
case 'b':
return 8, 2
case 'e':
return 0x1b, 2
case 'f':
return 12, 2
case 'n':
@ -2444,21 +2447,7 @@ func (n *ppIncludeDirective) translationPhase4(c *cpp) {
v = dir
}
var p string
switch {
case strings.HasPrefix(nm, "./"):
wd := c.ctx.cfg.WorkingDir
if wd == "" {
var err error
if wd, err = os.Getwd(); err != nil {
c.err(toks[0], "cannot determine working dir: %v", err)
return
}
}
p = filepath.Join(wd, nm)
default:
p = filepath.Join(v, nm)
}
p := filepath.Join(v, nm)
fi, err := c.ctx.statFile(p, sys)
if err != nil || fi.IsDir() {
continue
@ -2475,6 +2464,17 @@ func (n *ppIncludeDirective) translationPhase4(c *cpp) {
return
}
if h := c.ctx.cfg.IncludeFileHandler; h != nil {
var position gotoken.Position
if p := toks[0].Pos(); p.IsValid() {
position = gotoken.Position(c.file.PositionFor(p, true))
}
apath, err := filepath.Abs(path)
if err != nil {
c.err(toks[0], "%s: cannot compute absolute path: %v", path, err)
}
h(position, apath)
}
cf, err := cache.getFile(c.ctx, path, sys, false)
if err != nil {
c.err(toks[0], "%s: %v", path, err)

8
vendor/modernc.org/cc/v3/lexer.go generated vendored
View file

@ -360,7 +360,7 @@ yystate20:
switch {
default:
goto yyabort
case c == '"' || c == '\'' || c >= '0' && c <= '7' || c == '?' || c == '\\' || c == 'a' || c == 'b' || c == 'f' || c == 'n' || c == 'r' || c == 't' || c == 'v':
case c == '"' || c == '\'' || c >= '0' && c <= '7' || c == '?' || c == '\\' || c == 'a' || c == 'b' || c == 'e' || c == 'f' || c == 'n' || c == 'r' || c == 't' || c == 'v':
goto yystate18
case c == 'U':
goto yystate21
@ -662,7 +662,7 @@ yystate53:
switch {
default:
goto yyabort
case c == '"' || c == '\'' || c >= '0' && c <= '7' || c == '?' || c == '\\' || c == 'a' || c == 'b' || c == 'f' || c == 'n' || c == 'r' || c == 't' || c == 'v':
case c == '"' || c == '\'' || c >= '0' && c <= '7' || c == '?' || c == '\\' || c == 'a' || c == 'b' || c == 'e' || c == 'f' || c == 'n' || c == 'r' || c == 't' || c == 'v':
goto yystate51
case c == 'U':
goto yystate54
@ -1137,7 +1137,7 @@ yystate105:
switch {
default:
goto yyabort
case c == '"' || c == '\'' || c >= '0' && c <= '7' || c == '?' || c == '\\' || c == 'a' || c == 'b' || c == 'f' || c == 'n' || c == 'r' || c == 't' || c == 'v':
case c == '"' || c == '\'' || c >= '0' && c <= '7' || c == '?' || c == '\\' || c == 'a' || c == 'b' || c == 'e' || c == 'f' || c == 'n' || c == 'r' || c == 't' || c == 'v':
goto yystate103
case c == 'U':
goto yystate106
@ -1254,7 +1254,7 @@ yystate117:
switch {
default:
goto yyabort
case c == '"' || c == '\'' || c >= '0' && c <= '7' || c == '?' || c == '\\' || c == 'a' || c == 'b' || c == 'f' || c == 'n' || c == 'r' || c == 't' || c == 'v':
case c == '"' || c == '\'' || c >= '0' && c <= '7' || c == '?' || c == '\\' || c == 'a' || c == 'b' || c == 'e' || c == 'f' || c == 'n' || c == 'r' || c == 't' || c == 'v':
goto yystate115
case c == 'U':
goto yystate118

2
vendor/modernc.org/cc/v3/lexer.l generated vendored
View file

@ -34,7 +34,7 @@ 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]
simple-sequence \\['\x22?\\abefnrtv]
string-literal \x22{s-char-sequence}?\x22
universal-character-name \\u{hex-quad}|\\U{hex-quad}{hex-quad}
white-space [ \t\f\v]

4
vendor/modernc.org/cc/v3/parser.yy generated vendored
View file

@ -608,7 +608,8 @@ package cc // import "modernc.org/cc/v3"
/*yy:case Expr */ | IDENTIFIER AttributeSpecifierList '=' ConstantExpression
/* [2], 6.7.2.4 Atomic type specifiers */
/*yy:example _Atomic(int) i; */
/*yy:field list []*TypeSpecifier */
/*yy:example _Atomic(int) i; */
AtomicTypeSpecifier:
"_Atomic" '(' TypeName ')'
@ -647,6 +648,7 @@ package cc // import "modernc.org/cc/v3"
/*yy:field called bool */
/*yy:field fnDef bool */
/*yy:field hasInitializer bool */
/*yy:field implicit bool */
/*yy:example int *p __attribute__ ((foo)); */
Declarator:
Pointer DirectDeclarator AttributeSpecifierList %prec BELOW_ATTRIBUTE

View file

@ -1178,10 +1178,6 @@ func (c *ppCache) getFile(ctx *context, name string, sys bool, doNotCache bool)
size := int(fi.Size())
if !filepath.IsAbs(name) { // Never cache relative paths
if isTesting {
panic(internalError())
}
f, err := ctx.openFile(name, sys)
if err != nil {
return nil, err

35
vendor/modernc.org/cc/v3/type.go generated vendored
View file

@ -403,8 +403,8 @@ type Type interface {
// Name returns type name, if any.
Name() StringID
// atomic reports whether type has type qualifier "_Atomic".
atomic() bool
// IsAtomic reports whether type has type qualifier "_Atomic".
IsAtomic() bool
// hasConst reports whether type has type qualifier "const".
hasConst() bool
@ -611,7 +611,7 @@ func (t *typeBase) check(ctx *context, td typeDescriptor, defaultInt bool) (r Ty
case DeclarationSpecifiersStorage: // StorageClassSpecifier DeclarationSpecifiers
// nop
case DeclarationSpecifiersTypeSpec: // TypeSpecifier DeclarationSpecifiers
typeSpecifiers = append(typeSpecifiers, n.TypeSpecifier)
typeSpecifiers = append(typeSpecifiers, n.TypeSpecifier.list()...)
case DeclarationSpecifiersTypeQual: // TypeQualifier DeclarationSpecifiers
// nop
case DeclarationSpecifiersFunc: // FunctionSpecifier DeclarationSpecifiers
@ -628,7 +628,7 @@ func (t *typeBase) check(ctx *context, td typeDescriptor, defaultInt bool) (r Ty
for ; n != nil; n = n.SpecifierQualifierList {
switch n.Case {
case SpecifierQualifierListTypeSpec: // TypeSpecifier SpecifierQualifierList
typeSpecifiers = append(typeSpecifiers, n.TypeSpecifier)
typeSpecifiers = append(typeSpecifiers, n.TypeSpecifier.list()...)
case SpecifierQualifierListTypeQual: // TypeQualifier SpecifierQualifierList
// nop
case SpecifierQualifierListAlignSpec: // AlignmentSpecifier SpecifierQualifierList
@ -931,8 +931,8 @@ func (t *typeBase) UnionCommon() Kind {
panic(internalErrorf("%s: UnionCommon of invalid type", t.Kind()))
}
// atomic implements Type.
func (t *typeBase) atomic() bool { return t.flags&fAtomic != 0 }
// IsAtomic implements Type.
func (t *typeBase) IsAtomic() bool { return t.flags&fAtomic != 0 }
// Attributes implements Type.
func (t *typeBase) Attributes() (a []*AttributeSpecifier) { return nil }
@ -1220,7 +1220,7 @@ func (t *typeBase) Tag() StringID {
// string implements Type.
func (t *typeBase) string(b *bytes.Buffer) {
spc := ""
if t.atomic() {
if t.IsAtomic() {
b.WriteString("atomic")
spc = " "
}
@ -1944,7 +1944,7 @@ func (t *aliasType) Size() uintptr { return t.d.Type().Size() }
// String implements Type.
func (t *aliasType) String() string {
var a []string
if t.typeBase.atomic() {
if t.typeBase.IsAtomic() {
a = append(a, "atomic")
}
if t.typeBase.hasConst() {
@ -1972,8 +1972,8 @@ func (t *aliasType) Tag() StringID { return t.d.Type().Tag() }
// Name implements Type.
func (t *aliasType) Name() StringID { return t.nm }
// atomic implements Type.
func (t *aliasType) atomic() bool { return t.d.Type().atomic() }
// IsAtomic implements Type.
func (t *aliasType) IsAtomic() bool { return t.d.Type().IsAtomic() }
// Inline implements Type.
func (t *aliasType) Inline() bool { return t.d.Type().Inline() }
@ -2544,12 +2544,11 @@ func (t *taggedType) isAssingmentCompatibleOperand(rhs Operand) (r bool) {
// IsCompatible implements Type.
func (t *taggedType) IsCompatible(u Type) (r bool) {
// defer func() {
// u0 := u
// if !r {
// trc("TRACE %v <- %v\n%s", t, u0, debug.Stack()) //TODO-
// }
// }()
defer func() {
// if !r {
// trc("TRACE %v <- %v: %v (%s)", t, u0, r, origin(2)) //TODO-
// }
}()
if t == nil || u == nil {
return false
}
@ -3164,10 +3163,6 @@ func NewStructLayout(t Type) *StructLayout {
//trc("%q off %d pos %d %v %v %v", f.Name(), off, pos, ft, ft.Kind(), ft.IsIncomplete())
switch {
case ft.IsBitFieldType():
if f.BitFieldOffset() != 0 {
break
}
if p := int(off - pos); p != 0 {
if pads == nil {
pads = map[Field]int{}

View file

@ -72,13 +72,17 @@ test_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 ./...
GOOS=darwin GOARCH=amd64 go test -c -o /dev/null
GOOS=darwin GOARCH=arm64 go test -c -o /dev/null
GOOS=freebsd GOARCH=amd64 go test -c -o /dev/null
GOOS=linux GOARCH=386 go test -c -o /dev/null
GOOS=linux GOARCH=amd64 go test -c -o /dev/null
GOOS=linux GOARCH=arm go test -c -o /dev/null
GOOS=linux GOARCH=arm64 go test -c -o /dev/null
GOOS=linux GOARCH=s390x go test -c -o /dev/null
GOOS=netbsd GOARCH=amd64 go test -c -o /dev/null
GOOS=windows GOARCH=386 go test -c -o /dev/null
GOOS=windows GOARCH=amd64 go test -c -o /dev/null
devbench:
date 2>&1 | tee log-devbench

View file

@ -18,6 +18,7 @@ import (
"go/parser"
"go/token"
"io"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
@ -32,17 +33,20 @@ import (
"github.com/kballard/go-shellquote"
"golang.org/x/tools/go/packages"
"modernc.org/cc/v3"
"modernc.org/libc"
"modernc.org/opt"
)
const (
Version = "3.10.0-20210904132603"
Version = "3.12.6-20210922111124"
experimentsEnvVar = "CCGO_EXPERIMENT"
maxSourceLine = 1 << 20
)
var (
_ = libc.Xstdin
coverExperiment bool
)
@ -201,9 +205,11 @@ char *__builtin___strncpy_chk(char *dest, char *src, size_t n, size_t os);
char *__builtin_strchr(const char *s, int c);
char *__builtin_strcpy(char *dest, const char *src);
double __builtin_copysign ( double x, double y );
double __builtin_copysignl (long double x, long double y );
double __builtin_fabs(double x);
double __builtin_huge_val (void);
double __builtin_inf (void);
double __builtin_nan (const char *str);
float __builtin_copysignf ( float x, float y );
float __builtin_huge_valf (void);
float __builtin_inff (void);
@ -214,18 +220,23 @@ int __builtin___vsnprintf_chk (char *s, size_t maxlen, int flag, size_t os, cons
int __builtin__snprintf_chk(char * str, size_t maxlen, int flag, size_t strlen, const char * format);
int __builtin_abs(int j);
int __builtin_add_overflow();
int __builtin_clz (unsigned);
int __builtin_clzl (unsigned long);
int __builtin_clzll (unsigned long long);
int __builtin_constant_p_impl(int, ...);
int __builtin_getentropy(void*, size_t);
int __builtin_isnan(double);
int __builtin_memcmp(const void *s1, const void *s2, size_t n);
int __builtin_mul_overflow();
int __builtin_popcount (unsigned int x);
int __builtin_popcountl (unsigned long x);
int __builtin_printf(const char *format, ...);
int __builtin_snprintf(char *str, size_t size, const char *format, ...);
int __builtin_sprintf(char *str, const char *format, ...);
int __builtin_strcmp(const char *s1, const char *s2);
int __builtin_sub_overflow();
long __builtin_expect (long exp, long c);
long double __builtin_nanl (const char *str);
long long __builtin_llabs(long long j);
size_t __builtin_object_size (void * ptr, int type);
size_t __builtin_strlen(const char *s);
@ -243,9 +254,30 @@ void __builtin_free(void *ptr);
void __builtin_prefetch (const void *addr, ...);
void __builtin_trap (void);
void __builtin_unreachable (void);
void __ccgo_dmesg(char*, ...);
void __ccgo_va_end(__builtin_va_list ap);
void __ccgo_va_start(__builtin_va_list ap);
#define __sync_add_and_fetch(ptr, val) \
__builtin_choose_expr( \
__builtin_types_compatible_p(typeof(*ptr), unsigned), \
__sync_add_and_fetch_uint32(ptr, val), \
__TODO__ \
)
#define __sync_fetch_and_add(ptr, val) \
__TODO__ \
#define __sync_sub_and_fetch(ptr, val) \
__builtin_choose_expr( \
__builtin_types_compatible_p(typeof(*ptr), unsigned), \
__sync_sub_and_fetch_uint32(ptr, val), \
__TODO__ \
)
unsigned __sync_add_and_fetch_uint32(unsigned*, unsigned);
unsigned __sync_sub_and_fetch_uint32(unsigned*, unsigned);
`
defaultCrt = "modernc.org/libc"
)
@ -296,8 +328,7 @@ func trc(s string, args ...interface{}) string { //TODO-
default:
s = fmt.Sprintf(s, args...)
}
_, fn, fl, _ := runtime.Caller(1)
r := fmt.Sprintf("%s:%d: TRC %s", fn, fl, s)
r := fmt.Sprintf("%s: TRC %s", origin(2), s)
fmt.Fprintf(os.Stdout, "%s\n", r)
os.Stdout.Sync()
return r
@ -313,6 +344,8 @@ type Task struct {
args []string
asts []*cc.AST
capif string
saveConfig string // -save-config
saveConfigErr error
cc string // $CC, default "gcc"
ccLookPath string // LookPath(cc)
cdb string // foo.json, use compile DB
@ -331,9 +364,14 @@ type Task struct {
hide map[string]struct{} // -hide
hostConfigCmd string // -host-config-cmd
hostConfigOpts string // -host-config-opts
ignoredIncludes string // -ignored-includes
hostIncludes []string
hostPredefined string
hostSysIncludes []string
ignoredIncludes string // -ignored-includes
imported []*imported
includedFiles map[string]struct{}
l []string // -l
loadConfig string // --load-config
o string // -o
out io.Writer
pkgName string // -pkgname
@ -346,6 +384,7 @@ type Task struct {
stderr io.Writer
stdout io.Writer
symSearchOrder []int // >= 0: asts[i], < 0 : imported[-i-1]
verboseCompiledb bool // -verbose-compiledb
volatiles map[cc.StringID]struct{} // -volatile
// Path to a binary that will be called instead of executing
@ -359,6 +398,8 @@ type Task struct {
E bool // -E
allErrors bool // -all-errors
compiledbValid bool // -compiledb present
configSaved bool
configured bool // hostPredefined, hostIncludes, hostSysIncludes are valid
cover bool // -cover-instrumentation
coverC bool // -cover-instrumentation-c
defaultUnExport bool // -unexported-by-default
@ -372,6 +413,7 @@ type Task struct {
fullPathComments bool // -full-path-comments
funcSig bool // -func-sig
header bool // -header
ignoreUndefined bool // -ignoreUndefined
isScripted bool
mingw bool
noCapi bool // -nocapi
@ -575,14 +617,23 @@ func (t *Task) capi2(files []string) (pkgName string, exports map[string]struct{
// Main executes task.
func (t *Task) Main() (err error) {
// trc("%p: %q", t, t.args)
if dmesgs {
defer func() {
if err != nil {
// trc("FAIL %p: %q: %v", t, t.args, err)
dmesg("%v: returning from Task.Main: %v", origin(1), err)
}
}()
}
defer func() {
if t.saveConfigErr != nil && err == nil {
err = t.saveConfigErr
}
}()
if !t.isScripted && coverExperiment {
defer func() {
fmt.Fprintf(os.Stderr, "cover report:\n%s\n", coverReport())
@ -630,24 +681,105 @@ func (t *Task) Main() (err error) {
opts.Opt("full-path-comments", func(opt string) error { t.fullPathComments = true; return nil })
opts.Opt("func-sig", func(opt string) error { t.funcSig = true; return nil })
opts.Opt("header", func(opt string) error { t.header = true; return nil })
opts.Opt("ignore-undefined", func(opt string) error { t.ignoreUndefined = true; return nil })
opts.Opt("nocapi", func(opt string) error { t.noCapi = true; return nil })
opts.Opt("nostdinc", func(opt string) error { t.nostdinc = true; return nil })
opts.Opt("panic-stubs", func(opt string) error { t.panicStubs = true; return nil })
opts.Opt("trace-translation-units", func(opt string) error { t.traceTranslationUnits = true; return nil })
opts.Opt("trace-pinning", func(opt string) error { t.tracePinning = true; return nil })
opts.Opt("trace-translation-units", func(opt string) error { t.traceTranslationUnits = true; return nil })
opts.Opt("unexported-by-default", func(opt string) error { t.defaultUnExport = true; return nil })
opts.Opt("verbose-compiledb", func(opt string) error { t.verboseCompiledb = true; return nil })
opts.Opt("verify-structs", func(opt string) error { t.verifyStructs = true; return nil })
opts.Opt("version", func(opt string) error { t.version = true; return nil })
opts.Opt("watch-instrumentation", func(opt string) error { t.watch = true; return nil })
opts.Opt("windows", func(opt string) error { t.windows = true; return nil })
opts.Opt("trace-included-files", func(opt string) error {
if t.includedFiles == nil {
t.includedFiles = map[string]struct{}{}
}
prev := t.cfg.IncludeFileHandler
t.cfg.IncludeFileHandler = func(pos token.Position, pathName string) {
if prev != nil {
prev(pos, pathName)
}
if _, ok := t.includedFiles[pathName]; !ok {
t.includedFiles[pathName] = struct{}{}
fmt.Fprintf(os.Stderr, "#include %s\n", pathName)
}
}
return nil
})
opts.Arg("save-config", false, func(arg, value string) error {
if value == "" {
return nil
}
abs, err := filepath.Abs(value)
if err != nil {
return err
}
t.saveConfig = abs
if t.includedFiles == nil {
t.includedFiles = map[string]struct{}{}
}
prev := t.cfg.IncludeFileHandler
t.cfg.IncludeFileHandler = func(pos token.Position, pathName string) {
if prev != nil {
prev(pos, pathName)
}
if _, ok := t.includedFiles[pathName]; !ok {
t.includedFiles[pathName] = struct{}{}
full := filepath.Join(abs, pathName)
switch _, err := os.Stat(full); {
case err != nil && os.IsNotExist(err):
// ok
case err != nil:
t.saveConfigErr = err
return
default:
return
}
b, err := ioutil.ReadFile(pathName)
if err != nil {
t.saveConfigErr = err
return
}
dir, _ := filepath.Split(full)
if err := os.MkdirAll(dir, 0700); err != nil {
t.saveConfigErr = err
return
}
if err := ioutil.WriteFile(full, b, 0600); err != nil {
t.saveConfigErr = err
}
}
}
return nil
})
opts.Arg("-load-config", false, func(arg, value string) error {
if value == "" {
return nil
}
abs, err := filepath.Abs(value)
if err != nil {
return err
}
t.loadConfig = abs
return nil
})
opts.Arg("volatile", false, func(arg, value string) error {
for _, v := range strings.Split(strings.TrimSpace(value), ",") {
t.volatiles[cc.String(v)] = struct{}{}
}
return nil
})
opts.Opt("nostdlib", func(opt string) error {
t.nostdlib = true
t.crt = ""
@ -711,6 +843,10 @@ func (t *Task) Main() (err error) {
return t.createCompileDB(cmd)
case t.cdb != "": // foo.json ..., use DB
if err := t.configure(); err != nil {
return err
}
return t.useCompileDB(t.cdb, x)
}
@ -721,6 +857,20 @@ func (t *Task) Main() (err error) {
}
if t.version {
gobin, err := exec.LookPath("go")
var b []byte
if err == nil {
var bin string
bin, err = exec.LookPath(os.Args[0])
if err == nil {
b, err = exec.Command(gobin, "version", "-m", bin).CombinedOutput()
}
}
if err == nil {
fmt.Fprintf(t.stdout, "%s", b)
return nil
}
fmt.Fprintf(t.stdout, "%s\n", Version)
return nil
}
@ -746,7 +896,13 @@ func (t *Task) Main() (err error) {
}
t.imported[len(t.imported)-1].used = true // crt is always imported
}
if err := t.configure(); err != nil {
return err
}
abi, err := cc.NewABI(t.goos, t.goarch)
abi.Types[cc.LongDouble] = abi.Types[cc.Double]
if err != nil {
return err
}
@ -764,27 +920,19 @@ func (t *Task) Main() (err error) {
t.cfg.ReplaceMacroTclIeeeDoubleRounding = t.replaceTclIeeeDoubleRounding
t.cfg.Config3.IgnoreInclude = re
t.cfg.Config3.NoFieldAndBitfieldOverlap = true
t.cfg.Config3.PreserveWhiteSpace = true
t.cfg.Config3.PreserveWhiteSpace = t.saveConfig == ""
t.cfg.Config3.UnsignedEnums = true
hostConfigOpts := strings.Split(t.hostConfigOpts, ",")
if t.hostConfigOpts == "" {
hostConfigOpts = nil
}
hostPredefined, hostIncludes, hostSysIncludes, err := cc.HostConfig(t.hostConfigCmd, hostConfigOpts...)
if err != nil {
return err
}
if t.mingw = detectMingw(hostPredefined); t.mingw {
if t.mingw = detectMingw(t.hostPredefined); t.mingw {
t.windows = true
}
if t.nostdinc {
hostIncludes = nil
hostSysIncludes = nil
t.hostIncludes = nil
t.hostSysIncludes = nil
}
var sources []cc.Source
if hostPredefined != "" {
sources = append(sources, cc.Source{Name: "<predefined>", Value: hostPredefined})
if t.hostPredefined != "" {
sources = append(sources, cc.Source{Name: "<predefined>", Value: t.hostPredefined})
}
sources = append(sources, cc.Source{Name: "<builtin>", Value: builtin})
if len(t.D) != 0 {
@ -816,12 +964,12 @@ func (t *Task) Main() (err error) {
// line, then in directories named in -I options, and last in the usual
// places
includePaths := append([]string{"@"}, t.I...)
includePaths = append(includePaths, hostIncludes...)
includePaths = append(includePaths, hostSysIncludes...)
includePaths = append(includePaths, t.hostIncludes...)
includePaths = append(includePaths, t.hostSysIncludes...)
// For headers whose names are enclosed in angle brackets ( "<>" ), the
// header shall be searched for only in directories named in -I options
// and then in the usual places.
sysIncludePaths := append(t.I, hostSysIncludes...)
sysIncludePaths := append(t.I, t.hostSysIncludes...)
if t.traceTranslationUnits {
fmt.Printf("target: %s/%s\n", t.goos, t.goarch)
if t.hostConfigCmd != "" {
@ -830,11 +978,17 @@ func (t *Task) Main() (err error) {
}
for i, v := range t.sources {
tuSources := append(sources, v)
out := t.stdout
if t.saveConfig != "" {
out = io.Discard
t.E = true
}
if t.E {
t.cfg.PreprocessOnly = true
if err := cc.Preprocess(t.cfg, includePaths, sysIncludePaths, tuSources, t.stdout); err != nil {
if err := cc.Preprocess(t.cfg, includePaths, sysIncludePaths, tuSources, out); err != nil {
return err
}
memGuard(i, t.isScripted)
continue
}
@ -861,6 +1015,81 @@ func (t *Task) Main() (err error) {
return t.link()
}
func (t *Task) configure() (err error) {
if t.configured {
return nil
}
type jsonConfig struct {
Predefined string
IncludePaths []string
SysIncludePaths []string
OS string
Arch string
}
t.configured = true
if t.loadConfig != "" {
path := filepath.Join(t.loadConfig, "config.json")
// trc("%p: LOAD_CONFIG(%s)", t, path)
b, err := ioutil.ReadFile(path)
if err != nil {
return err
}
loadConfig := &jsonConfig{}
if err := json.Unmarshal(b, loadConfig); err != nil {
return err
}
t.goos = loadConfig.OS
t.goarch = loadConfig.Arch
for _, v := range loadConfig.IncludePaths {
t.hostIncludes = append(t.hostIncludes, filepath.Join(t.loadConfig, v))
}
for _, v := range loadConfig.SysIncludePaths {
t.hostSysIncludes = append(t.hostSysIncludes, filepath.Join(t.loadConfig, v))
}
t.hostPredefined = loadConfig.Predefined
return nil
}
hostConfigOpts := strings.Split(t.hostConfigOpts, ",")
if t.hostConfigOpts == "" {
hostConfigOpts = nil
}
if t.hostPredefined, t.hostIncludes, t.hostSysIncludes, err = cc.HostConfig(t.hostConfigCmd, hostConfigOpts...); err != nil {
return err
}
if t.saveConfig != "" && !t.configSaved {
t.configSaved = true
// trc("%p: SAVE_CONFIG(%s)", t, t.saveConfig)
cfg := &jsonConfig{
Predefined: t.hostPredefined,
IncludePaths: t.hostIncludes,
SysIncludePaths: t.hostSysIncludes,
OS: t.goos,
Arch: t.goarch,
}
b, err := json.Marshal(cfg)
if err != nil {
return err
}
full := filepath.Join(t.saveConfig, "config.json")
if err := os.MkdirAll(t.saveConfig, 0700); err != nil {
return err
}
if err := ioutil.WriteFile(full, b, 0600); err != nil {
return err
}
}
return nil
}
func (t *Task) setLookPaths() (err error) {
if t.ccLookPath, err = exec.LookPath(t.cc); err != nil {
return err
@ -955,11 +1184,20 @@ func (t *Task) scriptBuild2(script [][]string) error {
fmt.Printf("%s\n", cmd)
}
t2 := NewTask(append(ccgo, args...), t.stdout, t.stderr)
t2.cfg.IncludeFileHandler = t.cfg.IncludeFileHandler
t2.cfg.SharedFunctionDefinitions = t.cfg.SharedFunctionDefinitions
t2.configSaved = t.configSaved
t2.configured = t.configured
t2.hostIncludes = t.hostIncludes
t2.hostPredefined = t.hostPredefined
t2.hostSysIncludes = t.hostSysIncludes
t2.includedFiles = t.includedFiles
t2.isScripted = true
t2.loadConfig = t.loadConfig
t2.replaceFdZero = t.replaceFdZero
t2.replaceTclDefaultDoubleRounding = t.replaceTclDefaultDoubleRounding
t2.replaceTclIeeeDoubleRounding = t.replaceTclIeeeDoubleRounding
t2.isScripted = true
t2.saveConfig = t.saveConfig
if err := inDir(dir, t2.Main); err != nil {
return err
}
@ -982,6 +1220,10 @@ func (t *Task) scriptBuild2(script [][]string) error {
}
t.imported[len(t.imported)-1].used = true // crt is always imported
}
if t.saveConfig != "" {
return nil
}
return t.link()
}
@ -990,7 +1232,8 @@ type cdb struct {
outputIndex map[string][]*cdbItem
}
func (db *cdb) find(obj map[string]*cdbItem, nm string, ver, seqLimit int, trace bool, path []string, cc, ar string) error {
func (db *cdb) find(obj map[string]*cdbItem, nm string, ver, seqLimit int, path []string, cc, ar string) error {
// trc("%v: nm %q ver %v seqLimit %v path %q cc %q ar %q", origin(1), nm, ver, seqLimit, path, cc, ar)
var item *cdbItem
var k string
switch {
@ -1059,7 +1302,7 @@ func (db *cdb) find(obj map[string]*cdbItem, nm string, ver, seqLimit int, trace
obj[k] = item
var errs []string
for _, v := range item.sources(cc, ar) {
if err := db.find(obj, v, -1, item.seq, trace, append(path, nm), cc, ar); err != nil {
if err := db.find(obj, v, -1, item.seq, append(path, nm), cc, ar); err != nil {
errs = append(errs, err.Error())
}
}
@ -1137,7 +1380,7 @@ func (t *Task) useCompileDB(fn string, args []string) error {
notFound := false
for _, v := range args {
v, ver := suffixNum(v, 0)
if err := cdb.find(obj, v, ver, -1, t.traceTranslationUnits, nil, t.ccLookPath, t.arLookPath); err != nil {
if err := cdb.find(obj, v, ver, -1, nil, t.ccLookPath, t.arLookPath); err != nil {
notFound = true
fmt.Fprintln(os.Stderr, err)
}
@ -1174,6 +1417,13 @@ func (t *Task) cdbBuild(obj map[string]*cdbItem, list []string) error {
return err
}
for _, v := range t.D {
args = append(args, "-D"+v)
}
for _, v := range t.U {
args = append(args, "-U"+v)
}
line := append([]string{it.Directory}, args...)
script = append(script, line)
}
@ -1212,9 +1462,12 @@ func (t *Task) createCompileDB(command []string) (rerr error) {
var cmd *exec.Cmd
var parser func(s string) ([]string, error)
out:
switch {
case t.goos == "darwin", t.goos == "freebsd":
if command[0] != "make" {
switch t.goos {
case "darwin", "freebsd", "netbsd":
switch command[0] {
case "make", "gmake":
// ok
default:
return fmt.Errorf("usupported build command: %s", command[0])
}
@ -1226,7 +1479,7 @@ out:
command = append([]string{sh, "-c"}, join(" ", command[0], "SHELL='sh -x'", command[1:]))
cmd = exec.Command(command[0], command[1:]...)
parser = makeXParser
case t.goos == "windows":
case "windows":
if command[0] != "make" {
return fmt.Errorf("usupported build command: %s", command[0])
}
@ -1257,7 +1510,12 @@ out:
}
cmd.Env = append(os.Environ(), "LC_ALL=C")
cw := t.newCdbMakeWriter(cwr, cwd, parser)
cmd.Stdout = io.MultiWriter(cw, os.Stdout)
switch {
case t.verboseCompiledb:
cmd.Stdout = io.MultiWriter(cw, os.Stdout)
default:
cmd.Stdout = cw
}
cmd.Stderr = cmd.Stdout
if dmesgs {
dmesg("%v: %v", origin(1), cmd.Args)
@ -1317,12 +1575,32 @@ func isCreateArchive(s string) bool {
return false
}
func makeXParser(s string) ([]string, error) {
if !strings.HasPrefix(s, "+ ") {
func hasPlusPrefix(s string) (n int, r string) {
for strings.HasPrefix(s, "+") {
n++
s = s[1:]
}
return n, s
}
func makeXParser(s string) (r []string, err error) {
n, s := hasPlusPrefix(s)
if n == 0 {
return nil, nil
}
return shellquote.Split(s[2:])
if !strings.HasPrefix(s, " ") {
return nil, nil
}
s = s[1:]
r, err = shellquote.Split(s)
if err != nil {
if strings.Contains(err.Error(), "Unterminated single-quoted string") {
return nil, nil // ignore
}
}
return r, err
}
func straceParser(s string) ([]string, error) {
@ -1393,12 +1671,16 @@ func (it *cdbItem) ccgoArgs(cc string) (r []string, err error) {
set.Arg("o", true, func(opt, arg string) error { return nil })
set.Arg("std", true, func(opt, arg string) error { return nil })
set.Opt("MD", func(opt string) error { return nil })
set.Opt("MMD", func(opt string) error { return nil })
set.Opt("MP", func(opt string) error { return nil })
set.Opt("ansi", func(opt string) error { return nil })
set.Opt("c", func(opt string) error { return nil })
set.Opt("g", func(opt string) error { return nil })
set.Opt("pedantic", func(opt string) error { return nil })
set.Opt("pipe", func(opt string) error { return nil })
set.Opt("pthread", func(opt string) error { return nil })
set.Opt("s", func(opt string) error { return nil })
set.Opt("w", func(opt string) error { return nil })
if err := set.Parse(it.Arguments[1:], func(arg string) error {
switch {
case strings.HasSuffix(arg, ".c"):
@ -1411,7 +1693,7 @@ func (it *cdbItem) ccgoArgs(cc string) (r []string, err error) {
// nop
default:
return fmt.Errorf("unknown/unsupported option: %s", arg)
return fmt.Errorf("unknown/unsupported CC option: %s", arg)
}
return nil
@ -1470,7 +1752,7 @@ func (it *cdbItem) sources(cc, ar string) (r []string) {
return nil
}
switch it.Arguments[0] {
switch arg0 := it.Arguments[0]; arg0 {
case
"libtool",
ar,
@ -1478,8 +1760,13 @@ func (it *cdbItem) sources(cc, ar string) (r []string) {
var prev string
for _, v := range it.Arguments {
if prev != "-o" && strings.HasSuffix(v, ".o") {
r = append(r, filepath.Join(it.Directory, v))
switch prev {
case "-o", "-MT", "-MF":
// nop
default:
if strings.HasSuffix(v, ".o") {
r = append(r, filepath.Join(it.Directory, v))
}
}
prev = v
}
@ -1517,7 +1804,7 @@ func (t *Task) newCdbMakeWriter(w *cdbWriter, dir string, parser func(s string)
func (w *cdbMakeWriter) fail(err error) {
if w.err == nil {
w.err = err
w.err = fmt.Errorf("%v (%v)", err, origin(2))
}
}

View file

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build ccgo.dmesg
// +build ccgo.dmesg
package ccgo // import "modernc.org/ccgo/v3/lib"

575
vendor/modernc.org/ccgo/v3/lib/go.go generated vendored
View file

@ -6,7 +6,6 @@ package ccgo // import "modernc.org/ccgo/v3/lib"
import (
"bytes"
"encoding/binary"
"fmt"
"go/scanner"
"go/token"
@ -84,6 +83,7 @@ const (
exprSelect // foo in foo.bar
exprValue // foo in bar = foo
exprVoid //
exprGoPtr
)
const (
@ -1902,7 +1902,17 @@ func (p *project) structType(n cc.Node, t cc.Type) string {
}
}
func (p *project) padName(n *int) string {
if !p.task.exportFieldsValid {
return "_"
}
*n++
return fmt.Sprintf("%s__ccgo_pad%d", p.task.exportFields, *n)
}
func (p *project) structLiteral(n cc.Node, t cc.Type) string {
var npad int
b := bytesBufferPool.Get().(*bytes.Buffer)
defer func() { b.Reset(); bytesBufferPool.Put(b) }()
switch t.Kind() {
@ -1911,7 +1921,7 @@ func (p *project) structLiteral(n cc.Node, t cc.Type) string {
// trc("%v: %q\n%s", p.pos(n), t.Tag(), info)
b.WriteString("struct {")
if info.NeedExplicitAlign {
fmt.Fprintf(b, "_[0]uint%d;", 8*p.align(t))
fmt.Fprintf(b, "%s [0]uint%d;", p.padName(&npad), 8*p.align(t))
}
var max uintptr
for _, off := range info.Offsets {
@ -1937,7 +1947,7 @@ func (p *project) structLiteral(n cc.Node, t cc.Type) string {
case pad < 0:
continue
case pad > 0:
fmt.Fprintf(b, "_ [%d]byte;", pad)
fmt.Fprintf(b, "%s [%d]byte;", p.padName(&npad), pad)
}
switch {
case f.IsBitField():
@ -1968,7 +1978,7 @@ func (p *project) structLiteral(n cc.Node, t cc.Type) string {
}
}
if info.PaddingAfter != 0 {
fmt.Fprintf(b, "_ [%d]byte;", info.PaddingAfter)
fmt.Fprintf(b, "%s [%d]byte;", p.padName(&npad), info.PaddingAfter)
}
b.WriteByte('}')
case cc.Union:
@ -1986,7 +1996,7 @@ func (p *project) structLiteral(n cc.Node, t cc.Type) string {
al0 = f.BitFieldBlockWidth() >> 3
}
if al != uintptr(al0) {
fmt.Fprintf(b, "_ [0]uint%d;", 8*al)
fmt.Fprintf(b, "%s [0]uint%d;", p.padName(&npad), 8*al)
}
fsz := ft.Size()
switch {
@ -1998,7 +2008,7 @@ func (p *project) structLiteral(n cc.Node, t cc.Type) string {
fmt.Fprintf(b, "%s %s;", p.fieldName2(n, f), p.typ(nil, ft))
}
if pad := sz - fsz; pad != 0 {
fmt.Fprintf(b, "_ [%d]byte;", pad)
fmt.Fprintf(b, "%s [%d]byte;", p.padName(&npad), pad)
}
b.WriteByte('}')
default:
@ -3155,8 +3165,8 @@ func (p *project) declaratorValueUnion(n cc.Node, f *function, d *cc.Declarator,
p.declaratorDefault(n, d)
}
func (p *project) isVolatile(d *cc.Declarator) bool {
if d.Type().IsVolatile() {
func (p *project) isVolatileOrAtomic(d *cc.Declarator) bool {
if d.Type().IsVolatile() || d.Type().IsAtomic() {
return true
}
@ -3166,7 +3176,7 @@ func (p *project) isVolatile(d *cc.Declarator) bool {
func (p *project) declaratorDefault(n cc.Node, d *cc.Declarator) {
if x := p.tlds[d]; x != nil && d.IsStatic() {
if p.isVolatile(d) {
if p.isVolatileOrAtomic(d) {
p.atomicLoadNamedAddr(n, d.Type(), x.name)
return
}
@ -3177,7 +3187,7 @@ func (p *project) declaratorDefault(n cc.Node, d *cc.Declarator) {
switch x := p.symtab[d.Name().String()].(type) {
case *tld:
if p.isVolatile(d) {
if p.isVolatileOrAtomic(d) {
p.atomicLoadNamedAddr(n, d.Type(), x.name)
return
}
@ -3185,7 +3195,7 @@ func (p *project) declaratorDefault(n cc.Node, d *cc.Declarator) {
p.w("%s", x.name)
case *imported:
x.used = true
if p.isVolatile(d) {
if p.isVolatileOrAtomic(d) {
p.atomicLoadNamedAddr(n, d.Type(), fmt.Sprintf("%sX%s", x.qualifier, d.Name()))
return
}
@ -3215,6 +3225,31 @@ func (p *project) declaratorDefault(n cc.Node, d *cc.Declarator) {
return
}
if !d.IsImplicit() {
nm := d.Name()
name := nm.String()
switch d.Linkage {
case cc.External:
name = p.task.exportExterns + name
tld := &tld{name: name}
p.externs[nm] = tld
p.w("%s", name)
return
case cc.Internal:
if token.IsExported(name) {
name = "s" + name
}
tld := &tld{name: p.scope.take(cc.String(name))}
for _, v := range p.ast.Scope[nm] {
if d, ok := v.(*cc.Declarator); ok {
p.tlds[d] = tld
}
}
p.w("%s", name)
return
}
}
p.err(n, "back-end: undefined: %s", d.Name())
}
}
@ -3245,7 +3280,7 @@ func (p *project) declaratorValueNormal(n cc.Node, f *function, d *cc.Declarator
if f != nil {
if local := f.locals[d]; local != nil {
if local.isPinned {
if p.isVolatile(d) {
if p.isVolatileOrAtomic(d) && d.IsParameter && d.Write != 0 {
p.w("%sAtomicLoadP%s(%s%s/* %s */)", p.task.crt, p.helperType(n, d.Type()), f.bpName, nonZeroUintptr(local.off), local.name)
return
}
@ -3254,7 +3289,7 @@ func (p *project) declaratorValueNormal(n cc.Node, f *function, d *cc.Declarator
return
}
if p.isVolatile(d) {
if p.isVolatileOrAtomic(d) && d.IsParameter && d.Write != 0 {
p.atomicLoadNamedAddr(n, d.Type(), local.name)
return
}
@ -3376,7 +3411,7 @@ func (p *project) declaratorLValueArray(n cc.Node, f *function, d *cc.Declarator
}
func (p *project) declaratorLValueNormal(n cc.Node, f *function, d *cc.Declarator, t cc.Type, mode exprMode, flags flags) {
if p.isVolatile(d) {
if p.isVolatileOrAtomic(d) {
panic(todo("", n.Position(), d.Position()))
}
@ -3420,6 +3455,7 @@ func (p *project) declaratorLValueDefault(n cc.Node, d *cc.Declarator) {
}
}
}
panic(todo("%v: %v: %q", n.Position(), p.pos(d), d.Name()))
}
}
@ -3643,6 +3679,7 @@ func (p *project) declaratorAddrOfArray(n cc.Node, f *function, d *cc.Declarator
}
func (p *project) convertType(n cc.Node, from, to cc.Type, flags flags) string {
// trc("%v: %v: %v -> %v %v", n.Position(), origin(1), from, to, flags) //TODO- DBG
if from != nil {
switch from.Kind() {
case cc.Int128:
@ -3907,6 +3944,10 @@ func (p *project) convert(n cc.Node, op cc.Operand, to cc.Type, flags flags) str
return p.convertInt(n, op, to, flags)
}
if from == to {
return ""
}
switch from.Kind() {
case cc.Ptr:
if !force && from.Kind() == to.Kind() {
@ -3918,16 +3959,27 @@ func (p *project) convert(n cc.Node, op cc.Operand, to cc.Type, flags flags) str
return ")"
}
panic(todo("%v: %q -> %q", p.pos(n), from, to))
if to.Kind() == cc.Ptr {
return ""
}
panic(todo("%v: force %v, %q %v -> %q %v", p.pos(n), force, from, from.Kind(), to, to.Kind()))
case cc.Function, cc.Struct, cc.Union:
if !force && from.Kind() == to.Kind() {
return ""
}
panic(todo("%q -> %q", from, to))
trc("%p %p", from, to)
panic(todo("%q %v -> %q %v", from, from.Kind(), to, to.Kind()))
case cc.Double, cc.Float:
p.w("%s(", p.typ(n, to))
return ")"
switch {
case to.IsIntegerType():
p.w("%s(", p.helperType2(n, from, to))
return ")"
default:
p.w("%s(", p.typ(n, to))
return ")"
}
case cc.Array:
if from.Kind() == to.Kind() {
return ""
@ -5080,7 +5132,7 @@ func (p *project) assignmentExpressionValueAddrOf(f *function, n *cc.AssignmentE
lhs := n.UnaryExpression
switch k := p.opKind(f, lhs, lhs.Operand.Type()); k {
case opStruct:
case opStruct, opUnion:
p.assignmentExpressionValueAssignStructAddrof(f, n, n.Operand.Type(), mode, flags)
default:
panic(todo("", n.Position(), k))
@ -5098,10 +5150,19 @@ func (p *project) assignmentExpressionValueAssignStructAddrof(f *function, n *cc
if d := n.UnaryExpression.Declarator(); d != nil {
if local := f.locals[d]; local != nil {
if local.isPinned {
panic(todo("", p.pos(n)))
if !p.pass1 {
p.w("%sXmemmove(tls, ", p.task.crt)
p.unaryExpression(f, n.UnaryExpression, lhs, exprAddrOf, flags|fOutermost)
p.w(", ")
p.assignmentExpression(f, n.AssignmentExpression, rhs, exprAddrOf, flags|fOutermost)
p.w(", %d)", lhs.Size())
return
}
}
panic(todo("", p.pos(n)))
if !p.pass1 {
panic(todo("", p.pos(n)))
}
}
}
@ -5185,30 +5246,11 @@ func (p *project) assignmentExpressionValueAssignBitfield(f *function, n *cc.Ass
lt := lhs.Operand.Type()
bf := lt.BitField()
defer p.w("%s", p.convertType(n, lt, t, flags))
switch {
case bf.Type().IsSignedType():
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
p.todo(n, t)
break
}
p.w("%sAssignBitFieldPtr%d%s(", p.task.crt, bf.BitFieldBlockWidth(), p.bfHelperType(lt))
p.unaryExpression(f, lhs, lt, exprAddrOf, flags)
p.w(", ")
p.assignmentExpression(f, n.AssignmentExpression, lt, exprValue, flags|fOutermost)
p.w(", %d, %d, %#x)", bf.BitFieldWidth(), bf.BitFieldOffset(), bf.Mask())
default:
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
p.todo(n, t)
break
}
p.w("%sAssignBitFieldPtr%d%s(", p.task.crt, bf.BitFieldBlockWidth(), p.bfHelperType(lt))
p.unaryExpression(f, lhs, lt, exprAddrOf, flags)
p.w(", ")
p.assignmentExpression(f, n.AssignmentExpression, lt, exprValue, flags|fOutermost)
p.w(", %d, %d, %#x)", bf.BitFieldWidth(), bf.BitFieldOffset(), bf.Mask())
}
p.w("%sAssignBitFieldPtr%d%s(", p.task.crt, bf.BitFieldBlockWidth(), p.bfHelperType(lt))
p.unaryExpression(f, lhs, lt, exprAddrOf, flags)
p.w(", ")
p.assignmentExpression(f, n.AssignmentExpression, lt, exprValue, flags|fOutermost)
p.w(", %d, %d, %#x)", bf.BitFieldWidth(), bf.BitFieldOffset(), bf.Mask())
}
func (p *project) assignmentExpressionValueAssignNormal(f *function, n *cc.AssignmentExpression, t cc.Type, mode exprMode, flags flags) {
@ -5268,7 +5310,7 @@ func (p *project) assignmentExpressionVoid(f *function, n *cc.AssignmentExpressi
p.assignmentExpression(f, n.AssignmentExpression, lt, exprCondInit, flags|fOutermost)
p.w(";")
default:
if d != nil && p.isVolatile(d) {
if d != nil && p.isVolatileOrAtomic(d) {
p.setVolatileDeclarator(d, f, n.AssignmentExpression, lt, mode, flags|fOutermost)
return
}
@ -5278,11 +5320,6 @@ func (p *project) assignmentExpressionVoid(f *function, n *cc.AssignmentExpressi
p.assignmentExpression(f, n.AssignmentExpression, lt, mode, flags|fOutermost)
}
case opBitfield:
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
panic(todo("", n.Position()))
break
}
bf := lt.BitField()
p.w("%sSetBitFieldPtr%d%s(", p.task.crt, bf.BitFieldBlockWidth(), p.bfHelperType(lt))
p.unaryExpression(f, lhs, lt, exprAddrOf, flags)
@ -5561,7 +5598,34 @@ func (p *project) conditionalExpressionFunc(f *function, n *cc.ConditionalExpres
case cc.ConditionalExpressionLOr: // LogicalOrExpression
p.logicalOrExpression(f, n.LogicalOrExpression, t, mode, flags)
case cc.ConditionalExpressionCond: // LogicalOrExpression '?' Expression ':' ConditionalExpression
panic(todo("", p.pos(n)))
switch ot := n.Operand.Type(); ot.Kind() {
case cc.Function:
if t.Kind() != cc.Function {
panic(todo("", n.Position()))
}
default:
panic(todo("", ot.Kind()))
}
p.w(" func() ")
p.functionSignature(f, t, "")
p.w("{ if ")
p.logicalOrExpression(f, n.LogicalOrExpression, n.LogicalOrExpression.Operand.Type(), exprBool, flags|fOutermost)
p.w(" { return ")
switch d := n.Expression.Declarator(); {
case d != nil:
p.declaratorDefault(n, d)
default:
panic(todo("", n.Position()))
}
p.w("}; return ")
switch d := n.ConditionalExpression.Declarator(); {
case d != nil:
p.declaratorDefault(n, d)
default:
panic(todo("", n.Position()))
}
p.w("}()")
default:
panic(todo("%v: internal error: %v", n.Position(), n.Case))
}
@ -7129,16 +7193,11 @@ func (p *project) binaryShiftExpressionBool(f *function, n *cc.ShiftExpression,
defer p.w("%s", p.artithmeticBinaryExpression(n, n.Operand, n.Operand.Type(), &mode, flags))
switch {
case n.ShiftExpression.Operand.Type().IsBitFieldType():
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
p.todo(n, t)
return
}
p.w("(")
p.shiftExpression(f, n.ShiftExpression, n.Operand.Type(), exprValue, flags)
p.w(" %s%s", oper, tidyComment(" ", &n.Token))
p.additiveExpression(f, n.AdditiveExpression, n.Promote(), exprValue, flags)
p.w(")&%#x", n.ShiftExpression.Operand.Type().BitField().Mask())
p.w(")&%#x", bfValueMask(n.ShiftExpression.Operand.Type().BitField()))
case shiftOverflows(n, n.ShiftExpression.Operand, n.AdditiveExpression.Operand, oper, n.Operand.Type()):
p.shiftExpression(f, n.ShiftExpression, n.Operand.Type(), exprValue, flags|fForceRuntimeConv)
p.w(" %s%s", oper, tidyComment(" ", &n.Token))
@ -7166,6 +7225,10 @@ func shiftOp(s string) string {
}
}
func bfValueMask(bf cc.Field) uint64 {
return uint64(1)<<bf.BitFieldWidth() - 1
}
func (p *project) binaryShiftExpressionValue(f *function, n *cc.ShiftExpression, oper string, t cc.Type, mode exprMode, flags flags) {
// ShiftExpression "<<" AdditiveExpression
flags &^= fOutermost
@ -7178,16 +7241,11 @@ func (p *project) binaryShiftExpressionValue(f *function, n *cc.ShiftExpression,
p.additiveExpression(f, n.AdditiveExpression, p.intType, exprValue, flags|fOutermost)
p.w(")")
case n.ShiftExpression.Operand.Type().IsBitFieldType():
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
p.todo(n, t)
return
}
p.w("(")
p.shiftExpression(f, n.ShiftExpression, n.Operand.Type(), exprValue, flags)
p.w(" %s%s", oper, tidyComment(" ", &n.Token))
p.additiveExpression(f, n.AdditiveExpression, n.Promote(), exprValue, flags)
p.w(")&%#x", n.ShiftExpression.Operand.Type().BitField().Mask())
p.w(")&%#x", bfValueMask(n.ShiftExpression.Operand.Type().BitField()))
case shiftOverflows(n, n.ShiftExpression.Operand, n.AdditiveExpression.Operand, oper, n.Operand.Type()):
p.shiftExpression(f, n.ShiftExpression, n.Operand.Type(), exprValue, flags|fForceRuntimeConv)
p.w(" %s%s", oper, tidyComment(" ", &n.Token))
@ -8174,7 +8232,7 @@ func (p *project) castExpressionValueNormal(f *function, n *cc.CastExpression, t
case cc.Void:
p.castExpression(f, n.CastExpression, tn, exprVoid, flags)
default:
panic(todo("", n.Position(), t, t.Kind()))
panic(todo("%s: %s %s -> %s %s -> %s %s", n.Position(), op.Type(), op.Type().Kind(), tn, tn.Kind(), t, t.Kind()))
}
}
}
@ -8268,6 +8326,10 @@ func (p *project) unaryExpressionSelect(f *function, n *cc.UnaryExpression, t cc
default:
panic(todo("", p.pos(n), et, et.Kind()))
}
case cc.Array:
p.w("(*(*%s)(unsafe.Pointer(", p.typ(n, n.Operand.Type()))
p.castExpression(f, n.CastExpression, n.CastExpression.Operand.Type(), exprAddrOf, flags)
p.w(")))")
default:
panic(todo("", p.pos(n), ot, ot.Kind()))
}
@ -8318,11 +8380,8 @@ func (p *project) unaryExpressionFunc(f *function, n *cc.UnaryExpression, t cc.T
case cc.Ptr:
switch et2 := et.Elem(); et2.Kind() {
case cc.Function:
p.w("(**(**")
p.functionSignature(f, et2, "")
p.w(")(unsafe.Pointer(")
p.castExpression(f, n.CastExpression, ot, exprAddrOf, flags|fAddrOfFuncPtrOk)
p.w(")))")
// C: (**)()
p.fnVal(n, f, func() { p.castExpression(f, n.CastExpression, p.ptrType, exprValue, flags|fAddrOfFuncPtrOk) }, n.CastExpression.Declarator(), n.CastExpression.Operand.Type(), 1, mode, flags)
default:
panic(todo("", p.pos(n), et2, et2.Kind()))
}
@ -8580,6 +8639,8 @@ func (p *project) unaryExpressionValue(f *function, n *cc.UnaryExpression, t cc.
et.Kind() == cc.Union:
p.unaryExpressionDeref(f, n, t, mode, flags)
case et.Kind() == cc.Function:
p.castExpression(f, n.CastExpression, t, mode, flags)
default:
panic(todo("", p.pos(n), et, et.Kind()))
}
@ -8908,7 +8969,7 @@ func (p *project) unaryExpressionPreIncDecVoidArrayParameter(f *function, n *cc.
func (p *project) unaryExpressionPreIncDecVoidNormal(f *function, n *cc.UnaryExpression, oper, oper2 string, t cc.Type, mode exprMode, flags flags) {
// "++" UnaryExpression etc.
ut := n.UnaryExpression.Operand.Type()
if d := n.UnaryExpression.Declarator(); d != nil && p.isVolatile(d) {
if d := n.UnaryExpression.Declarator(); d != nil && p.isVolatileOrAtomic(d) {
x := "Dec"
if oper == "++" {
x = "Inc"
@ -9180,6 +9241,7 @@ func (p *project) postfixExpressionBool(f *function, n *cc.PostfixExpression, t
}
func (p *project) postfixExpressionPSelect(f *function, n *cc.PostfixExpression, t cc.Type, mode exprMode, flags flags) {
// PostfixExpression "->" IDENTIFIER
switch n.Case {
case cc.PostfixExpressionPrimary: // PrimaryExpression
p.primaryExpression(f, n.PrimaryExpression, t, mode, flags)
@ -9422,9 +9484,27 @@ func (p *project) postfixExpressionSelectPSelectStruct(f *function, n *cc.Postfi
}
pe := n.PostfixExpression.Operand.Type()
defer p.w("%s", p.convert(n, n.Operand, t, flags))
p.w("(*%s)(unsafe.Pointer(", p.typ(n, pe.Elem()))
p.postfixExpression(f, n.PostfixExpression, pe, exprValue, flags)
p.w(")).%s", p.fieldName(n, n.Token2.Value))
et := n.PostfixExpression.Operand.Type().Elem()
fld, path, ok := et.FieldByName2(n.Token2.Value)
switch {
case !ok:
panic(todo("", n.Token.Position()))
case fld.InUnion():
p.w("(*(*%s)(unsafe.Pointer(", p.typ(n, n.Operand.Type()))
p.postfixExpression(f, n.PostfixExpression, pe, exprValue, flags)
p.w("%s)))", nonZeroUintptr(pathOff(et, path)))
case len(path) != 1:
panic(todo("", n.Token.Position()))
default:
p.w("(*%s)(unsafe.Pointer(", p.typ(n, pe.Elem()))
switch {
case pe.Kind() == cc.Array:
p.postfixExpression(f, n.PostfixExpression, pe, exprAddrOf, flags)
default:
p.postfixExpression(f, n.PostfixExpression, pe, exprValue, flags)
}
p.w(")).%s", p.fieldName(n, n.Token2.Value))
}
}
}
@ -9570,13 +9650,32 @@ func (p *project) postfixExpressionAddrOf(f *function, n *cc.PostfixExpression,
case cc.PostfixExpressionIndex: // PostfixExpression '[' Expression ']'
p.postfixExpressionAddrOfIndex(f, n, t, mode, flags)
case cc.PostfixExpressionCall: // PostfixExpression '(' ArgumentExpressionList ')'
panic(todo("", p.pos(n)))
ot := n.Operand.Type()
switch ot.Kind() {
case cc.Struct, cc.Union:
// ok
default:
p.err(n, "cannot take address of value of type %v", n.Operand.Type())
return
}
if p.pass1 {
off := roundup(f.off, uintptr(ot.Align()))
f.complits[n] = off
f.off += ot.Size()
return
}
off := f.complits[n]
p.w("func() uintptr { *(*%s)(unsafe.Pointer(%s%s)) = ", p.typ(n, ot), f.bpName, nonZeroUintptr(off))
p.postfixExpressionValue(f, n, ot, exprValue, flags)
p.w("; return %s%s }()", f.bpName, nonZeroUintptr(off))
case cc.PostfixExpressionSelect: // PostfixExpression '.' IDENTIFIER
p.postfixExpressionAddrOfSelect(f, n, t, mode, flags)
case cc.PostfixExpressionPSelect: // PostfixExpression "->" IDENTIFIER
p.postfixExpressionAddrOfPSelect(f, n, t, mode, flags)
case cc.PostfixExpressionInc: // PostfixExpression "++"
panic(todo("", p.pos(n)))
p.postfixExpressionIncDec(f, n, "++", "+=", t, exprLValue, flags)
case cc.PostfixExpressionDec: // PostfixExpression "--"
panic(todo("", p.pos(n)))
case cc.PostfixExpressionComplit: // '(' TypeName ')' '{' InitializerList ',' '}'
@ -9734,11 +9833,7 @@ func (p *project) postfixExpressionFunc(f *function, n *cc.PostfixExpression, t
case cc.Ptr:
switch et := n.Operand.Type().Elem(); et.Kind() {
case cc.Function:
p.w("(*(*")
p.functionSignature(f, n.Operand.Type().Elem(), "")
p.w(")(unsafe.Pointer(")
p.postfixExpression(f, n, n.Operand.Type(), exprAddrOf, flags)
p.w(")))")
p.fnVal(n, f, func() { p.postfixExpression(f, n, p.ptrType, exprValue, flags) }, nil, n.Operand.Type(), 0, mode, flags)
default:
panic(todo("", p.pos(n), et, et.Kind()))
}
@ -9749,26 +9844,7 @@ func (p *project) postfixExpressionFunc(f *function, n *cc.PostfixExpression, t
panic(todo("", n.Position(), n.Operand.Type()))
}
case cc.PostfixExpressionPSelect: // PostfixExpression "->" IDENTIFIER
switch n.Operand.Type().Kind() {
case cc.Ptr:
switch n.Operand.Type().Kind() {
case cc.Ptr:
switch et := n.Operand.Type().Elem(); et.Kind() {
case cc.Function:
p.w("(*(*")
p.functionSignature(f, n.Operand.Type().Elem(), "")
p.w(")(unsafe.Pointer(")
p.postfixExpression(f, n, n.Operand.Type(), exprAddrOf, flags)
p.w(")))")
default:
panic(todo("", p.pos(n), et, et.Kind()))
}
default:
panic(todo("", p.pos(n), n.Operand.Type(), n.Operand.Type().Kind()))
}
default:
panic(todo("", n.Position(), n.Operand.Type()))
}
p.fnVal(n, f, func() { p.postfixExpression(f, n, p.ptrType, exprValue, flags) }, nil, n.Operand.Type(), 0, mode, flags)
case cc.PostfixExpressionInc: // PostfixExpression "++"
panic(todo("", p.pos(n)))
case cc.PostfixExpressionDec: // PostfixExpression "--"
@ -9804,7 +9880,30 @@ func (p *project) postfixExpressionVoid(f *function, n *cc.PostfixExpression, t
case cc.PostfixExpressionDec: // PostfixExpression "--"
p.postfixExpressionIncDec(f, n, "--", "-=", t, mode, flags)
case cc.PostfixExpressionComplit: // '(' TypeName ')' '{' InitializerList ',' '}'
panic(todo("", p.pos(n)))
tn := n.TypeName.Type()
switch tn.Decay().Kind() {
case cc.Ptr:
switch tn.Kind() {
case cc.Array:
switch {
case p.pass1:
off := roundup(f.off, uintptr(tn.Elem().Align()))
f.complits[n] = off
f.off += tn.Size()
default:
off := f.complits[n]
p.w("*(*%s)(unsafe.Pointer(%s%s)) = ", p.typ(n, tn), f.bpName, nonZeroUintptr(off))
p.initializer(f, &cc.Initializer{Case: cc.InitializerInitList, InitializerList: n.InitializerList}, tn, cc.Automatic, nil)
}
return
default:
panic(todo("%v: %v", n.Position(), tn))
}
}
defer p.w("%s", p.convertType(n, tn, t, flags))
p.w("_ = ")
p.initializer(f, &cc.Initializer{Case: cc.InitializerInitList, InitializerList: n.InitializerList}, tn, cc.Automatic, nil)
case cc.PostfixExpressionTypeCmp: // "__builtin_types_compatible_p" '(' TypeName ',' TypeName ')'
panic(todo("", p.pos(n)))
case cc.PostfixExpressionChooseExpr:
@ -9903,6 +10002,39 @@ func (p *project) postfixExpressionValue(f *function, n *cc.PostfixExpression, t
// Note: This construct is only available for C.
p.w(" %d ", n.Operand.Value())
case cc.PostfixExpressionChooseExpr: // "__builtin_choose_expr" '(' AssignmentExpression ',' AssignmentExpression ',' AssignmentExpression ')'
// You can use the built-in function __builtin_choose_expr to evaluate code
// depending on the value of a constant expression. This built-in function
// returns exp1 if const_exp, which is an integer constant expression, is
// nonzero. Otherwise it returns exp2.
//
// This built-in function is analogous to the ? : operator in C, except that
// the expression returned has its type unaltered by promotion rules. Also, the
// built-in function does not evaluate the expression that is not chosen. For
// example, if const_exp evaluates to true, exp2 is not evaluated even if it
// has side effects.
//
// This built-in function can return an lvalue if the chosen argument is an
// lvalue.
//
// If exp1 is returned, the return type is the same as exp1s type. Similarly,
// if exp2 is returned, its return type is the same as exp2.
//
// Example:
//
// #define foo(x) \
// __builtin_choose_expr ( \
// __builtin_types_compatible_p (typeof (x), double), \
// foo_double (x), \
// __builtin_choose_expr ( \
// __builtin_types_compatible_p (typeof (x), float), \
// foo_float (x), \
// /* The void expression results in a compile-time error \
// when assigning the result to something. */ \
// (void)0))
//
// Note: This construct is only available for C. Furthermore, the unused
// expression (exp1 or exp2 depending on the value of const_exp) may still
// generate syntax errors. This may change in future revisions.
switch op := n.AssignmentExpression.Operand; {
case op.IsNonZero():
p.assignmentExpression(f, n.AssignmentExpression2, t, mode, flags)
@ -9965,11 +10097,6 @@ func (p *project) postfixExpressionValuePSelectStruct(f *function, n *cc.Postfix
defer p.w("%s", p.convertType(n, fld.Promote(), t, flags))
switch pe.Kind() {
case cc.Array:
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
p.todo(n, t)
return
}
x := p.convertType(n, nil, fld.Promote(), flags)
p.w("*(*uint%d)(unsafe.Pointer(", fld.BitFieldBlockWidth())
p.postfixExpression(f, n.PostfixExpression, pe, exprDecay, flags)
@ -9981,18 +10108,6 @@ func (p *project) postfixExpressionValuePSelectStruct(f *function, n *cc.Postfix
p.w("<<%d>>%[1]d", int(fld.Promote().Size()*8)-fld.BitFieldWidth())
}
default:
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
x := p.convertType(n, nil, fld.Promote(), flags)
p.w("*(*uint%d)(unsafe.Pointer(", fld.BitFieldBlockWidth())
p.postfixExpression(f, n.PostfixExpression, pe, exprValue, flags)
p.bitFldOff(pe.Elem(), n.Token2)
p.w("))>>%d&%#x%s", fld.BitFieldBlockWidth()-fld.BitFieldOffset()-fld.BitFieldWidth(), uint64(1)<<fld.BitFieldWidth()-1, x)
if fld.Type().IsSignedType() {
p.w("<<%d>>%[1]d", int(fld.Promote().Size()*8)-fld.BitFieldWidth())
}
break
}
x := p.convertType(n, nil, fld.Promote(), flags)
p.w("*(*uint%d)(unsafe.Pointer(", fld.BitFieldBlockWidth())
p.postfixExpression(f, n.PostfixExpression, pe, exprValue, flags)
@ -10015,12 +10130,35 @@ func (p *project) postfixExpressionValuePSelectStruct(f *function, n *cc.Postfix
p.err(&n.Token2, "internal error, wrong function for accessing a bit field: %s", n.Token2.Value)
}
defer p.w("%s", p.convert(n, n.Operand, t, flags))
p.w("(*%s)(unsafe.Pointer(", p.typ(n, pe.Elem()))
p.postfixExpression(f, n.PostfixExpression, pe, exprValue, flags)
p.w(")).%s", p.fieldName(n, n.Token2.Value))
et := pe.Elem()
fld, path, ok := et.FieldByName2(n.Token2.Value)
switch {
case !ok:
panic(todo(""))
case fld.InUnion():
p.w("*(*%s)(unsafe.Pointer(", p.typ(n, n.Operand.Type()))
p.postfixExpression(f, n.PostfixExpression, pe, exprValue, flags)
p.w("%s))", nonZeroUintptr(pathOff(et, path)))
case len(path) != 1:
panic(todo(""))
default:
p.w("(*%s)(unsafe.Pointer(", p.typ(n, pe.Elem()))
p.postfixExpression(f, n.PostfixExpression, pe, exprValue, flags)
p.w(")).%s", p.fieldName(n, n.Token2.Value))
}
}
}
func pathOff(t cc.Type, path []int) (r uintptr) {
for len(path) != 0 {
f := t.FieldByIndex(path[:1])
r += f.Offset()
path = path[1:]
t = f.Type()
}
return r
}
func (p *project) postfixExpressionValueIndex(f *function, n *cc.PostfixExpression, t cc.Type, mode exprMode, flags flags) {
// PostfixExpression '[' Expression ']'
switch k := p.opKind(f, n.PostfixExpression, n.PostfixExpression.Operand.Type()); k {
@ -10154,16 +10292,8 @@ func (p *project) postfixExpressionValueSelectUnion(f *function, n *cc.PostfixEx
// PostfixExpression '.' IDENTIFIER
pe := n.PostfixExpression.Operand.Type()
fld := n.Field
if fld.Offset() != 0 {
p.err(&n.Token2, "internal error, union field with non-zero offset: %s %v", n.Token2.Value, fld.Offset())
}
switch {
case n.Operand.Type().IsBitFieldType():
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
p.todo(n, t)
return
}
p.w("(")
defer p.w("%s)", p.convertType(n, fld.Promote(), t, flags))
x := p.convertType(n, nil, fld.Promote(), flags)
@ -10193,20 +10323,6 @@ func (p *project) postfixExpressionValueSelectStruct(f *function, n *cc.PostfixE
fld := n.Field
switch {
case n.Operand.Type().IsBitFieldType():
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
p.w("(")
defer p.w("%s)", p.convertType(n, fld.Promote(), t, flags))
x := p.convertType(n, nil, fld.Promote(), flags)
p.w("*(*uint%d)(unsafe.Pointer(", fld.BitFieldBlockWidth())
p.postfixExpression(f, n.PostfixExpression, pe, exprAddrOf, flags)
p.bitFldOff(pe, n.Token2)
p.w("))>>%d&%#x%s", fld.BitFieldBlockWidth()-fld.BitFieldOffset()-fld.BitFieldWidth(), uint64(1)<<fld.BitFieldWidth()-1, x)
if fld.Type().IsSignedType() {
p.w("<<%d>>%[1]d", int(fld.Promote().Size()*8)-fld.BitFieldWidth())
}
break
}
p.w("(")
defer p.w("%s)", p.convertType(n, fld.Promote(), t, flags))
x := p.convertType(n, nil, fld.Promote(), flags)
@ -10509,10 +10625,6 @@ func (p *project) postfixExpressionIncDecValueArrayParameter(f *function, n *cc.
}
func (p *project) postfixExpressionIncDecValueBitfield(f *function, n *cc.PostfixExpression, oper, oper2 string, t cc.Type, mode exprMode, flags flags) {
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
panic(todo("", n.Position()))
}
// PostfixExpression "++"
pe := n.PostfixExpression.Operand.Type()
defer p.w("%s", p.convert(n, n.PostfixExpression.Operand, t, flags))
@ -10534,7 +10646,7 @@ func (p *project) postfixExpressionIncDecValueNormal(f *function, n *cc.PostfixE
if oper == "++" {
x = "Inc"
}
if d := n.PostfixExpression.Declarator(); d != nil && p.isVolatile(d) {
if d := n.PostfixExpression.Declarator(); d != nil && p.isVolatileOrAtomic(d) {
p.w("%sPost%sAtomic%s(&", p.task.crt, x, p.helperType(n, pe))
var local *local
var tld *tld
@ -10594,7 +10706,7 @@ func (p *project) postfixExpressionIncDecVoid(f *function, n *cc.PostfixExpressi
}
func (p *project) postfixExpressionIncDecVoidNormal(f *function, n *cc.PostfixExpression, oper, oper2 string, t cc.Type, mode exprMode, flags flags) {
if d := n.PostfixExpression.Declarator(); d != nil && p.isVolatile(d) {
if d := n.PostfixExpression.Declarator(); d != nil && p.isVolatileOrAtomic(d) {
switch d.Type().Size() {
case 4, 8:
if !d.Type().IsIntegerType() {
@ -10750,8 +10862,12 @@ func (p *project) postfixExpressionCallBool(f *function, n *cc.PostfixExpression
}
}
var va uintptr
if f != nil {
va = f.vaLists[n]
}
p.postfixExpression(f, n.PostfixExpression, n.PostfixExpression.Operand.Type(), exprFunc, flags&^fOutermost)
p.argumentExpressionList(f, n.PostfixExpression, n.ArgumentExpressionList, f.vaLists[n])
p.argumentExpressionList(f, n.PostfixExpression, n.ArgumentExpressionList, va)
}
func (p *project) postfixExpressionCallValue(f *function, n *cc.PostfixExpression, t cc.Type, mode exprMode, flags flags) {
@ -10796,8 +10912,12 @@ func (p *project) postfixExpressionCallValue(f *function, n *cc.PostfixExpressio
return
}
}
var va uintptr
if f != nil {
va = f.vaLists[n]
}
p.postfixExpression(f, n.PostfixExpression, n.PostfixExpression.Operand.Type(), exprFunc, flags&^fOutermost)
p.argumentExpressionList(f, n.PostfixExpression, n.ArgumentExpressionList, f.vaLists[n])
p.argumentExpressionList(f, n.PostfixExpression, n.ArgumentExpressionList, va)
}
// bool __builtin_mul_overflow (type1 a, type2 b, type3 *res)
@ -10991,8 +11111,12 @@ func (p *project) postfixExpressionCallVoid(f *function, n *cc.PostfixExpression
return
}
}
var va uintptr
if f != nil {
va = f.vaLists[n]
}
p.postfixExpression(f, n.PostfixExpression, n.PostfixExpression.Operand.Type(), exprFunc, flags&^fOutermost)
p.argumentExpressionList(f, n.PostfixExpression, n.ArgumentExpressionList, f.vaLists[n])
p.argumentExpressionList(f, n.PostfixExpression, n.ArgumentExpressionList, va)
}
// void __atomic_store_n (type *ptr, type val, int memorder)
@ -11057,7 +11181,12 @@ func (p *project) argList(n *cc.ArgumentExpressionList) (r []*cc.AssignmentExpre
}
func (p *project) argumentExpressionList(f *function, pe *cc.PostfixExpression, n *cc.ArgumentExpressionList, bpOff uintptr) {
p.w("(%s", f.tlsName)
switch {
case f == nil:
p.w("(nil")
default:
p.w("(%s", f.tlsName)
}
ft := funcType(pe.Operand.Type())
isVariadic := ft.IsVariadic()
params := ft.Parameters()
@ -11368,7 +11497,7 @@ func (p *project) primaryExpressionBool(f *function, n *cc.PrimaryExpression, t
case cc.PrimaryExpressionChar: // CHARCONST
panic(todo("", p.pos(n)))
case cc.PrimaryExpressionLChar: // LONGCHARCONST
panic(todo("", p.pos(n)))
p.charConst(n, n.Token.Src.String(), n.Operand, t, flags)
case cc.PrimaryExpressionString: // STRINGLITERAL
p.w(" 1 ")
case cc.PrimaryExpressionLString: // LONGSTRINGLITERAL
@ -11478,7 +11607,7 @@ func (p *project) primaryExpressionAddrOf(f *function, n *cc.PrimaryExpression,
case cc.PrimaryExpressionString: // STRINGLITERAL
p.w("%s", p.stringLiteral(n.Operand.Value()))
case cc.PrimaryExpressionLString: // LONGSTRINGLITERAL
panic(todo("", p.pos(n)))
p.w("%s", p.wideStringLiteral(n.Operand.Value(), 0))
case cc.PrimaryExpressionExpr: // '(' Expression ')'
p.expression(f, n.Expression, t, mode, flags)
case cc.PrimaryExpressionStmt: // '(' CompoundStatement ')'
@ -11491,28 +11620,7 @@ func (p *project) primaryExpressionAddrOf(f *function, n *cc.PrimaryExpression,
func (p *project) primaryExpressionFunc(f *function, n *cc.PrimaryExpression, t cc.Type, mode exprMode, flags flags) {
switch n.Case {
case cc.PrimaryExpressionIdent: // IDENTIFIER
switch d := n.Declarator(); {
case d != nil:
switch d.Type().Kind() {
case cc.Function:
p.declarator(n, f, d, t, mode, flags)
case cc.Ptr:
switch et := d.Type().Elem(); et.Kind() {
case cc.Function:
p.w("(*(*")
p.functionSignature(f, et, "")
p.w(")(unsafe.Pointer(&")
p.primaryExpression(f, n, n.Operand.Type(), exprValue, flags)
p.w(")))")
default:
panic(todo("", p.pos(n), p.pos(d), d.Type(), d.Type().Kind()))
}
default:
panic(todo("", p.pos(n), p.pos(d), d.Type(), d.Type().Kind()))
}
default:
panic(todo("", p.pos(n)))
}
p.fnVal(n, f, func() { p.primaryExpression(f, n, n.Operand.Type(), exprValue, flags) }, n.Declarator(), n.Operand.Type(), 0, mode, flags)
case cc.PrimaryExpressionInt: // INTCONST
panic(todo("", p.pos(n)))
case cc.PrimaryExpressionFloat: // FLOATCONST
@ -11725,6 +11833,7 @@ func (p *project) charConst(n cc.Node, src string, op cc.Operand, to cc.Type, fl
defer p.w("%s", p.convert(n, op, to, flags))
case to.Kind() == cc.Ptr && op.IsZero():
p.w(" 0 ")
return
default:
panic(todo("%v: t %v, to %v, to.Alias() %v", n.Position(), op.Type(), to, to.Alias()))
}
@ -12066,10 +12175,6 @@ func (p *project) assignOpValueBitfield(f *function, n *cc.AssignmentExpression,
panic(todo(""))
}
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
panic(todo("", n.Position()))
}
ot := n.Operand.Type()
lhs := n.UnaryExpression
bf := lhs.Operand.Type().BitField()
@ -12099,10 +12204,6 @@ func (p *project) assignOpValueBitfield(f *function, n *cc.AssignmentExpression,
}
func (p *project) readBitfield(n cc.Node, ptr string, bf cc.Field, promote cc.Type) {
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
panic(todo("", n.Position()))
}
bw := bf.BitFieldBlockWidth()
m := bf.Mask()
o := bf.BitFieldOffset()
@ -12234,10 +12335,6 @@ func (p *project) assignOpVoidArrayParameter(f *function, n *cc.AssignmentExpres
}
func (p *project) assignOpVoidBitfield(f *function, n *cc.AssignmentExpression, t cc.Type, oper, oper2 string, mode exprMode, flags flags) {
if p.task.cfg.ABI.ByteOrder == binary.BigEndian {
panic(todo("", n.Position()))
}
// UnaryExpression "*=" AssignmentExpression etc.
lhs := n.UnaryExpression
lt := lhs.Operand.Type()
@ -12277,7 +12374,7 @@ func (p *project) assignOpVoidNormal(f *function, n *cc.AssignmentExpression, t
rop := n.AssignmentExpression.Operand
if d := n.UnaryExpression.Declarator(); d != nil {
if local := f.locals[d]; local != nil && local.isPinned {
if p.isVolatile(d) {
if p.isVolatileOrAtomic(d) {
panic(todo(""))
}
@ -12301,7 +12398,7 @@ func (p *project) assignOpVoidNormal(f *function, n *cc.AssignmentExpression, t
return
}
if p.isVolatile(d) {
if p.isVolatileOrAtomic(d) {
var local *local
var tld *tld
var nm string
@ -12539,32 +12636,38 @@ func (p *project) iterationStatement(f *function, n *cc.IterationStatement) {
}
p.statement(f, n.Statement, true, false, false, 0)
case cc.IterationStatementForDecl: // "for" '(' Declaration Expression ';' Expression ')' Statement
if f.hasJumps {
panic(todo("", p.pos(n)))
}
var ids []*cc.InitDeclarator
for list := n.Declaration.InitDeclaratorList; list != nil; list = list.InitDeclaratorList {
ids = append(ids, list.InitDeclarator)
}
if len(ids) != 1 {
panic(todo(""))
}
id := ids[0]
d := id.Declarator
local := f.locals[d]
p.w("for %s := ", local.name)
p.assignmentExpression(f, id.Initializer.AssignmentExpression, d.Type(), exprValue, fForceConv)
// declaration
// a: if !expr goto c
// stmt
// b: expr2 // label for continue
// goto a
// c:
a := f.flatLabel()
b := f.flatLabel()
f.continueCtx = b
c := f.flatLabel()
f.breakCtx = c
p.w("{")
p.declaration(f, n.Declaration, false)
p.w(";")
p.w("__%d:", a)
if n.Expression != nil {
p.w("if !(")
p.expression(f, n.Expression, n.Expression.Operand.Type(), exprBool, fOutermost)
p.w(") { goto __%d }", c)
}
p.w("; ")
p.w(";")
p.statement(f, n.Statement, false, false, false, 0)
p.w(";goto __%d; __%[1]d:", b)
if n.Expression2 != nil {
p.expression(f, n.Expression2, n.Expression2.Operand.Type(), exprVoid, fOutermost|fNoCondAssignment)
}
p.statement(f, n.Statement, true, false, false, 0)
p.w("; goto __%d; goto __%d;__%[2]d:\n}", a, c)
default:
panic(todo("%v: internal error: %v", n.Position(), n.Case))
}
@ -12903,3 +13006,63 @@ func (p *project) paramTyp(n cc.Node, t cc.Type) string {
func (p *project) dbg(a ...interface{}) {
p.w("/*DBG.%v %v */", a, origin(2))
}
func (p *project) fnVal(n cc.Node, f *function, expr func(), exprDecl *cc.Declarator, exprType cc.Type, deref int, mode exprMode, flags flags) {
// C type Go type
// fn N/A: produce name from exprDecl
// (*)() func()
// (**)() *func()
if deref < 0 || deref > 1 {
panic(todo(""))
}
switch exprType.Kind() {
case cc.Function:
// C: fn
switch deref {
case 0:
p.declarator(n, f, exprDecl, exprType, mode, flags)
default:
panic(todo("", n.Position()))
}
case cc.Ptr:
switch et := exprType.Elem(); et.Kind() {
case cc.Function:
// C: (*)()
switch deref {
case 0:
// (*struct{ f func()})(unsafe.Pointer(&struct{uintptr}{fprintfptr})).f()
p.w("(*struct{ f ")
p.functionSignature(f, et, "")
p.w("})(unsafe.Pointer(&struct{uintptr}{")
expr()
p.w("})).f")
default:
p.declarator(n, f, exprDecl, et, mode, flags)
}
case cc.Ptr:
switch et2 := et.Elem(); et2.Kind() {
case cc.Function:
// C: (**)()
switch deref {
case 0:
panic(todo("", n.Position()))
default:
// (*struct{ f func()})(unsafe.Pointer(&struct{uintptr}{fprintfptr})).f()
p.w("(*(**struct{ f ")
p.functionSignature(f, et2, "")
p.w("})(unsafe.Pointer(&struct{uintptr}{")
expr()
p.w("}))).f")
}
default:
panic(todo("", n.Position(), et2.Kind(), deref))
}
default:
panic(todo("", n.Position(), et.Kind(), deref))
}
default:
panic(todo("", n.Position(), exprType.Kind(), deref))
}
}

View file

@ -38,7 +38,7 @@ func (p *project) initializer(f *function, n *cc.Initializer, t cc.Type, sc cc.S
}
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))
panic(todo("%v: internal error: off %#x, %v: off %#x, t %v", a.Position(), a.Offset, b.Position(), b.Offset, t))
}
return a.Field.BitFieldOffset() < b.Field.BitFieldOffset()
@ -87,9 +87,6 @@ func (p *project) initializerInner(tag string, off uintptr, f *function, s []*cc
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
@ -147,13 +144,13 @@ func (p *project) initializerInner(tag string, off uintptr, f *function, s []*cc
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)))
panic(todo("%v: internal error: %v alias %v %v", s[0].Position(), t, t.Alias(), 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))
p.w("%s%s{}", tag, p.typ(nil, t))
return
}
@ -172,7 +169,7 @@ func (p *project) initializerArray(tag string, off uintptr, f *function, s []*cc
for _, parts = range a {
var comma *cc.Token
comma = parts[len(parts)-1].TrailingComma()
elemOff := parts[0].Offset - off
elemOff := (parts[0].Offset - off) / esz * esz
tag = ""
if mustIndex {
tag = fmt.Sprintf("%d:", elemOff/esz)
@ -217,7 +214,7 @@ func (p *project) initializerArrayElement(off uintptr, s []*cc.Initializer, elem
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))
p.w("%s%s{}", tag, p.typ(nil, t))
return
}
@ -232,7 +229,7 @@ func (p *project) initializerStruct(tag string, off uintptr, f *function, s []*c
var fld cc.Field
for len(s) != 0 {
var comma *cc.Token
s, fld, parts, isZero = p.initializerStructField(off, s, t)
s, fld, parts, isZero = p.structInitializerParts(off, s, t)
if isZero {
continue
}
@ -246,6 +243,8 @@ func (p *project) initializerStruct(tag string, off uintptr, f *function, s []*c
ft := fld.Type()
switch {
case fld.IsBitField():
bft := p.bitFileType(parts[0], fld.BitFieldBlockWidth())
off0 := fld.Offset()
first := true
for _, v := range parts {
if v.AssignmentExpression.Operand.IsZero() {
@ -257,12 +256,11 @@ func (p *project) initializerStruct(tag string, off uintptr, f *function, s []*c
}
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 {
if o := bitFld.BitFieldOffset() + 8*int((bitFld.Offset()-off0)); o != 0 {
p.w("<<%d", o)
}
}
@ -283,154 +281,141 @@ func (p *project) preCommaSep(comma *cc.Token) {
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
}
func (p *project) structInitializerParts(off uintptr, s []*cc.Initializer, t cc.Type) (r []*cc.Initializer, fld cc.Field, parts []*cc.Initializer, isZero bool) {
if len(s) == 0 {
return nil, nil, nil, true
}
if fld == nil {
fld = fld2
}
if fld2.Offset()+off > valueOff {
nextOff = off + fld2.Offset()
part := s[0]
isZero = part.AssignmentExpression.Operand.IsZero()
parts = append(parts, part)
s = s[1:]
fld, _, fNext := p.containingStructField(part, off, t)
for len(s) != 0 {
part = s[0]
vOff := part.Offset
if vOff >= fNext {
break
}
if !fld2.IsBitField() {
fld = fld2
isZero = isZero && part.AssignmentExpression.Operand.IsZero()
parts = append(parts, part)
s = s[1:]
}
return s, fld, parts, isZero
}
func (p *project) containingStructField(part *cc.Initializer, off uintptr, t cc.Type) (f cc.Field, fOff, fNext uintptr) {
nf := t.NumField()
vOff := part.Offset
for i := []int{0}; i[0] < nf; i[0]++ {
f = t.FieldByIndex(i)
if f.IsBitField() && f.Name() == 0 { // Anonymous bit fields cannot be initialized.
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
fOff = off + f.Offset()
switch {
case f.IsBitField():
fNext = fOff + uintptr(f.BitFieldBlockWidth())>>3
default:
fNext = fOff + f.Type().Size()
}
if vOff >= fOff && vOff < fNext {
return f, fOff, fNext
}
}
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
panic(todo("%v: internal error", pos(part)))
}
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))
p.w("%s%s{}", tag, 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 t.HasFlexibleMember() {
p.err(s[0], "flexible array members not supported")
return
}
if isZero {
p.w("%s%s%s{", initComment(s0, lm), tag, p.typ(s0, t))
parts, isZero := p.initializerUnionField(off, s, t)
if len(parts) == 0 || isZero {
p.w("%s%s%s{", initComment(s[0], lm), tag, p.typ(s[0], 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(""))
p.w("%sfunc() (r %s) {", tag, p.typ(parts[0], t))
for _, part := range parts {
var ft cc.Type
fld := part.Field
if fld != nil && fld.IsBitField() {
}
fld := parts[0].Field
if fld.IsBitField() {
panic(todo(""))
if ft == nil {
ft = part.Type()
}
// 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 ft.Kind() == cc.Array {
et := ft.Elem()
switch {
case isCharType(et):
switch x := part.AssignmentExpression.Operand.Value().(type) {
case cc.StringValue:
str := cc.StringID(x).String()
slen := uintptr(len(str)) + 1
alen := ft.Len()
switch {
case alen < slen-1:
p.w("copy(((*[%d]byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&r))+%d)))[:], (*[%d]byte)(unsafe.Pointer(%s))[:])\n", alen, part.Offset-off, alen, p.stringLiteralString(str[:alen]))
case alen < slen:
p.w("copy(((*[%d]byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&r))+%d)))[:], (*[%d]byte)(unsafe.Pointer(%s))[:])\n", alen, part.Offset-off, alen, p.stringLiteralString(str))
default: // alen >= slen
p.w("copy(((*[%d]byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&r))+%d)))[:], (*[%d]byte)(unsafe.Pointer(%s))[:])\n", alen, part.Offset-off, alen, p.stringLiteralString(str+strings.Repeat("\x00", int(alen-slen))))
}
continue
default:
panic(todo("%v: %v <- %T", pos(part), et, x))
}
case p.isWCharType(et):
panic(todo(""))
}
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 {
ft = et
}
switch {
case fld != nil && fld.IsBitField():
bft := p.bitFileType(part, fld.BitFieldBlockWidth())
p.w("*(*%s)(unsafe.Pointer(uintptr(unsafe.Pointer(&r))+%d)) |= ", p.typ(part, bft), part.Offset-off)
p.assignmentExpression(f, part.AssignmentExpression, bft, exprValue, fOutermost)
p.w("&%#x", uint64(1)<<uint64(fld.BitFieldWidth())-1)
if o := fld.BitFieldOffset(); o != 0 {
p.w("<<%d", o)
}
default:
p.w("*(*%s)(unsafe.Pointer(uintptr(unsafe.Pointer(&r))+%d)) = ", p.typ(part, ft), part.Offset-off)
p.assignmentExpression(f, part.AssignmentExpression, ft, exprValue, fOutermost)
}
default:
p.initializerInner(tag, off+fld.Offset(), f, parts, ft, sc, tld, fld, lm, tm)
p.w("\n")
}
comma := parts[len(parts)-1].TrailingComma()
p.preCommaSep(comma)
p.w(",")
p.w("%s}", initComment(parts[len(parts)-1], tm))
p.w("return r\n")
p.w("}()")
}
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
func (p *project) initializerUnionField(off uintptr, s []*cc.Initializer, t cc.Type) (parts []*cc.Initializer, isZero bool) {
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
}
isZero = isZero && v.AssignmentExpression.Operand.IsZero()
continue
}
break
}
return r[len(parts):], fld, parts, isZero
return parts, isZero
}
func compatibleStructOrUnion(t1, t2 cc.Type) bool {
@ -498,7 +483,7 @@ func compatibleType(t1, t2 cc.Type) bool {
return true
}
func (p *project) bitFileType(bits int) cc.Type {
func (p *project) bitFileType(n cc.Node, bits int) cc.Type {
switch bits {
case 8:
return p.task.cfg.ABI.Type(cc.UChar)
@ -509,7 +494,7 @@ func (p *project) bitFileType(bits int) cc.Type {
case 64:
return p.task.cfg.ABI.Type(cc.ULongLong)
default:
panic(todo("%v: internal error: %v", bits))
panic(todo("%v: internal error: %v", n.Position(), bits))
}
}

View file

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !linux
// +build !linux
package ccgo // import "modernc.org/ccgo/v3/lib"

View file

@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !ccgo.dmesg
// +build !ccgo.dmesg
package ccgo // import "modernc.org/ccgo/v3/lib"

View file

@ -375,7 +375,7 @@ func Shell(cmd string, args ...string) ([]byte, error) {
func MustShell(stackTrace bool, cmd string, args ...string) []byte {
b, err := Shell(cmd, args...)
if err != nil {
Fatalf(stackTrace, "%s\n%s", b, err)
Fatalf(stackTrace, "%v %s\noutput: %s\nerr: %s", cmd, args, b, err)
}
return b
@ -389,6 +389,26 @@ func MustCompile(stackTrace bool, args ...string) []byte {
return MustShell(stackTrace, "ccgo", args...)
}
// Run is like Compile, but executes in-process.
func Run(args ...string) ([]byte, error) {
var b bytes.Buffer
t := NewTask(append([]string{"ccgo"}, args...), &b, &b)
err := t.Main()
return b.Bytes(), err
}
// MustRun is like Run but if executes Fatal(stackTrace, err) if it fails.
func MustRun(stackTrace bool, args ...string) []byte {
var b bytes.Buffer
args = append([]string{"ccgo"}, args...)
t := NewTask(args, &b, &b)
if err := t.Main(); err != nil {
Fatalf(stackTrace, "%v\noutput: %s\nerr: %s", args, b.Bytes(), err)
}
return b.Bytes()
}
// AbsCwd returns the absolute working directory.
func AbsCwd() (string, error) {
wd, err := os.Getwd()

50
vendor/modernc.org/libc/Makefile generated vendored
View file

@ -25,11 +25,13 @@ all:
go test 2>&1 -timeout 1h | tee -a $(log)
GOOS=darwin GOARCH=amd64 go build
GOOS=darwin GOARCH=arm64 go build
GOOS=freebsd GOARCH=amd64 go build
GOOS=linux GOARCH=386 go build
GOOS=linux GOARCH=amd64 go build
GOOS=linux GOARCH=arm go build
GOOS=linux GOARCH=arm64 go build
GOOS=linux GOARCH=s390x go build
GOOS=netbsd GOARCH=amd64 go build
GOOS=windows GOARCH=386 go build
GOOS=windows GOARCH=amd64 go build
go vet -unsafeptr=false 2>&1 | grep -v $(ngrep) || true
@ -43,32 +45,42 @@ all:
date 2>&1 | tee -a $(log)
darwin_amd64:
TARGET_GOOS=darwin TARGET_GOARCH=amd64 go generate
GOOS=darwin GOARCH=amd64 go build -v ./...
@echo "Should be executed only on darwin/amd64."
go generate 2>&1 | tee log-generate
go build -v ./...
darwin_arm64:
TARGET_GOOS=darwin TARGET_GOARCH=arm64 go generate
GOOS=darwin GOARCH=arm64 go build -v ./...
@echo "Should be executed only on darwin/arm64."
go generate 2>&1 | tee log-generate
go build -v ./...
# only on freebsd/amd64
freebsd_amd64:
TARGET_GOOS=freebsd TARGET_GOARCH=amd64 go generate
GOOS=freebsd GOARCH=amd64 go build -v ./...
@echo "Should be executed only on freebsd/amd64."
go generate 2>&1 | tee log-generate
go build -v ./...
# only on netbsd/amd64
netbsd_amd64:
@echo "Should be executed only on netbsd/amd64."
go generate 2>&1 | tee log-generate
go build -v ./...
linux_amd64:
TARGET_GOOS=linux TARGET_GOARCH=amd64 go generate
GOOS=linux GOARCH=amd64 go build -v ./...
@echo "Should be executed only on linux/amd64."
go generate 2>&1 | tee log-generate
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
CCGO_CPP=arm-linux-gnueabi-cpp 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
CCGO_CPP=aarch64-linux-gnu-cpp TARGET_GOOS=linux TARGET_GOARCH=arm64 go generate
GOOS=linux GOARCH=arm64 go build -v ./...
linux_s390x:
@ -76,10 +88,12 @@ linux_s390x:
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 ./...
@echo "Should be executed only on windows/amd64."
go generate 2>&1 | tee log-generate
go build -v ./...
windows_386:
@echo "Should be executed only on linux/amd64."
CCGO_CPP=i686-w64-mingw32-cpp TARGET_GOOS=windows TARGET_GOARCH=386 go generate
GOOS=windows GOARCH=386 go build -v ./...
@ -88,15 +102,27 @@ all_targets: linux_amd64 linux_386 linux_arm linux_arm64 windows_amd64 windows_3
build_all_targets:
GOOS=darwin GOARCH=amd64 go build -v ./...
GOOS=darwin GOARCH=amd64 go test -c -o /dev/null
GOOS=darwin GOARCH=arm64 go build -v ./...
GOOS=darwin GOARCH=arm64 go test -c -o /dev/null
GOOS=freebsd GOARCH=amd64 go build -v ./...
GOOS=freebsd GOARCH=amd64 go test -c -o /dev/null
GOOS=linux GOARCH=386 go build -v ./...
GOOS=linux GOARCH=386 go test -c -o /dev/null
GOOS=linux GOARCH=amd64 go build -v ./...
GOOS=linux GOARCH=amd64 go test -c -o /dev/null
GOOS=linux GOARCH=arm go build -v ./...
GOOS=linux GOARCH=arm go test -c -o /dev/null
GOOS=linux GOARCH=arm64 go build -v ./...
GOOS=linux GOARCH=arm64 go test -c -o /dev/null
GOOS=linux GOARCH=s390x go build -v ./...
GOOS=linux GOARCH=s390x go test -c -o /dev/null
GOOS=netbsd GOARCH=amd64 go build -v ./...
GOOS=netbsd GOARCH=amd64 go test -c -o /dev/null
GOOS=windows GOARCH=386 go build -v ./...
GOOS=windows GOARCH=386 go test -c -o /dev/null
GOOS=windows GOARCH=amd64 go build -v ./...
GOOS=windows GOARCH=amd64 go test -c -o /dev/null
echo done
devbench:

View file

@ -3,426 +3,479 @@
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": {},
"_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_clz": {},
"__builtin_clzl": {},
"__builtin_clzll": {},
"__builtin_constant_p_impl": {},
"__builtin_copysign": {},
"__builtin_copysignf": {},
"__builtin_copysignl": {},
"__builtin_exit": {},
"__builtin_expect": {},
"__builtin_fabs": {},
"__builtin_free": {},
"__builtin_getentropy": {},
"__builtin_huge_val": {},
"__builtin_huge_valf": {},
"__builtin_inf": {},
"__builtin_inff": {},
"__builtin_infl": {},
"__builtin_isnan": {},
"__builtin_malloc": {},
"__builtin_memcmp": {},
"__builtin_memcpy": {},
"__builtin_memset": {},
"__builtin_mmap": {},
"__builtin_mul_overflowInt64": {},
"__builtin_mul_overflowUint128": {},
"__builtin_mul_overflowUint64": {},
"__builtin_nan": {},
"__builtin_nanf": {},
"__builtin_nanl": {},
"__builtin_object_size": {},
"__builtin_popcount": {},
"__builtin_popcountl": {},
"__builtin_prefetch": {},
"__builtin_printf": {},
"__builtin_snprintf": {},
"__builtin_sprintf": {},
"__builtin_strchr": {},
"__builtin_strcmp": {},
"__builtin_strcpy": {},
"__builtin_strlen": {},
"__builtin_sub_overflowInt64": {},
"__builtin_trap": {},
"__builtin_unreachable": {},
"__ccgo_dmesg": {},
"__ccgo_getMutexType": {},
"__ccgo_in6addr_anyp": {},
"__ccgo_pthreadAttrGetDetachState": {},
"__ccgo_pthreadMutexattrGettype": {},
"__ccgo_sqlite4_log": {},
"__cmsg_nxthdr": {},
"__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": {},
"__sync_add_and_fetch_uint32": {},
"__sync_sub_and_fetch_uint32": {},
"__sync_synchronize": {},
"__toread": {},
"__toread_needs_stdio_exit": {},
"__uflow": {},
"_exit": {},
"_longjmp": {},
"_obstack_begin": {},
"_obstack_newchunk": {},
"_setjmp": {},
"abort": {},
"abs": {},
"accept": {},
"access": {},
"acos": {},
"acosh": {},
"alarm": {},
"arc4random_buf": {},
"asin": {},
"asinh": {},
"atan": {},
"atan2": {},
"atanh": {},
"atexit": {},
"atof": {},
"atoi": {},
"atol": {},
"bind": {},
"calloc": {},
"ceil": {},
"ceilf": {},
"cfgetospeed": {},
"cfsetispeed": {},
"cfsetospeed": {},
"chdir": {},
"chflags": {},
"chmod": {},
"chown": {},
"clock": {},
"clock_gettime": {},
"close": {},
"closedir": {},
"confstr": {},
"connect": {},
"copyfile": {},
"copysign": {},
"copysignf": {},
"copysignl": {},
"cos": {},
"cosf": {},
"cosh": {},
"dlclose": {},
"dlerror": {},
"dlopen": {},
"dlsym": {},
"dup3": {},
"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": {},
"getentropy": {},
"getenv": {},
"geteuid": {},
"getgid": {},
"getgrgid": {},
"getgrnam": {},
"gethostbyaddr": {},
"gethostbyaddr_r": {},
"gethostbyname": {},
"gethostbyname2": {},
"gethostbyname2_r": {},
"gethostname": {},
"gethostuuid": {},
"getnameinfo": {},
"getpeername": {},
"getpid": {},
"getpwnam": {},
"getpwuid": {},
"getresgid": {},
"getresuid": {},
"getrusage": {},
"getservbyname": {},
"getsockname": {},
"getsockopt": {},
"gettimeofday": {},
"getuid": {},
"gmtime_r": {},
"h_errno": {},
"htonl": {},
"htons": {},
"hypot": {},
"inet_ntoa": {},
"inet_ntop": {},
"inet_pton": {},
"ioctl": {},
"isalnum": {},
"isalpha": {},
"isatty": {},
"isdigit": {},
"islower": {},
"isnan": {},
"isnanf": {},
"isnanl": {},
"isprint": {},
"isspace": {},
"isupper": {},
"iswalnum": {},
"iswspace": {},
"isxdigit": {},
"kill": {},
"ldexp": {},
"link": {},
"listen": {},
"localtime": {},
"localtime_r": {},
"log": {},
"log10": {},
"longjmp": {},
"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": {},
"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": {},
"putenv": {},
"puts": {},
"pwrite": {},
"qsort": {},
"raise": {},
"rand": {},
"rand_r": {},
"random": {},
"read": {},
"readdir": {},
"readlink": {},
"readv": {},
"realloc": {},
"reallocarray": {},
"realpath": {},
"recv": {},
"recvfrom": {},
"recvmsg": {},
"remove": {},
"rename": {},
"rewind": {},
"rint": {},
"rmdir": {},
"round": {},
"scalbn": {},
"scalbnl": {},
"sched_yield": {},
"select": {},
"send": {},
"sendmsg": {},
"sendto": {},
"setattrlist": {},
"setbuf": {},
"setenv": {},
"setjmp": {},
"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": {},
"tmpfile": {},
"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": {},
}

View file

@ -25,18 +25,23 @@ var CAPI = map[string]struct{}{
"__builtin_bswap16": {},
"__builtin_bswap32": {},
"__builtin_bswap64": {},
"__builtin_clz": {},
"__builtin_clzl": {},
"__builtin_clzll": {},
"__builtin_constant_p_impl": {},
"__builtin_copysign": {},
"__builtin_copysignf": {},
"__builtin_copysignl": {},
"__builtin_exit": {},
"__builtin_expect": {},
"__builtin_fabs": {},
"__builtin_free": {},
"__builtin_getentropy": {},
"__builtin_huge_val": {},
"__builtin_huge_valf": {},
"__builtin_inf": {},
"__builtin_inff": {},
"__builtin_infl": {},
"__builtin_isnan": {},
"__builtin_malloc": {},
"__builtin_memcmp": {},
@ -46,9 +51,12 @@ var CAPI = map[string]struct{}{
"__builtin_mul_overflowInt64": {},
"__builtin_mul_overflowUint128": {},
"__builtin_mul_overflowUint64": {},
"__builtin_nan": {},
"__builtin_nanf": {},
"__builtin_nanl": {},
"__builtin_object_size": {},
"__builtin_popcount": {},
"__builtin_popcountl": {},
"__builtin_prefetch": {},
"__builtin_printf": {},
"__builtin_snprintf": {},
@ -60,10 +68,10 @@ var CAPI = map[string]struct{}{
"__builtin_sub_overflowInt64": {},
"__builtin_trap": {},
"__builtin_unreachable": {},
"__ccgo_dmesg": {},
"__ccgo_in6addr_anyp": {},
"__ccgo_sqlite3_log": {},
"__cmsg_nxthdr": {},
"__ctype_b_loc": {},
"__ctype_get_mb_cur_max": {},
"__darwin_fd_clr": {},
"__darwin_fd_isset": {},
@ -102,12 +110,17 @@ var CAPI = map[string]struct{}{
"__stdinp": {},
"__stdoutp": {},
"__strchrnul": {},
"__sync_add_and_fetch_uint32": {},
"__sync_sub_and_fetch_uint32": {},
"__sync_synchronize": {},
"__toread": {},
"__toread_needs_stdio_exit": {},
"__uflow": {},
"_exit": {},
"_longjmp": {},
"_obstack_begin": {},
"_obstack_newchunk": {},
"_setjmp": {},
"abort": {},
"abs": {},
"accept": {},
@ -135,6 +148,7 @@ var CAPI = map[string]struct{}{
"chflags": {},
"chmod": {},
"chown": {},
"clock": {},
"clock_gettime": {},
"close": {},
"closedir": {},
@ -201,6 +215,7 @@ var CAPI = map[string]struct{}{
"getattrlist": {},
"getcwd": {},
"getegid": {},
"getentropy": {},
"getenv": {},
"geteuid": {},
"getgid": {},
@ -217,9 +232,7 @@ var CAPI = map[string]struct{}{
"getpeername": {},
"getpid": {},
"getpwnam": {},
"getpwnam_r": {},
"getpwuid": {},
"getpwuid_r": {},
"getresgid": {},
"getresuid": {},
"getrusage": {},
@ -236,7 +249,6 @@ var CAPI = map[string]struct{}{
"inet_ntoa": {},
"inet_ntop": {},
"inet_pton": {},
"initstate_r": {},
"ioctl": {},
"isalnum": {},
"isalpha": {},
@ -249,6 +261,8 @@ var CAPI = map[string]struct{}{
"isprint": {},
"isspace": {},
"isupper": {},
"iswalnum": {},
"iswspace": {},
"isxdigit": {},
"kill": {},
"ldexp": {},
@ -258,6 +272,7 @@ var CAPI = map[string]struct{}{
"localtime_r": {},
"log": {},
"log10": {},
"longjmp": {},
"lrand48": {},
"lseek": {},
"lseek64": {},
@ -303,6 +318,36 @@ var CAPI = map[string]struct{}{
"pread": {},
"printf": {},
"pselect": {},
"pthread_attr_destroy": {},
"pthread_attr_getdetachstate": {},
"pthread_attr_init": {},
"pthread_attr_setdetachstate": {},
"pthread_attr_setscope": {},
"pthread_attr_setstacksize": {},
"pthread_cond_broadcast": {},
"pthread_cond_destroy": {},
"pthread_cond_init": {},
"pthread_cond_signal": {},
"pthread_cond_timedwait": {},
"pthread_cond_wait": {},
"pthread_create": {},
"pthread_detach": {},
"pthread_equal": {},
"pthread_exit": {},
"pthread_getspecific": {},
"pthread_join": {},
"pthread_key_create": {},
"pthread_key_delete": {},
"pthread_mutex_destroy": {},
"pthread_mutex_init": {},
"pthread_mutex_lock": {},
"pthread_mutex_trylock": {},
"pthread_mutex_unlock": {},
"pthread_mutexattr_destroy": {},
"pthread_mutexattr_init": {},
"pthread_mutexattr_settype": {},
"pthread_self": {},
"pthread_setspecific": {},
"putc": {},
"putchar": {},
"putenv": {},
@ -313,12 +358,12 @@ var CAPI = map[string]struct{}{
"rand": {},
"rand_r": {},
"random": {},
"random_r": {},
"read": {},
"readdir": {},
"readlink": {},
"readv": {},
"realloc": {},
"reallocarray": {},
"realpath": {},
"recv": {},
"recvfrom": {},
@ -326,6 +371,7 @@ var CAPI = map[string]struct{}{
"remove": {},
"rename": {},
"rewind": {},
"rint": {},
"rmdir": {},
"round": {},
"scalbn": {},
@ -337,6 +383,7 @@ var CAPI = map[string]struct{}{
"setattrlist": {},
"setbuf": {},
"setenv": {},
"setjmp": {},
"setlocale": {},
"setsid": {},
"setsockopt": {},
@ -402,6 +449,7 @@ var CAPI = map[string]struct{}{
"tcsendbreak": {},
"tcsetattr": {},
"time": {},
"tmpfile": {},
"tolower": {},
"toupper": {},
"trunc": {},

View file

@ -3,419 +3,468 @@
package libc // import "modernc.org/libc"
var CAPI = map[string]struct{}{
"_CurrentRuneLocale": {},
"_DefaultRuneLocale": {},
"_IO_putc": {},
"_ThreadRuneLocale": {},
"___errno_location": {},
"___runetype": {},
"__assert": {},
"__assert_fail": {},
"__builtin___memcpy_chk": {},
"__builtin___memmove_chk": {},
"__builtin___memset_chk": {},
"__builtin___snprintf_chk": {},
"__builtin___sprintf_chk": {},
"__builtin___strcat_chk": {},
"__builtin___strcpy_chk": {},
"__builtin___strncpy_chk": {},
"__builtin___vsnprintf_chk": {},
"__builtin_abort": {},
"__builtin_abs": {},
"__builtin_add_overflowInt64": {},
"__builtin_add_overflowUint32": {},
"__builtin_add_overflowUint64": {},
"__builtin_bswap16": {},
"__builtin_bswap32": {},
"__builtin_bswap64": {},
"__builtin_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": {},
"__error": {},
"__floatscan": {},
"__h_errno_location": {},
"__inet_aton": {},
"__inet_ntoa": {},
"__intscan": {},
"__isalnum_l": {},
"__isalpha_l": {},
"__isdigit_l": {},
"__isnan": {},
"__isnanf": {},
"__isnanl": {},
"__isoc99_sscanf": {},
"__isthreaded": {},
"__lookup_ipliteral": {},
"__lookup_name": {},
"__lookup_serv": {},
"__mb_sb_limit": {},
"__runes_for_locale": {},
"__shgetc": {},
"__shlim": {},
"__stderrp": {},
"__stdinp": {},
"__stdoutp": {},
"__swbuf": {},
"__syscall1": {},
"__syscall3": {},
"__syscall4": {},
"__toread": {},
"__toread_needs_stdio_exit": {},
"__uflow": {},
"__xuname": {},
"_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": {},
"chflags": {},
"chmod": {},
"chown": {},
"clock_gettime": {},
"close": {},
"closedir": {},
"confstr": {},
"connect": {},
"copysign": {},
"copysignf": {},
"copysignl": {},
"cos": {},
"cosf": {},
"cosh": {},
"ctime": {},
"ctime_r": {},
"dlclose": {},
"dlerror": {},
"dlopen": {},
"dlsym": {},
"dup2": {},
"endpwent": {},
"environ": {},
"execvp": {},
"exit": {},
"exp": {},
"fabs": {},
"fabsf": {},
"fabsl": {},
"fchmod": {},
"fchown": {},
"fclose": {},
"fcntl": {},
"fcntl64": {},
"fdopen": {},
"ferror": {},
"fflush": {},
"fgetc": {},
"fgets": {},
"fileno": {},
"floor": {},
"fmod": {},
"fmodl": {},
"fopen": {},
"fopen64": {},
"fork": {},
"fprintf": {},
"fputc": {},
"fputs": {},
"fread": {},
"free": {},
"freeaddrinfo": {},
"frexp": {},
"fscanf": {},
"fseek": {},
"fstat": {},
"fstat64": {},
"fsync": {},
"ftell": {},
"ftruncate": {},
"fts64_close": {},
"fts64_open": {},
"fts64_read": {},
"fts_close": {},
"fts_open": {},
"fts_read": {},
"fwrite": {},
"gai_strerror": {},
"getaddrinfo": {},
"getc": {},
"getcwd": {},
"getegid": {},
"getenv": {},
"geteuid": {},
"getgid": {},
"getgrgid": {},
"getgrgid_r": {},
"getgrnam": {},
"getgrnam_r": {},
"gethostbyaddr": {},
"gethostbyaddr_r": {},
"gethostbyname": {},
"gethostbyname2": {},
"gethostbyname2_r": {},
"gethostname": {},
"getnameinfo": {},
"getpeername": {},
"getpid": {},
"getpwnam": {},
"getpwnam_r": {},
"getpwuid": {},
"getpwuid_r": {},
"getresgid": {},
"getresuid": {},
"getrlimit": {},
"getrlimit64": {},
"getrusage": {},
"getservbyname": {},
"getsockname": {},
"getsockopt": {},
"gettimeofday": {},
"getuid": {},
"gmtime_r": {},
"h_errno": {},
"htonl": {},
"htons": {},
"hypot": {},
"inet_ntoa": {},
"inet_ntop": {},
"inet_pton": {},
"initstate_r": {},
"ioctl": {},
"isalnum": {},
"isalpha": {},
"isatty": {},
"isdigit": {},
"isnan": {},
"isnanf": {},
"isnanl": {},
"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": {},
"modf": {},
"munmap": {},
"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": {},
"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": {},
"strlen": {},
"strncmp": {},
"strncpy": {},
"strnlen": {},
"strpbrk": {},
"strrchr": {},
"strspn": {},
"strstr": {},
"strtod": {},
"strtof": {},
"strtoimax": {},
"strtol": {},
"strtold": {},
"strtoll": {},
"strtoul": {},
"strtoull": {},
"strtoumax": {},
"symlink": {},
"sysconf": {},
"system": {},
"tan": {},
"tanh": {},
"tcgetattr": {},
"tcsendbreak": {},
"tcsetattr": {},
"time": {},
"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": {},
"_CurrentRuneLocale": {},
"_DefaultRuneLocale": {},
"_IO_putc": {},
"_ThreadRuneLocale": {},
"___errno_location": {},
"___runetype": {},
"__assert": {},
"__assert_fail": {},
"__builtin___memcpy_chk": {},
"__builtin___memmove_chk": {},
"__builtin___memset_chk": {},
"__builtin___snprintf_chk": {},
"__builtin___sprintf_chk": {},
"__builtin___strcat_chk": {},
"__builtin___strcpy_chk": {},
"__builtin___strncpy_chk": {},
"__builtin___vsnprintf_chk": {},
"__builtin_abort": {},
"__builtin_abs": {},
"__builtin_add_overflowInt64": {},
"__builtin_add_overflowUint32": {},
"__builtin_add_overflowUint64": {},
"__builtin_bswap16": {},
"__builtin_bswap32": {},
"__builtin_bswap64": {},
"__builtin_clz": {},
"__builtin_clzl": {},
"__builtin_clzll": {},
"__builtin_constant_p_impl": {},
"__builtin_copysign": {},
"__builtin_copysignf": {},
"__builtin_copysignl": {},
"__builtin_exit": {},
"__builtin_expect": {},
"__builtin_fabs": {},
"__builtin_free": {},
"__builtin_getentropy": {},
"__builtin_huge_val": {},
"__builtin_huge_valf": {},
"__builtin_inf": {},
"__builtin_inff": {},
"__builtin_infl": {},
"__builtin_isnan": {},
"__builtin_malloc": {},
"__builtin_memcmp": {},
"__builtin_memcpy": {},
"__builtin_memset": {},
"__builtin_mmap": {},
"__builtin_mul_overflowInt64": {},
"__builtin_mul_overflowUint128": {},
"__builtin_mul_overflowUint64": {},
"__builtin_nan": {},
"__builtin_nanf": {},
"__builtin_nanl": {},
"__builtin_object_size": {},
"__builtin_popcount": {},
"__builtin_popcountl": {},
"__builtin_prefetch": {},
"__builtin_printf": {},
"__builtin_snprintf": {},
"__builtin_sprintf": {},
"__builtin_strchr": {},
"__builtin_strcmp": {},
"__builtin_strcpy": {},
"__builtin_strlen": {},
"__builtin_sub_overflowInt64": {},
"__builtin_trap": {},
"__builtin_unreachable": {},
"__ccgo_dmesg": {},
"__ccgo_getMutexType": {},
"__ccgo_in6addr_anyp": {},
"__ccgo_pthreadAttrGetDetachState": {},
"__ccgo_pthreadMutexattrGettype": {},
"__ccgo_sqlite3_log": {},
"__cmsg_nxthdr": {},
"__ctype_get_mb_cur_max": {},
"__errno_location": {},
"__error": {},
"__floatscan": {},
"__h_errno_location": {},
"__inet_aton": {},
"__inet_ntoa": {},
"__intscan": {},
"__isalnum_l": {},
"__isalpha_l": {},
"__isdigit_l": {},
"__isnan": {},
"__isnanf": {},
"__isnanl": {},
"__isoc99_sscanf": {},
"__isthreaded": {},
"__lookup_ipliteral": {},
"__lookup_name": {},
"__lookup_serv": {},
"__mb_sb_limit": {},
"__runes_for_locale": {},
"__shgetc": {},
"__shlim": {},
"__stderrp": {},
"__stdinp": {},
"__stdoutp": {},
"__swbuf": {},
"__sync_add_and_fetch_uint32": {},
"__sync_sub_and_fetch_uint32": {},
"__sync_synchronize": {},
"__syscall1": {},
"__syscall3": {},
"__syscall4": {},
"__toread": {},
"__toread_needs_stdio_exit": {},
"__uflow": {},
"__xuname": {},
"_exit": {},
"_longjmp": {},
"_obstack_begin": {},
"_obstack_newchunk": {},
"_setjmp": {},
"abort": {},
"abs": {},
"accept": {},
"access": {},
"acos": {},
"acosh": {},
"alarm": {},
"asin": {},
"asinh": {},
"atan": {},
"atan2": {},
"atanh": {},
"atexit": {},
"atof": {},
"atoi": {},
"atol": {},
"backtrace": {},
"backtrace_symbols_fd": {},
"bind": {},
"calloc": {},
"ceil": {},
"ceilf": {},
"cfgetospeed": {},
"cfsetispeed": {},
"cfsetospeed": {},
"chdir": {},
"chflags": {},
"chmod": {},
"chown": {},
"clock_gettime": {},
"close": {},
"closedir": {},
"confstr": {},
"connect": {},
"copysign": {},
"copysignf": {},
"copysignl": {},
"cos": {},
"cosf": {},
"cosh": {},
"ctime": {},
"ctime_r": {},
"dlclose": {},
"dlerror": {},
"dlopen": {},
"dlsym": {},
"dup2": {},
"endpwent": {},
"environ": {},
"execvp": {},
"exit": {},
"exp": {},
"fabs": {},
"fabsf": {},
"fabsl": {},
"fchmod": {},
"fchown": {},
"fclose": {},
"fcntl": {},
"fcntl64": {},
"fdopen": {},
"ferror": {},
"fflush": {},
"fgetc": {},
"fgets": {},
"fileno": {},
"floor": {},
"fmod": {},
"fmodl": {},
"fopen": {},
"fopen64": {},
"fork": {},
"fprintf": {},
"fputc": {},
"fputs": {},
"fread": {},
"free": {},
"freeaddrinfo": {},
"frexp": {},
"fscanf": {},
"fseek": {},
"fstat": {},
"fstat64": {},
"fsync": {},
"ftell": {},
"ftruncate": {},
"fts64_close": {},
"fts64_open": {},
"fts64_read": {},
"fts_close": {},
"fts_open": {},
"fts_read": {},
"fwrite": {},
"gai_strerror": {},
"getaddrinfo": {},
"getc": {},
"getcwd": {},
"getegid": {},
"getentropy": {},
"getenv": {},
"geteuid": {},
"getgid": {},
"getgrgid": {},
"getgrgid_r": {},
"getgrnam": {},
"getgrnam_r": {},
"gethostbyaddr": {},
"gethostbyaddr_r": {},
"gethostbyname": {},
"gethostbyname2": {},
"gethostbyname2_r": {},
"gethostname": {},
"getnameinfo": {},
"getpeername": {},
"getpid": {},
"getpwnam": {},
"getpwnam_r": {},
"getpwuid": {},
"getpwuid_r": {},
"getresgid": {},
"getresuid": {},
"getrlimit": {},
"getrlimit64": {},
"getrusage": {},
"getservbyname": {},
"getsockname": {},
"getsockopt": {},
"gettimeofday": {},
"getuid": {},
"gmtime_r": {},
"h_errno": {},
"htonl": {},
"htons": {},
"hypot": {},
"inet_ntoa": {},
"inet_ntop": {},
"inet_pton": {},
"ioctl": {},
"isalnum": {},
"isalpha": {},
"isatty": {},
"isdigit": {},
"isnan": {},
"isnanf": {},
"isnanl": {},
"kill": {},
"ldexp": {},
"link": {},
"listen": {},
"localtime": {},
"localtime_r": {},
"log": {},
"log10": {},
"longjmp": {},
"lrand48": {},
"lseek": {},
"lseek64": {},
"lstat": {},
"lstat64": {},
"malloc": {},
"mblen": {},
"mbstowcs": {},
"mbtowc": {},
"memchr": {},
"memcmp": {},
"memcpy": {},
"memmove": {},
"memset": {},
"mkdir": {},
"mkfifo": {},
"mknod": {},
"mkstemp": {},
"mkstemp64": {},
"mkstemps": {},
"mkstemps64": {},
"mktime": {},
"mmap": {},
"modf": {},
"munmap": {},
"nl_langinfo": {},
"ntohs": {},
"obstack_free": {},
"obstack_vprintf": {},
"open": {},
"open64": {},
"opendir": {},
"openpty": {},
"pathconf": {},
"pause": {},
"pclose": {},
"perror": {},
"pipe": {},
"poll": {},
"popen": {},
"pow": {},
"printf": {},
"pselect": {},
"pthread_attr_destroy": {},
"pthread_attr_getdetachstate": {},
"pthread_attr_init": {},
"pthread_attr_setdetachstate": {},
"pthread_attr_setscope": {},
"pthread_attr_setstacksize": {},
"pthread_cond_broadcast": {},
"pthread_cond_destroy": {},
"pthread_cond_init": {},
"pthread_cond_signal": {},
"pthread_cond_timedwait": {},
"pthread_cond_wait": {},
"pthread_create": {},
"pthread_detach": {},
"pthread_equal": {},
"pthread_exit": {},
"pthread_getspecific": {},
"pthread_join": {},
"pthread_key_create": {},
"pthread_key_delete": {},
"pthread_mutex_destroy": {},
"pthread_mutex_init": {},
"pthread_mutex_lock": {},
"pthread_mutex_trylock": {},
"pthread_mutex_unlock": {},
"pthread_mutexattr_destroy": {},
"pthread_mutexattr_init": {},
"pthread_mutexattr_settype": {},
"pthread_self": {},
"pthread_setspecific": {},
"putc": {},
"putchar": {},
"puts": {},
"qsort": {},
"raise": {},
"rand": {},
"random": {},
"read": {},
"readdir": {},
"readdir64": {},
"readlink": {},
"readv": {},
"realloc": {},
"reallocarray": {},
"realpath": {},
"recv": {},
"recvfrom": {},
"recvmsg": {},
"remove": {},
"rename": {},
"rewind": {},
"rint": {},
"rmdir": {},
"round": {},
"scalbn": {},
"scalbnl": {},
"sched_yield": {},
"select": {},
"send": {},
"sendmsg": {},
"sendto": {},
"setbuf": {},
"setenv": {},
"setjmp": {},
"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": {},
"strlen": {},
"strncmp": {},
"strncpy": {},
"strnlen": {},
"strpbrk": {},
"strrchr": {},
"strspn": {},
"strstr": {},
"strtod": {},
"strtof": {},
"strtoimax": {},
"strtol": {},
"strtold": {},
"strtoll": {},
"strtoul": {},
"strtoull": {},
"strtoumax": {},
"symlink": {},
"sysconf": {},
"system": {},
"tan": {},
"tanh": {},
"tcgetattr": {},
"tcsendbreak": {},
"tcsetattr": {},
"time": {},
"tmpfile": {},
"tolower": {},
"toupper": {},
"trunc": {},
"tzset": {},
"umask": {},
"uname": {},
"ungetc": {},
"unlink": {},
"unsetenv": {},
"usleep": {},
"utime": {},
"utimes": {},
"vasprintf": {},
"vfprintf": {},
"vprintf": {},
"vsnprintf": {},
"vsprintf": {},
"waitpid": {},
"wcschr": {},
"wctomb": {},
"wcwidth": {},
"write": {},
"writev": {},
"zero_struct_address": {},
}

View file

@ -23,18 +23,23 @@ var CAPI = map[string]struct{}{
"__builtin_bswap16": {},
"__builtin_bswap32": {},
"__builtin_bswap64": {},
"__builtin_clz": {},
"__builtin_clzl": {},
"__builtin_clzll": {},
"__builtin_constant_p_impl": {},
"__builtin_copysign": {},
"__builtin_copysignf": {},
"__builtin_copysignl": {},
"__builtin_exit": {},
"__builtin_expect": {},
"__builtin_fabs": {},
"__builtin_free": {},
"__builtin_getentropy": {},
"__builtin_huge_val": {},
"__builtin_huge_valf": {},
"__builtin_inf": {},
"__builtin_inff": {},
"__builtin_infl": {},
"__builtin_isnan": {},
"__builtin_malloc": {},
"__builtin_memcmp": {},
@ -44,9 +49,12 @@ var CAPI = map[string]struct{}{
"__builtin_mul_overflowInt64": {},
"__builtin_mul_overflowUint128": {},
"__builtin_mul_overflowUint64": {},
"__builtin_nan": {},
"__builtin_nanf": {},
"__builtin_nanl": {},
"__builtin_object_size": {},
"__builtin_popcount": {},
"__builtin_popcountl": {},
"__builtin_prefetch": {},
"__builtin_printf": {},
"__builtin_snprintf": {},
@ -58,6 +66,7 @@ var CAPI = map[string]struct{}{
"__builtin_sub_overflowInt64": {},
"__builtin_trap": {},
"__builtin_unreachable": {},
"__ccgo_dmesg": {},
"__ccgo_getMutexType": {},
"__ccgo_in6addr_anyp": {},
"__ccgo_pthreadAttrGetDetachState": {},
@ -93,6 +102,9 @@ var CAPI = map[string]struct{}{
"__shgetc": {},
"__shlim": {},
"__strncasecmp_l": {},
"__sync_add_and_fetch_uint32": {},
"__sync_sub_and_fetch_uint32": {},
"__sync_synchronize": {},
"__syscall1": {},
"__syscall3": {},
"__syscall4": {},
@ -101,8 +113,10 @@ var CAPI = map[string]struct{}{
"__uflow": {},
"__unlockfile": {},
"_exit": {},
"_longjmp": {},
"_obstack_begin": {},
"_obstack_newchunk": {},
"_setjmp": {},
"abort": {},
"abs": {},
"accept": {},
@ -185,6 +199,7 @@ var CAPI = map[string]struct{}{
"fseek": {},
"fstat": {},
"fstat64": {},
"fstatfs": {},
"fsync": {},
"ftell": {},
"ftruncate": {},
@ -201,6 +216,7 @@ var CAPI = map[string]struct{}{
"getc": {},
"getcwd": {},
"getegid": {},
"getentropy": {},
"getenv": {},
"geteuid": {},
"getgid": {},
@ -222,6 +238,7 @@ var CAPI = map[string]struct{}{
"getpwnam_r": {},
"getpwuid": {},
"getpwuid_r": {},
"getrandom": {},
"getresgid": {},
"getresuid": {},
"getrlimit": {},
@ -257,10 +274,12 @@ var CAPI = map[string]struct{}{
"ldexp": {},
"link": {},
"listen": {},
"localeconv": {},
"localtime": {},
"localtime_r": {},
"log": {},
"log10": {},
"longjmp": {},
"lrand48": {},
"lseek": {},
"lseek64": {},
@ -280,6 +299,7 @@ var CAPI = map[string]struct{}{
"mkdir": {},
"mkfifo": {},
"mknod": {},
"mkostemp": {},
"mkstemp": {},
"mkstemp64": {},
"mkstemps": {},
@ -310,14 +330,40 @@ var CAPI = map[string]struct{}{
"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": {},
"pwrite": {},
"qsort": {},
"raise": {},
"rand": {},
@ -330,6 +376,7 @@ var CAPI = map[string]struct{}{
"readlink": {},
"readv": {},
"realloc": {},
"reallocarray": {},
"realpath": {},
"recv": {},
"recvfrom": {},
@ -337,6 +384,7 @@ var CAPI = map[string]struct{}{
"remove": {},
"rename": {},
"rewind": {},
"rint": {},
"rmdir": {},
"round": {},
"scalbn": {},
@ -348,6 +396,7 @@ var CAPI = map[string]struct{}{
"sendto": {},
"setbuf": {},
"setenv": {},
"setjmp": {},
"setlocale": {},
"setrlimit": {},
"setrlimit64": {},
@ -383,6 +432,7 @@ var CAPI = map[string]struct{}{
"strcspn": {},
"strdup": {},
"strerror": {},
"strerror_r": {},
"strlcat": {},
"strlcpy": {},
"strlen": {},
@ -414,6 +464,7 @@ var CAPI = map[string]struct{}{
"tcsendbreak": {},
"tcsetattr": {},
"time": {},
"tmpfile": {},
"tolower": {},
"toupper": {},
"trunc": {},
@ -426,6 +477,10 @@ var CAPI = map[string]struct{}{
"usleep": {},
"utime": {},
"utimes": {},
"uuid_copy": {},
"uuid_generate_random": {},
"uuid_parse": {},
"uuid_unparse": {},
"vasprintf": {},
"vfprintf": {},
"vfscanf": {},

View file

@ -23,18 +23,23 @@ var CAPI = map[string]struct{}{
"__builtin_bswap16": {},
"__builtin_bswap32": {},
"__builtin_bswap64": {},
"__builtin_clz": {},
"__builtin_clzl": {},
"__builtin_clzll": {},
"__builtin_constant_p_impl": {},
"__builtin_copysign": {},
"__builtin_copysignf": {},
"__builtin_copysignl": {},
"__builtin_exit": {},
"__builtin_expect": {},
"__builtin_fabs": {},
"__builtin_free": {},
"__builtin_getentropy": {},
"__builtin_huge_val": {},
"__builtin_huge_valf": {},
"__builtin_inf": {},
"__builtin_inff": {},
"__builtin_infl": {},
"__builtin_isnan": {},
"__builtin_malloc": {},
"__builtin_memcmp": {},
@ -44,9 +49,12 @@ var CAPI = map[string]struct{}{
"__builtin_mul_overflowInt64": {},
"__builtin_mul_overflowUint128": {},
"__builtin_mul_overflowUint64": {},
"__builtin_nan": {},
"__builtin_nanf": {},
"__builtin_nanl": {},
"__builtin_object_size": {},
"__builtin_popcount": {},
"__builtin_popcountl": {},
"__builtin_prefetch": {},
"__builtin_printf": {},
"__builtin_snprintf": {},
@ -58,6 +66,7 @@ var CAPI = map[string]struct{}{
"__builtin_sub_overflowInt64": {},
"__builtin_trap": {},
"__builtin_unreachable": {},
"__ccgo_dmesg": {},
"__ccgo_getMutexType": {},
"__ccgo_in6addr_anyp": {},
"__ccgo_pthreadAttrGetDetachState": {},
@ -93,6 +102,8 @@ var CAPI = map[string]struct{}{
"__shgetc": {},
"__shlim": {},
"__strncasecmp_l": {},
"__sync_add_and_fetch_uint32": {},
"__sync_sub_and_fetch_uint32": {},
"__sync_synchronize": {},
"__syscall1": {},
"__syscall3": {},
@ -102,8 +113,10 @@ var CAPI = map[string]struct{}{
"__uflow": {},
"__unlockfile": {},
"_exit": {},
"_longjmp": {},
"_obstack_begin": {},
"_obstack_newchunk": {},
"_setjmp": {},
"abort": {},
"abs": {},
"accept": {},
@ -186,6 +199,7 @@ var CAPI = map[string]struct{}{
"fseek": {},
"fstat": {},
"fstat64": {},
"fstatfs": {},
"fsync": {},
"ftell": {},
"ftruncate": {},
@ -202,6 +216,7 @@ var CAPI = map[string]struct{}{
"getc": {},
"getcwd": {},
"getegid": {},
"getentropy": {},
"getenv": {},
"geteuid": {},
"getgid": {},
@ -223,6 +238,7 @@ var CAPI = map[string]struct{}{
"getpwnam_r": {},
"getpwuid": {},
"getpwuid_r": {},
"getrandom": {},
"getresgid": {},
"getresuid": {},
"getrlimit": {},
@ -253,15 +269,19 @@ var CAPI = map[string]struct{}{
"isnanl": {},
"isprint": {},
"isupper": {},
"iswalnum": {},
"iswspace": {},
"isxdigit": {},
"kill": {},
"ldexp": {},
"link": {},
"listen": {},
"localeconv": {},
"localtime": {},
"localtime_r": {},
"log": {},
"log10": {},
"longjmp": {},
"lrand48": {},
"lseek": {},
"lseek64": {},
@ -281,6 +301,7 @@ var CAPI = map[string]struct{}{
"mkdir": {},
"mkfifo": {},
"mknod": {},
"mkostemp": {},
"mkstemp": {},
"mkstemp64": {},
"mkstemps": {},
@ -344,6 +365,7 @@ var CAPI = map[string]struct{}{
"putc": {},
"putchar": {},
"puts": {},
"pwrite": {},
"qsort": {},
"raise": {},
"rand": {},
@ -356,6 +378,7 @@ var CAPI = map[string]struct{}{
"readlink": {},
"readv": {},
"realloc": {},
"reallocarray": {},
"realpath": {},
"recv": {},
"recvfrom": {},
@ -363,6 +386,7 @@ var CAPI = map[string]struct{}{
"remove": {},
"rename": {},
"rewind": {},
"rint": {},
"rmdir": {},
"round": {},
"scalbn": {},
@ -374,6 +398,7 @@ var CAPI = map[string]struct{}{
"sendto": {},
"setbuf": {},
"setenv": {},
"setjmp": {},
"setlocale": {},
"setrlimit": {},
"setrlimit64": {},
@ -409,6 +434,7 @@ var CAPI = map[string]struct{}{
"strcspn": {},
"strdup": {},
"strerror": {},
"strerror_r": {},
"strlcat": {},
"strlcpy": {},
"strlen": {},
@ -440,6 +466,7 @@ var CAPI = map[string]struct{}{
"tcsendbreak": {},
"tcsetattr": {},
"time": {},
"tmpfile": {},
"tolower": {},
"toupper": {},
"trunc": {},
@ -452,6 +479,7 @@ var CAPI = map[string]struct{}{
"usleep": {},
"utime": {},
"utimes": {},
"uuid_copy": {},
"uuid_generate_random": {},
"uuid_parse": {},
"uuid_unparse": {},

View file

@ -23,18 +23,23 @@ var CAPI = map[string]struct{}{
"__builtin_bswap16": {},
"__builtin_bswap32": {},
"__builtin_bswap64": {},
"__builtin_clz": {},
"__builtin_clzl": {},
"__builtin_clzll": {},
"__builtin_constant_p_impl": {},
"__builtin_copysign": {},
"__builtin_copysignf": {},
"__builtin_copysignl": {},
"__builtin_exit": {},
"__builtin_expect": {},
"__builtin_fabs": {},
"__builtin_free": {},
"__builtin_getentropy": {},
"__builtin_huge_val": {},
"__builtin_huge_valf": {},
"__builtin_inf": {},
"__builtin_inff": {},
"__builtin_infl": {},
"__builtin_isnan": {},
"__builtin_malloc": {},
"__builtin_memcmp": {},
@ -44,9 +49,12 @@ var CAPI = map[string]struct{}{
"__builtin_mul_overflowInt64": {},
"__builtin_mul_overflowUint128": {},
"__builtin_mul_overflowUint64": {},
"__builtin_nan": {},
"__builtin_nanf": {},
"__builtin_nanl": {},
"__builtin_object_size": {},
"__builtin_popcount": {},
"__builtin_popcountl": {},
"__builtin_prefetch": {},
"__builtin_printf": {},
"__builtin_snprintf": {},
@ -58,6 +66,7 @@ var CAPI = map[string]struct{}{
"__builtin_sub_overflowInt64": {},
"__builtin_trap": {},
"__builtin_unreachable": {},
"__ccgo_dmesg": {},
"__ccgo_getMutexType": {},
"__ccgo_in6addr_anyp": {},
"__ccgo_pthreadAttrGetDetachState": {},
@ -93,6 +102,9 @@ var CAPI = map[string]struct{}{
"__shgetc": {},
"__shlim": {},
"__strncasecmp_l": {},
"__sync_add_and_fetch_uint32": {},
"__sync_sub_and_fetch_uint32": {},
"__sync_synchronize": {},
"__syscall1": {},
"__syscall3": {},
"__syscall4": {},
@ -101,8 +113,10 @@ var CAPI = map[string]struct{}{
"__uflow": {},
"__unlockfile": {},
"_exit": {},
"_longjmp": {},
"_obstack_begin": {},
"_obstack_newchunk": {},
"_setjmp": {},
"abort": {},
"abs": {},
"accept": {},
@ -185,6 +199,7 @@ var CAPI = map[string]struct{}{
"fseek": {},
"fstat": {},
"fstat64": {},
"fstatfs": {},
"fsync": {},
"ftell": {},
"ftruncate": {},
@ -201,6 +216,7 @@ var CAPI = map[string]struct{}{
"getc": {},
"getcwd": {},
"getegid": {},
"getentropy": {},
"getenv": {},
"geteuid": {},
"getgid": {},
@ -222,6 +238,7 @@ var CAPI = map[string]struct{}{
"getpwnam_r": {},
"getpwuid": {},
"getpwuid_r": {},
"getrandom": {},
"getresgid": {},
"getresuid": {},
"getrlimit": {},
@ -257,10 +274,12 @@ var CAPI = map[string]struct{}{
"ldexp": {},
"link": {},
"listen": {},
"localeconv": {},
"localtime": {},
"localtime_r": {},
"log": {},
"log10": {},
"longjmp": {},
"lrand48": {},
"lseek": {},
"lseek64": {},
@ -280,6 +299,7 @@ var CAPI = map[string]struct{}{
"mkdir": {},
"mkfifo": {},
"mknod": {},
"mkostemp": {},
"mkstemp": {},
"mkstemp64": {},
"mkstemps": {},
@ -310,14 +330,40 @@ var CAPI = map[string]struct{}{
"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": {},
"pwrite": {},
"qsort": {},
"raise": {},
"rand": {},
@ -330,6 +376,7 @@ var CAPI = map[string]struct{}{
"readlink": {},
"readv": {},
"realloc": {},
"reallocarray": {},
"realpath": {},
"recv": {},
"recvfrom": {},
@ -337,6 +384,7 @@ var CAPI = map[string]struct{}{
"remove": {},
"rename": {},
"rewind": {},
"rint": {},
"rmdir": {},
"round": {},
"scalbn": {},
@ -348,6 +396,7 @@ var CAPI = map[string]struct{}{
"sendto": {},
"setbuf": {},
"setenv": {},
"setjmp": {},
"setlocale": {},
"setrlimit": {},
"setrlimit64": {},
@ -383,6 +432,7 @@ var CAPI = map[string]struct{}{
"strcspn": {},
"strdup": {},
"strerror": {},
"strerror_r": {},
"strlcat": {},
"strlcpy": {},
"strlen": {},
@ -414,6 +464,7 @@ var CAPI = map[string]struct{}{
"tcsendbreak": {},
"tcsetattr": {},
"time": {},
"tmpfile": {},
"tolower": {},
"toupper": {},
"trunc": {},
@ -426,6 +477,10 @@ var CAPI = map[string]struct{}{
"usleep": {},
"utime": {},
"utimes": {},
"uuid_copy": {},
"uuid_generate_random": {},
"uuid_parse": {},
"uuid_unparse": {},
"vasprintf": {},
"vfprintf": {},
"vfscanf": {},

View file

@ -23,18 +23,23 @@ var CAPI = map[string]struct{}{
"__builtin_bswap16": {},
"__builtin_bswap32": {},
"__builtin_bswap64": {},
"__builtin_clz": {},
"__builtin_clzl": {},
"__builtin_clzll": {},
"__builtin_constant_p_impl": {},
"__builtin_copysign": {},
"__builtin_copysignf": {},
"__builtin_copysignl": {},
"__builtin_exit": {},
"__builtin_expect": {},
"__builtin_fabs": {},
"__builtin_free": {},
"__builtin_getentropy": {},
"__builtin_huge_val": {},
"__builtin_huge_valf": {},
"__builtin_inf": {},
"__builtin_inff": {},
"__builtin_infl": {},
"__builtin_isnan": {},
"__builtin_malloc": {},
"__builtin_memcmp": {},
@ -44,9 +49,12 @@ var CAPI = map[string]struct{}{
"__builtin_mul_overflowInt64": {},
"__builtin_mul_overflowUint128": {},
"__builtin_mul_overflowUint64": {},
"__builtin_nan": {},
"__builtin_nanf": {},
"__builtin_nanl": {},
"__builtin_object_size": {},
"__builtin_popcount": {},
"__builtin_popcountl": {},
"__builtin_prefetch": {},
"__builtin_printf": {},
"__builtin_snprintf": {},
@ -58,6 +66,7 @@ var CAPI = map[string]struct{}{
"__builtin_sub_overflowInt64": {},
"__builtin_trap": {},
"__builtin_unreachable": {},
"__ccgo_dmesg": {},
"__ccgo_getMutexType": {},
"__ccgo_in6addr_anyp": {},
"__ccgo_pthreadAttrGetDetachState": {},
@ -93,6 +102,9 @@ var CAPI = map[string]struct{}{
"__shgetc": {},
"__shlim": {},
"__strncasecmp_l": {},
"__sync_add_and_fetch_uint32": {},
"__sync_sub_and_fetch_uint32": {},
"__sync_synchronize": {},
"__syscall1": {},
"__syscall3": {},
"__syscall4": {},
@ -101,8 +113,10 @@ var CAPI = map[string]struct{}{
"__uflow": {},
"__unlockfile": {},
"_exit": {},
"_longjmp": {},
"_obstack_begin": {},
"_obstack_newchunk": {},
"_setjmp": {},
"abort": {},
"abs": {},
"accept": {},
@ -185,6 +199,7 @@ var CAPI = map[string]struct{}{
"fseek": {},
"fstat": {},
"fstat64": {},
"fstatfs": {},
"fsync": {},
"ftell": {},
"ftruncate": {},
@ -201,6 +216,7 @@ var CAPI = map[string]struct{}{
"getc": {},
"getcwd": {},
"getegid": {},
"getentropy": {},
"getenv": {},
"geteuid": {},
"getgid": {},
@ -222,6 +238,7 @@ var CAPI = map[string]struct{}{
"getpwnam_r": {},
"getpwuid": {},
"getpwuid_r": {},
"getrandom": {},
"getresgid": {},
"getresuid": {},
"getrlimit": {},
@ -257,10 +274,12 @@ var CAPI = map[string]struct{}{
"ldexp": {},
"link": {},
"listen": {},
"localeconv": {},
"localtime": {},
"localtime_r": {},
"log": {},
"log10": {},
"longjmp": {},
"lrand48": {},
"lseek": {},
"lseek64": {},
@ -280,6 +299,7 @@ var CAPI = map[string]struct{}{
"mkdir": {},
"mkfifo": {},
"mknod": {},
"mkostemp": {},
"mkstemp": {},
"mkstemp64": {},
"mkstemps": {},
@ -310,14 +330,40 @@ var CAPI = map[string]struct{}{
"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": {},
"pwrite": {},
"qsort": {},
"raise": {},
"rand": {},
@ -330,6 +376,7 @@ var CAPI = map[string]struct{}{
"readlink": {},
"readv": {},
"realloc": {},
"reallocarray": {},
"realpath": {},
"recv": {},
"recvfrom": {},
@ -337,6 +384,7 @@ var CAPI = map[string]struct{}{
"remove": {},
"rename": {},
"rewind": {},
"rint": {},
"rmdir": {},
"round": {},
"scalbn": {},
@ -348,6 +396,7 @@ var CAPI = map[string]struct{}{
"sendto": {},
"setbuf": {},
"setenv": {},
"setjmp": {},
"setlocale": {},
"setrlimit": {},
"setrlimit64": {},
@ -383,6 +432,7 @@ var CAPI = map[string]struct{}{
"strcspn": {},
"strdup": {},
"strerror": {},
"strerror_r": {},
"strlcat": {},
"strlcpy": {},
"strlen": {},
@ -414,6 +464,7 @@ var CAPI = map[string]struct{}{
"tcsendbreak": {},
"tcsetattr": {},
"time": {},
"tmpfile": {},
"tolower": {},
"toupper": {},
"trunc": {},
@ -426,6 +477,10 @@ var CAPI = map[string]struct{}{
"usleep": {},
"utime": {},
"utimes": {},
"uuid_copy": {},
"uuid_generate_random": {},
"uuid_parse": {},
"uuid_unparse": {},
"vasprintf": {},
"vfprintf": {},
"vfscanf": {},

View file

@ -23,18 +23,23 @@ var CAPI = map[string]struct{}{
"__builtin_bswap16": {},
"__builtin_bswap32": {},
"__builtin_bswap64": {},
"__builtin_clz": {},
"__builtin_clzl": {},
"__builtin_clzll": {},
"__builtin_constant_p_impl": {},
"__builtin_copysign": {},
"__builtin_copysignf": {},
"__builtin_copysignl": {},
"__builtin_exit": {},
"__builtin_expect": {},
"__builtin_fabs": {},
"__builtin_free": {},
"__builtin_getentropy": {},
"__builtin_huge_val": {},
"__builtin_huge_valf": {},
"__builtin_inf": {},
"__builtin_inff": {},
"__builtin_infl": {},
"__builtin_isnan": {},
"__builtin_malloc": {},
"__builtin_memcmp": {},
@ -44,9 +49,12 @@ var CAPI = map[string]struct{}{
"__builtin_mul_overflowInt64": {},
"__builtin_mul_overflowUint128": {},
"__builtin_mul_overflowUint64": {},
"__builtin_nan": {},
"__builtin_nanf": {},
"__builtin_nanl": {},
"__builtin_object_size": {},
"__builtin_popcount": {},
"__builtin_popcountl": {},
"__builtin_prefetch": {},
"__builtin_printf": {},
"__builtin_snprintf": {},
@ -58,6 +66,7 @@ var CAPI = map[string]struct{}{
"__builtin_sub_overflowInt64": {},
"__builtin_trap": {},
"__builtin_unreachable": {},
"__ccgo_dmesg": {},
"__ccgo_getMutexType": {},
"__ccgo_in6addr_anyp": {},
"__ccgo_pthreadAttrGetDetachState": {},
@ -93,6 +102,9 @@ var CAPI = map[string]struct{}{
"__shgetc": {},
"__shlim": {},
"__strncasecmp_l": {},
"__sync_add_and_fetch_uint32": {},
"__sync_sub_and_fetch_uint32": {},
"__sync_synchronize": {},
"__syscall1": {},
"__syscall3": {},
"__syscall4": {},
@ -101,8 +113,10 @@ var CAPI = map[string]struct{}{
"__uflow": {},
"__unlockfile": {},
"_exit": {},
"_longjmp": {},
"_obstack_begin": {},
"_obstack_newchunk": {},
"_setjmp": {},
"abort": {},
"abs": {},
"accept": {},
@ -185,6 +199,7 @@ var CAPI = map[string]struct{}{
"fseek": {},
"fstat": {},
"fstat64": {},
"fstatfs": {},
"fsync": {},
"ftell": {},
"ftruncate": {},
@ -201,6 +216,7 @@ var CAPI = map[string]struct{}{
"getc": {},
"getcwd": {},
"getegid": {},
"getentropy": {},
"getenv": {},
"geteuid": {},
"getgid": {},
@ -222,6 +238,7 @@ var CAPI = map[string]struct{}{
"getpwnam_r": {},
"getpwuid": {},
"getpwuid_r": {},
"getrandom": {},
"getresgid": {},
"getresuid": {},
"getrlimit": {},
@ -257,10 +274,12 @@ var CAPI = map[string]struct{}{
"ldexp": {},
"link": {},
"listen": {},
"localeconv": {},
"localtime": {},
"localtime_r": {},
"log": {},
"log10": {},
"longjmp": {},
"lrand48": {},
"lseek": {},
"lseek64": {},
@ -280,6 +299,7 @@ var CAPI = map[string]struct{}{
"mkdir": {},
"mkfifo": {},
"mknod": {},
"mkostemp": {},
"mkstemp": {},
"mkstemp64": {},
"mkstemps": {},
@ -310,14 +330,40 @@ var CAPI = map[string]struct{}{
"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": {},
"pwrite": {},
"qsort": {},
"raise": {},
"rand": {},
@ -330,6 +376,7 @@ var CAPI = map[string]struct{}{
"readlink": {},
"readv": {},
"realloc": {},
"reallocarray": {},
"realpath": {},
"recv": {},
"recvfrom": {},
@ -337,6 +384,7 @@ var CAPI = map[string]struct{}{
"remove": {},
"rename": {},
"rewind": {},
"rint": {},
"rmdir": {},
"round": {},
"scalbn": {},
@ -348,6 +396,7 @@ var CAPI = map[string]struct{}{
"sendto": {},
"setbuf": {},
"setenv": {},
"setjmp": {},
"setlocale": {},
"setrlimit": {},
"setrlimit64": {},
@ -383,6 +432,7 @@ var CAPI = map[string]struct{}{
"strcspn": {},
"strdup": {},
"strerror": {},
"strerror_r": {},
"strlcat": {},
"strlcpy": {},
"strlen": {},
@ -414,6 +464,7 @@ var CAPI = map[string]struct{}{
"tcsendbreak": {},
"tcsetattr": {},
"time": {},
"tmpfile": {},
"tolower": {},
"toupper": {},
"trunc": {},
@ -426,6 +477,7 @@ var CAPI = map[string]struct{}{
"usleep": {},
"utime": {},
"utimes": {},
"uuid_copy": {},
"uuid_generate_random": {},
"uuid_parse": {},
"uuid_unparse": {},

475
vendor/modernc.org/libc/capi_netbsd_amd64.go generated vendored Normal file
View file

@ -0,0 +1,475 @@
// Code generated by 'go generate' - DO NOT EDIT.
package libc // import "modernc.org/libc"
var CAPI = map[string]struct{}{
"_C_ctype_tab_": {},
"_IO_putc": {},
"_ThreadRuneLocale": {},
"___errno_location": {},
"___runetype": {},
"__assert": {},
"__assert13": {},
"__assert_fail": {},
"__builtin___memcpy_chk": {},
"__builtin___memmove_chk": {},
"__builtin___memset_chk": {},
"__builtin___snprintf_chk": {},
"__builtin___sprintf_chk": {},
"__builtin___strcat_chk": {},
"__builtin___strcpy_chk": {},
"__builtin___strncpy_chk": {},
"__builtin___vsnprintf_chk": {},
"__builtin_abort": {},
"__builtin_abs": {},
"__builtin_add_overflowInt64": {},
"__builtin_add_overflowUint32": {},
"__builtin_add_overflowUint64": {},
"__builtin_bswap16": {},
"__builtin_bswap32": {},
"__builtin_bswap64": {},
"__builtin_clz": {},
"__builtin_clzl": {},
"__builtin_clzll": {},
"__builtin_constant_p_impl": {},
"__builtin_copysign": {},
"__builtin_copysignf": {},
"__builtin_copysignl": {},
"__builtin_exit": {},
"__builtin_expect": {},
"__builtin_fabs": {},
"__builtin_free": {},
"__builtin_getentropy": {},
"__builtin_huge_val": {},
"__builtin_huge_valf": {},
"__builtin_inf": {},
"__builtin_inff": {},
"__builtin_infl": {},
"__builtin_isnan": {},
"__builtin_malloc": {},
"__builtin_memcmp": {},
"__builtin_memcpy": {},
"__builtin_memset": {},
"__builtin_mmap": {},
"__builtin_mul_overflowInt64": {},
"__builtin_mul_overflowUint128": {},
"__builtin_mul_overflowUint64": {},
"__builtin_nan": {},
"__builtin_nanf": {},
"__builtin_nanl": {},
"__builtin_object_size": {},
"__builtin_popcount": {},
"__builtin_popcountl": {},
"__builtin_prefetch": {},
"__builtin_printf": {},
"__builtin_snprintf": {},
"__builtin_sprintf": {},
"__builtin_strchr": {},
"__builtin_strcmp": {},
"__builtin_strcpy": {},
"__builtin_strlen": {},
"__builtin_sub_overflowInt64": {},
"__builtin_trap": {},
"__builtin_unreachable": {},
"__ccgo_dmesg": {},
"__ccgo_getMutexType": {},
"__ccgo_in6addr_anyp": {},
"__ccgo_pthreadAttrGetDetachState": {},
"__ccgo_pthreadMutexattrGettype": {},
"__ccgo_sqlite3_log": {},
"__cmsg_nxthdr": {},
"__ctype_get_mb_cur_max": {},
"__errno": {},
"__errno_location": {},
"__error": {},
"__floatscan": {},
"__h_errno_location": {},
"__inet_aton": {},
"__inet_ntoa": {},
"__intscan": {},
"__isalnum_l": {},
"__isalpha_l": {},
"__isdigit_l": {},
"__isnan": {},
"__isnanf": {},
"__isnanl": {},
"__isoc99_sscanf": {},
"__isthreaded": {},
"__lookup_ipliteral": {},
"__lookup_name": {},
"__lookup_serv": {},
"__mb_sb_limit": {},
"__runes_for_locale": {},
"__sF": {},
"__shgetc": {},
"__shlim": {},
"__stderrp": {},
"__stdinp": {},
"__stdoutp": {},
"__swbuf": {},
"__sync_add_and_fetch_uint32": {},
"__sync_sub_and_fetch_uint32": {},
"__sync_synchronize": {},
"__syscall1": {},
"__syscall3": {},
"__syscall4": {},
"__toread": {},
"__toread_needs_stdio_exit": {},
"__uflow": {},
"__xuname": {},
"_ctype_tab_": {},
"_exit": {},
"_longjmp": {},
"_obstack_begin": {},
"_obstack_newchunk": {},
"_setjmp": {},
"_tolower_tab_": {},
"_toupper_tab_": {},
"abort": {},
"abs": {},
"accept": {},
"access": {},
"acos": {},
"acosh": {},
"alarm": {},
"asin": {},
"asinh": {},
"atan": {},
"atan2": {},
"atanh": {},
"atexit": {},
"atof": {},
"atoi": {},
"atol": {},
"backtrace": {},
"backtrace_symbols_fd": {},
"bind": {},
"calloc": {},
"ceil": {},
"ceilf": {},
"cfgetospeed": {},
"cfsetispeed": {},
"cfsetospeed": {},
"chdir": {},
"chflags": {},
"chmod": {},
"chown": {},
"clock_gettime": {},
"close": {},
"closedir": {},
"confstr": {},
"connect": {},
"copysign": {},
"copysignf": {},
"copysignl": {},
"cos": {},
"cosf": {},
"cosh": {},
"ctime": {},
"ctime_r": {},
"dlclose": {},
"dlerror": {},
"dlopen": {},
"dlsym": {},
"dup2": {},
"endpwent": {},
"environ": {},
"execvp": {},
"exit": {},
"exp": {},
"fabs": {},
"fabsf": {},
"fabsl": {},
"fchmod": {},
"fchown": {},
"fclose": {},
"fcntl": {},
"fcntl64": {},
"fdopen": {},
"ferror": {},
"fflush": {},
"fgetc": {},
"fgets": {},
"fileno": {},
"floor": {},
"fmod": {},
"fmodl": {},
"fopen": {},
"fopen64": {},
"fork": {},
"fprintf": {},
"fputc": {},
"fputs": {},
"fread": {},
"free": {},
"freeaddrinfo": {},
"frexp": {},
"fscanf": {},
"fseek": {},
"fstat": {},
"fstat64": {},
"fsync": {},
"ftell": {},
"ftruncate": {},
"fts64_close": {},
"fts64_open": {},
"fts64_read": {},
"fts_close": {},
"fts_open": {},
"fts_read": {},
"fwrite": {},
"gai_strerror": {},
"getaddrinfo": {},
"getc": {},
"getcwd": {},
"getegid": {},
"getentropy": {},
"getenv": {},
"geteuid": {},
"getgid": {},
"getgrgid": {},
"getgrgid_r": {},
"getgrnam": {},
"getgrnam_r": {},
"gethostbyaddr": {},
"gethostbyaddr_r": {},
"gethostbyname": {},
"gethostbyname2": {},
"gethostbyname2_r": {},
"gethostname": {},
"getnameinfo": {},
"getpeername": {},
"getpid": {},
"getpwnam": {},
"getpwnam_r": {},
"getpwuid": {},
"getpwuid_r": {},
"getresgid": {},
"getresuid": {},
"getrlimit": {},
"getrlimit64": {},
"getrusage": {},
"getservbyname": {},
"getsockname": {},
"getsockopt": {},
"gettimeofday": {},
"getuid": {},
"gmtime_r": {},
"h_errno": {},
"htonl": {},
"htons": {},
"hypot": {},
"inet_ntoa": {},
"inet_ntop": {},
"inet_pton": {},
"ioctl": {},
"isalnum": {},
"isalpha": {},
"isatty": {},
"isdigit": {},
"isnan": {},
"isnanf": {},
"isnanl": {},
"kill": {},
"ldexp": {},
"link": {},
"listen": {},
"localtime": {},
"localtime_r": {},
"log": {},
"log10": {},
"longjmp": {},
"lrand48": {},
"lseek": {},
"lseek64": {},
"lstat": {},
"lstat64": {},
"malloc": {},
"mblen": {},
"mbstowcs": {},
"mbtowc": {},
"memchr": {},
"memcmp": {},
"memcpy": {},
"memmove": {},
"memset": {},
"mkdir": {},
"mkfifo": {},
"mknod": {},
"mkstemp": {},
"mkstemp64": {},
"mkstemps": {},
"mkstemps64": {},
"mktime": {},
"mmap": {},
"modf": {},
"munmap": {},
"nl_langinfo": {},
"ntohs": {},
"obstack_free": {},
"obstack_vprintf": {},
"open": {},
"open64": {},
"opendir": {},
"openpty": {},
"pathconf": {},
"pause": {},
"pclose": {},
"perror": {},
"pipe": {},
"poll": {},
"popen": {},
"pow": {},
"printf": {},
"pselect": {},
"pthread_attr_destroy": {},
"pthread_attr_getdetachstate": {},
"pthread_attr_init": {},
"pthread_attr_setdetachstate": {},
"pthread_attr_setscope": {},
"pthread_attr_setstacksize": {},
"pthread_cond_broadcast": {},
"pthread_cond_destroy": {},
"pthread_cond_init": {},
"pthread_cond_signal": {},
"pthread_cond_timedwait": {},
"pthread_cond_wait": {},
"pthread_create": {},
"pthread_detach": {},
"pthread_equal": {},
"pthread_exit": {},
"pthread_getspecific": {},
"pthread_join": {},
"pthread_key_create": {},
"pthread_key_delete": {},
"pthread_mutex_destroy": {},
"pthread_mutex_init": {},
"pthread_mutex_lock": {},
"pthread_mutex_trylock": {},
"pthread_mutex_unlock": {},
"pthread_mutexattr_destroy": {},
"pthread_mutexattr_init": {},
"pthread_mutexattr_settype": {},
"pthread_self": {},
"pthread_setspecific": {},
"putc": {},
"putchar": {},
"puts": {},
"qsort": {},
"raise": {},
"rand": {},
"random": {},
"read": {},
"readdir": {},
"readdir64": {},
"readlink": {},
"readv": {},
"realloc": {},
"reallocarray": {},
"realpath": {},
"recv": {},
"recvfrom": {},
"recvmsg": {},
"remove": {},
"rename": {},
"rewind": {},
"rint": {},
"rmdir": {},
"round": {},
"scalbn": {},
"scalbnl": {},
"sched_yield": {},
"select": {},
"send": {},
"sendmsg": {},
"sendto": {},
"setbuf": {},
"setenv": {},
"setjmp": {},
"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": {},
"strlen": {},
"strncmp": {},
"strncpy": {},
"strnlen": {},
"strpbrk": {},
"strrchr": {},
"strspn": {},
"strstr": {},
"strtod": {},
"strtof": {},
"strtoimax": {},
"strtol": {},
"strtold": {},
"strtoll": {},
"strtoul": {},
"strtoull": {},
"strtoumax": {},
"symlink": {},
"sysconf": {},
"system": {},
"tan": {},
"tanh": {},
"tcgetattr": {},
"tcsendbreak": {},
"tcsetattr": {},
"time": {},
"tmpfile": {},
"tolower": {},
"toupper": {},
"trunc": {},
"tzset": {},
"umask": {},
"uname": {},
"ungetc": {},
"unlink": {},
"unsetenv": {},
"usleep": {},
"utime": {},
"utimes": {},
"vasprintf": {},
"vfprintf": {},
"vprintf": {},
"vsnprintf": {},
"vsprintf": {},
"waitpid": {},
"wcschr": {},
"wctomb": {},
"wcwidth": {},
"write": {},
"writev": {},
"zero_struct_address": {},
}

View file

@ -103,6 +103,7 @@ var CAPI = map[string]struct{}{
"GetMessageW": {},
"GetModuleFileNameA": {},
"GetModuleFileNameW": {},
"GetModuleHandleA": {},
"GetModuleHandleW": {},
"GetNamedSecurityInfoW": {},
"GetOverlappedResult": {},
@ -271,18 +272,23 @@ var CAPI = map[string]struct{}{
"__builtin_bswap16": {},
"__builtin_bswap32": {},
"__builtin_bswap64": {},
"__builtin_clz": {},
"__builtin_clzl": {},
"__builtin_clzll": {},
"__builtin_constant_p_impl": {},
"__builtin_copysign": {},
"__builtin_copysignf": {},
"__builtin_copysignl": {},
"__builtin_exit": {},
"__builtin_expect": {},
"__builtin_fabs": {},
"__builtin_free": {},
"__builtin_getentropy": {},
"__builtin_huge_val": {},
"__builtin_huge_valf": {},
"__builtin_inf": {},
"__builtin_inff": {},
"__builtin_infl": {},
"__builtin_isnan": {},
"__builtin_malloc": {},
"__builtin_memcmp": {},
@ -293,9 +299,12 @@ var CAPI = map[string]struct{}{
"__builtin_mul_overflowInt64": {},
"__builtin_mul_overflowUint128": {},
"__builtin_mul_overflowUint64": {},
"__builtin_nan": {},
"__builtin_nanf": {},
"__builtin_nanl": {},
"__builtin_object_size": {},
"__builtin_popcount": {},
"__builtin_popcountl": {},
"__builtin_prefetch": {},
"__builtin_printf": {},
"__builtin_snprintf": {},
@ -308,9 +317,12 @@ var CAPI = map[string]struct{}{
"__builtin_sub_overflowInt64": {},
"__builtin_trap": {},
"__builtin_unreachable": {},
"__ccgo_dmesg": {},
"__ccgo_getMutexType": {},
"__ccgo_in6addr_anyp": {},
"__ccgo_pthreadAttrGetDetachState": {},
"__ccgo_pthreadMutexattrGettype": {},
"__ccgo_sqlite3_log": {},
"__ctype_b_loc": {},
"__ctype_get_mb_cur_max": {},
"__env_rm_add": {},
"__errno_location": {},
@ -330,6 +342,7 @@ var CAPI = map[string]struct{}{
"__mingw_vfscanf": {},
"__mingw_vfwprintf": {},
"__mingw_vfwscanf": {},
"__mingw_vprintf": {},
"__mingw_vsnprintf": {},
"__mingw_vsnwprintf": {},
"__mingw_vsprintf": {},
@ -344,6 +357,9 @@ var CAPI = map[string]struct{}{
"__ms_vwscanf": {},
"__putenv": {},
"__strchrnul": {},
"__sync_add_and_fetch_uint32": {},
"__sync_sub_and_fetch_uint32": {},
"__sync_synchronize": {},
"_access": {},
"_assert": {},
"_beginthread": {},
@ -366,12 +382,17 @@ var CAPI = map[string]struct{}{
"_fstat64": {},
"_fstati64": {},
"_ftime": {},
"_ftime64": {},
"_gmtime32": {},
"_gmtime64": {},
"_imp___environ": {},
"_iob": {},
"_isatty": {},
"_localtime32": {},
"_localtime64": {},
"_longjmp": {},
"_mkdir": {},
"_mktime64": {},
"_msize": {},
"_obstack_begin": {},
"_obstack_newchunk": {},
@ -379,6 +400,7 @@ var CAPI = map[string]struct{}{
"_popen": {},
"_putchar": {},
"_set_abort_behavior": {},
"_setjmp": {},
"_setmode": {},
"_snprintf": {},
"_snwprintf": {},
@ -477,9 +499,11 @@ var CAPI = map[string]struct{}{
"fts_read": {},
"fwrite": {},
"gai_strerror": {},
"gai_strerrorA": {},
"gai_strerrorW": {},
"getc": {},
"getcwd": {},
"getentropy": {},
"getenv": {},
"gethostname": {},
"getpeername": {},
@ -498,7 +522,6 @@ var CAPI = map[string]struct{}{
"htons": {},
"hypot": {},
"inet_ntoa": {},
"initstate_r": {},
"ioctl": {},
"ioctlsocket": {},
"isalnum": {},
@ -520,6 +543,7 @@ var CAPI = map[string]struct{}{
"localtime_r": {},
"log": {},
"log10": {},
"longjmp": {},
"lseek": {},
"lseek64": {},
"lstat": {},
@ -558,7 +582,6 @@ var CAPI = map[string]struct{}{
"perror": {},
"pipe": {},
"popen": {},
"posix_fadvise": {},
"pow": {},
"printf": {},
"pselect": {},
@ -570,22 +593,25 @@ var CAPI = map[string]struct{}{
"raise": {},
"rand": {},
"random": {},
"random_r": {},
"read": {},
"readdir": {},
"readlink": {},
"readv": {},
"realloc": {},
"reallocarray": {},
"realpath": {},
"recv": {},
"rename": {},
"rewind": {},
"rint": {},
"rmdir": {},
"round": {},
"sched_yield": {},
"select": {},
"send": {},
"setbuf": {},
"setenv": {},
"setjmp": {},
"setlocale": {},
"setmode": {},
"setrlimit": {},

View file

@ -103,6 +103,7 @@ var CAPI = map[string]struct{}{
"GetMessageW": {},
"GetModuleFileNameA": {},
"GetModuleFileNameW": {},
"GetModuleHandleA": {},
"GetModuleHandleW": {},
"GetNamedSecurityInfoW": {},
"GetOverlappedResult": {},
@ -269,18 +270,23 @@ var CAPI = map[string]struct{}{
"__builtin_bswap16": {},
"__builtin_bswap32": {},
"__builtin_bswap64": {},
"__builtin_clz": {},
"__builtin_clzl": {},
"__builtin_clzll": {},
"__builtin_constant_p_impl": {},
"__builtin_copysign": {},
"__builtin_copysignf": {},
"__builtin_copysignl": {},
"__builtin_exit": {},
"__builtin_expect": {},
"__builtin_fabs": {},
"__builtin_free": {},
"__builtin_getentropy": {},
"__builtin_huge_val": {},
"__builtin_huge_valf": {},
"__builtin_inf": {},
"__builtin_inff": {},
"__builtin_infl": {},
"__builtin_isnan": {},
"__builtin_malloc": {},
"__builtin_memcmp": {},
@ -291,9 +297,12 @@ var CAPI = map[string]struct{}{
"__builtin_mul_overflowInt64": {},
"__builtin_mul_overflowUint128": {},
"__builtin_mul_overflowUint64": {},
"__builtin_nan": {},
"__builtin_nanf": {},
"__builtin_nanl": {},
"__builtin_object_size": {},
"__builtin_popcount": {},
"__builtin_popcountl": {},
"__builtin_prefetch": {},
"__builtin_printf": {},
"__builtin_snprintf": {},
@ -306,9 +315,12 @@ var CAPI = map[string]struct{}{
"__builtin_sub_overflowInt64": {},
"__builtin_trap": {},
"__builtin_unreachable": {},
"__ccgo_dmesg": {},
"__ccgo_getMutexType": {},
"__ccgo_in6addr_anyp": {},
"__ccgo_pthreadAttrGetDetachState": {},
"__ccgo_pthreadMutexattrGettype": {},
"__ccgo_sqlite3_log": {},
"__ctype_b_loc": {},
"__ctype_get_mb_cur_max": {},
"__env_rm_add": {},
"__errno_location": {},
@ -328,6 +340,7 @@ var CAPI = map[string]struct{}{
"__mingw_vfscanf": {},
"__mingw_vfwprintf": {},
"__mingw_vfwscanf": {},
"__mingw_vprintf": {},
"__mingw_vsnprintf": {},
"__mingw_vsnwprintf": {},
"__mingw_vsprintf": {},
@ -342,6 +355,9 @@ var CAPI = map[string]struct{}{
"__ms_vwscanf": {},
"__putenv": {},
"__strchrnul": {},
"__sync_add_and_fetch_uint32": {},
"__sync_sub_and_fetch_uint32": {},
"__sync_synchronize": {},
"_access": {},
"_assert": {},
"_beginthread": {},
@ -364,10 +380,15 @@ var CAPI = map[string]struct{}{
"_fstat64": {},
"_fstati64": {},
"_ftime": {},
"_ftime64": {},
"_gmtime64": {},
"_imp___environ": {},
"_iob": {},
"_isatty": {},
"_localtime64": {},
"_longjmp": {},
"_mkdir": {},
"_mktime64": {},
"_msize": {},
"_obstack_begin": {},
"_obstack_newchunk": {},
@ -375,6 +396,7 @@ var CAPI = map[string]struct{}{
"_popen": {},
"_putchar": {},
"_set_abort_behavior": {},
"_setjmp": {},
"_setmode": {},
"_snprintf": {},
"_snwprintf": {},
@ -473,9 +495,11 @@ var CAPI = map[string]struct{}{
"fts_read": {},
"fwrite": {},
"gai_strerror": {},
"gai_strerrorA": {},
"gai_strerrorW": {},
"getc": {},
"getcwd": {},
"getentropy": {},
"getenv": {},
"gethostname": {},
"getpeername": {},
@ -494,7 +518,6 @@ var CAPI = map[string]struct{}{
"htons": {},
"hypot": {},
"inet_ntoa": {},
"initstate_r": {},
"ioctl": {},
"ioctlsocket": {},
"isalnum": {},
@ -516,6 +539,7 @@ var CAPI = map[string]struct{}{
"localtime_r": {},
"log": {},
"log10": {},
"longjmp": {},
"lseek": {},
"lseek64": {},
"lstat": {},
@ -554,7 +578,6 @@ var CAPI = map[string]struct{}{
"perror": {},
"pipe": {},
"popen": {},
"posix_fadvise": {},
"pow": {},
"printf": {},
"pselect": {},
@ -566,22 +589,25 @@ var CAPI = map[string]struct{}{
"raise": {},
"rand": {},
"random": {},
"random_r": {},
"read": {},
"readdir": {},
"readlink": {},
"readv": {},
"realloc": {},
"reallocarray": {},
"realpath": {},
"recv": {},
"rename": {},
"rewind": {},
"rint": {},
"rmdir": {},
"round": {},
"sched_yield": {},
"select": {},
"send": {},
"setbuf": {},
"setenv": {},
"setjmp": {},
"setlocale": {},
"setmode": {},
"setrlimit": {},

128
vendor/modernc.org/libc/ccgo.go generated vendored
View file

@ -967,306 +967,306 @@ func BoolUint64(b bool) uint64 {
}
func SetBitFieldPtr8Int8(p uintptr, v int8, off int, mask uint8) {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
}
func SetBitFieldPtr8Int16(p uintptr, v int16, off int, mask uint8) {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
}
func SetBitFieldPtr8Int32(p uintptr, v int32, off int, mask uint8) {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
}
func SetBitFieldPtr8Int64(p uintptr, v int64, off int, mask uint8) {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
}
func SetBitFieldPtr8Uint8(p uintptr, v uint8, off int, mask uint8) {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
}
func SetBitFieldPtr8Uint16(p uintptr, v uint16, off int, mask uint8) {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
}
func SetBitFieldPtr8Uint32(p uintptr, v uint32, off int, mask uint8) {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
}
func SetBitFieldPtr8Uint64(p uintptr, v uint64, off int, mask uint8) {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
}
func SetBitFieldPtr16Int8(p uintptr, v int8, off int, mask uint16) {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
}
func SetBitFieldPtr16Int16(p uintptr, v int16, off int, mask uint16) {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
}
func SetBitFieldPtr16Int32(p uintptr, v int32, off int, mask uint16) {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
}
func SetBitFieldPtr16Int64(p uintptr, v int64, off int, mask uint16) {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
}
func SetBitFieldPtr16Uint8(p uintptr, v uint8, off int, mask uint16) {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
}
func SetBitFieldPtr16Uint16(p uintptr, v uint16, off int, mask uint16) {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
}
func SetBitFieldPtr16Uint32(p uintptr, v uint32, off int, mask uint16) {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
}
func SetBitFieldPtr16Uint64(p uintptr, v uint64, off int, mask uint16) {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
}
func SetBitFieldPtr32Int8(p uintptr, v int8, off int, mask uint32) {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
}
func SetBitFieldPtr32Int16(p uintptr, v int16, off int, mask uint32) {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
}
func SetBitFieldPtr32Int32(p uintptr, v int32, off int, mask uint32) {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
}
func SetBitFieldPtr32Int64(p uintptr, v int64, off int, mask uint32) {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
}
func SetBitFieldPtr32Uint8(p uintptr, v uint8, off int, mask uint32) {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
}
func SetBitFieldPtr32Uint16(p uintptr, v uint16, off int, mask uint32) {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
}
func SetBitFieldPtr32Uint32(p uintptr, v uint32, off int, mask uint32) {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
}
func SetBitFieldPtr32Uint64(p uintptr, v uint64, off int, mask uint32) {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
}
func SetBitFieldPtr64Int8(p uintptr, v int8, off int, mask uint64) {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
}
func SetBitFieldPtr64Int16(p uintptr, v int16, off int, mask uint64) {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
}
func SetBitFieldPtr64Int32(p uintptr, v int32, off int, mask uint64) {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
}
func SetBitFieldPtr64Int64(p uintptr, v int64, off int, mask uint64) {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
}
func SetBitFieldPtr64Uint8(p uintptr, v uint8, off int, mask uint64) {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
}
func SetBitFieldPtr64Uint16(p uintptr, v uint16, off int, mask uint64) {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
}
func SetBitFieldPtr64Uint32(p uintptr, v uint32, off int, mask uint64) {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
}
func SetBitFieldPtr64Uint64(p uintptr, v uint64, off int, mask uint64) {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
}
func AssignBitFieldPtr8Int8(p uintptr, v int8, w, off int, mask uint8) int8 {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
s := 8 - w
return v << s >> s
}
func AssignBitFieldPtr8Int16(p uintptr, v int16, w, off int, mask uint8) int16 {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
s := 16 - w
return v << s >> s
}
func AssignBitFieldPtr8Int32(p uintptr, v int32, w, off int, mask uint8) int32 {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
s := 32 - w
return v << s >> s
}
func AssignBitFieldPtr8Int64(p uintptr, v int64, w, off int, mask uint8) int64 {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
s := 64 - w
return v << s >> s
}
func AssignBitFieldPtr16Int8(p uintptr, v int8, w, off int, mask uint16) int8 {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
s := 8 - w
return v << s >> s
}
func AssignBitFieldPtr16Int16(p uintptr, v int16, w, off int, mask uint16) int16 {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
s := 16 - w
return v << s >> s
}
func AssignBitFieldPtr16Int32(p uintptr, v int32, w, off int, mask uint16) int32 {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
s := 32 - w
return v << s >> s
}
func AssignBitFieldPtr16Int64(p uintptr, v int64, w, off int, mask uint16) int64 {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
s := 64 - w
return v << s >> s
}
func AssignBitFieldPtr32Int8(p uintptr, v int8, w, off int, mask uint32) int8 {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
s := 8 - w
return v << s >> s
}
func AssignBitFieldPtr32Int16(p uintptr, v int16, w, off int, mask uint32) int16 {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
s := 16 - w
return v << s >> s
}
func AssignBitFieldPtr32Int32(p uintptr, v int32, w, off int, mask uint32) int32 {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
s := 32 - w
return v << s >> s
}
func AssignBitFieldPtr32Int64(p uintptr, v int64, w, off int, mask uint32) int64 {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
s := 64 - w
return v << s >> s
}
func AssignBitFieldPtr64Int8(p uintptr, v int8, w, off int, mask uint64) int8 {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
s := 8 - w
return v << s >> s
}
func AssignBitFieldPtr64Int16(p uintptr, v int16, w, off int, mask uint64) int16 {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
s := 16 - w
return v << s >> s
}
func AssignBitFieldPtr64Int32(p uintptr, v int32, w, off int, mask uint64) int32 {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
s := 32 - w
return v << s >> s
}
func AssignBitFieldPtr64Int64(p uintptr, v int64, w, off int, mask uint64) int64 {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
s := 64 - w
return v << s >> s
}
func AssignBitFieldPtr8Uint8(p uintptr, v uint8, w, off int, mask uint8) uint8 {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
return v & uint8(mask>>off)
}
func AssignBitFieldPtr8Uint16(p uintptr, v uint16, w, off int, mask uint8) uint16 {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
return v & uint16(mask>>off)
}
func AssignBitFieldPtr8Uint32(p uintptr, v uint32, w, off int, mask uint8) uint32 {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
return v & uint32(mask>>off)
}
func AssignBitFieldPtr8Uint64(p uintptr, v uint64, w, off int, mask uint8) uint64 {
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v<<off)&mask
*(*uint8)(unsafe.Pointer(p)) = *(*uint8)(unsafe.Pointer(p))&^uint8(mask) | uint8(v)<<off&mask
return v & uint64(mask>>off)
}
func AssignBitFieldPtr16Uint8(p uintptr, v uint8, w, off int, mask uint16) uint8 {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
return v & uint8(mask>>off)
}
func AssignBitFieldPtr16Uint16(p uintptr, v uint16, w, off int, mask uint16) uint16 {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
return v & uint16(mask>>off)
}
func AssignBitFieldPtr16Uint32(p uintptr, v uint32, w, off int, mask uint16) uint32 {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
return v & uint32(mask>>off)
}
func AssignBitFieldPtr16Uint64(p uintptr, v uint64, w, off int, mask uint16) uint64 {
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v<<off)&mask
*(*uint16)(unsafe.Pointer(p)) = *(*uint16)(unsafe.Pointer(p))&^uint16(mask) | uint16(v)<<off&mask
return v & uint64(mask>>off)
}
func AssignBitFieldPtr32Uint8(p uintptr, v uint8, w, off int, mask uint32) uint8 {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
return v & uint8(mask>>off)
}
func AssignBitFieldPtr32Uint16(p uintptr, v uint16, w, off int, mask uint32) uint16 {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
return v & uint16(mask>>off)
}
func AssignBitFieldPtr32Uint32(p uintptr, v uint32, w, off int, mask uint32) uint32 {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
return v & uint32(mask>>off)
}
func AssignBitFieldPtr32Uint64(p uintptr, v uint64, w, off int, mask uint32) uint64 {
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v<<off)&mask
*(*uint32)(unsafe.Pointer(p)) = *(*uint32)(unsafe.Pointer(p))&^uint32(mask) | uint32(v)<<off&mask
return v & uint64(mask>>off)
}
func AssignBitFieldPtr64Uint8(p uintptr, v uint8, w, off int, mask uint64) uint8 {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
return v & uint8(mask>>off)
}
func AssignBitFieldPtr64Uint16(p uintptr, v uint16, w, off int, mask uint64) uint16 {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
return v & uint16(mask>>off)
}
func AssignBitFieldPtr64Uint32(p uintptr, v uint32, w, off int, mask uint64) uint32 {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
return v & uint32(mask>>off)
}
func AssignBitFieldPtr64Uint64(p uintptr, v uint64, w, off int, mask uint64) uint64 {
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v<<off)&mask
*(*uint64)(unsafe.Pointer(p)) = *(*uint64)(unsafe.Pointer(p))&^uint64(mask) | uint64(v)<<off&mask
return v & uint64(mask>>off)
}

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT.
package errno

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_arm64.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_arm64.go -pkgname errno', DO NOT EDIT.
package errno

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_386.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_386.go -pkgname errno', DO NOT EDIT.
package errno

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_amd64.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_amd64.go -pkgname errno', DO NOT EDIT.
package errno

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm.go -pkgname errno', DO NOT EDIT.
package errno

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm64.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm64.go -pkgname errno', DO NOT EDIT.
package errno

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_s390x.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_s390x.go -pkgname errno', DO NOT EDIT.
package errno

5
vendor/modernc.org/libc/errno/capi_netbsd_amd64.go generated vendored Normal file
View 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 -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_netbsd_amd64.go -pkgname errno', DO NOT EDIT.
package errno
var CAPI = map[string]struct{}{}

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT.
package errno

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_windows_amd64.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno\errno_windows_amd64.go -pkgname errno', DO NOT EDIT.
package errno

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_amd64.go -pkgname errno', DO NOT EDIT.
package errno

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_arm64.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_darwin_arm64.go -pkgname errno', DO NOT EDIT.
package errno

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_386.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_386.go -pkgname errno', DO NOT EDIT.
package errno
@ -157,6 +157,7 @@ const (
X_ERRNO_H = 1
X_FEATURES_H = 1
X_FILE_OFFSET_BITS = 64
X_ILP32 = 1
X_POSIX_C_SOURCE = 200809
X_POSIX_SOURCE = 1
X_STDC_PREDEF_H = 1

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_amd64.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_amd64.go -pkgname errno', DO NOT EDIT.
package errno

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm.go -pkgname errno', DO NOT EDIT.
package errno
@ -174,4 +174,4 @@ 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: */
var _ uint8 /* gen.c:2:13: */

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm64.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_arm64.go -pkgname errno', DO NOT EDIT.
package errno
@ -184,4 +184,4 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
var _ int8 /* gen.c:2:13: */
var _ uint8 /* gen.c:2:13: */

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_s390x.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_linux_s390x.go -pkgname errno', DO NOT EDIT.
package errno
@ -184,4 +184,4 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
var _ int8 /* gen.c:2:13: */
var _ uint8 /* gen.c:2:13: */

144
vendor/modernc.org/libc/errno/errno_netbsd_amd64.go generated vendored Normal file
View file

@ -0,0 +1,144 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_netbsd_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
EBADF = 9
EBADMSG = 88
EBADRPC = 72
EBUSY = 16
ECANCELED = 87
ECHILD = 10
ECONNABORTED = 53
ECONNREFUSED = 61
ECONNRESET = 54
EDEADLK = 11
EDESTADDRREQ = 39
EDOM = 33
EDQUOT = 69
EEXIST = 17
EFAULT = 14
EFBIG = 27
EFTYPE = 79
EHOSTDOWN = 64
EHOSTUNREACH = 65
EIDRM = 82
EILSEQ = 85
EINPROGRESS = 36
EINTR = 4
EINVAL = 22
EIO = 5
EISCONN = 56
EISDIR = 21
ELAST = 96
ELOOP = 62
EMFILE = 24
EMLINK = 31
EMSGSIZE = 40
EMULTIHOP = 94
ENAMETOOLONG = 63
ENEEDAUTH = 81
ENETDOWN = 50
ENETRESET = 52
ENETUNREACH = 51
ENFILE = 23
ENOATTR = 93
ENOBUFS = 55
ENODATA = 89
ENODEV = 19
ENOENT = 2
ENOEXEC = 8
ENOLCK = 77
ENOLINK = 95
ENOMEM = 12
ENOMSG = 83
ENOPROTOOPT = 42
ENOSPC = 28
ENOSR = 90
ENOSTR = 91
ENOSYS = 78
ENOTBLK = 15
ENOTCONN = 57
ENOTDIR = 20
ENOTEMPTY = 66
ENOTSOCK = 38
ENOTSUP = 86
ENOTTY = 25
ENXIO = 6
EOPNOTSUPP = 45
EOVERFLOW = 84
EPERM = 1
EPFNOSUPPORT = 46
EPIPE = 32
EPROCLIM = 67
EPROCUNAVAIL = 76
EPROGMISMATCH = 75
EPROGUNAVAIL = 74
EPROTO = 96
EPROTONOSUPPORT = 43
EPROTOTYPE = 41
ERANGE = 34
EREMOTE = 71
EROFS = 30
ERPCMISMATCH = 73
ESHUTDOWN = 58
ESOCKTNOSUPPORT = 44
ESPIPE = 29
ESRCH = 3
ESTALE = 70
ETIME = 92
ETIMEDOUT = 60
ETOOMANYREFS = 59
ETXTBSY = 26
EUSERS = 68
EWOULDBLOCK = 35
EXDEV = 18
X_ERRNO_H_ = 0
X_FILE_OFFSET_BITS = 64
X_LP64 = 1
X_NETBSD_SOURCE = 1
X_SYS_CDEFS_ELF_H_ = 0
X_SYS_CDEFS_H_ = 0
X_SYS_ERRNO_H_ = 0
X_X86_64_CDEFS_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 */
var _ int8 /* gen.c:2:13: */

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_windows_386.go -pkgname errno', DO NOT EDIT.
package errno
@ -112,9 +112,7 @@ const (
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
@ -138,9 +136,12 @@ const (
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0
X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0
X_DLL = 0
X_ERRCODE_DEFINED = 0
X_FILE_OFFSET_BITS = 64
X_ILP32 = 1
X_INC_CORECRT = 0
X_INC_CRTDEFS = 0
X_INC_CRTDEFS_MACRO = 0
X_INC_ERRNO = 0
@ -209,6 +210,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// This macro holds an monotonic increasing value, which indicates
// a specific fix/patch is present on trunk. This value isn't related to
// minor/major version-macros. It is increased on demand, if a big
@ -229,6 +235,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
// MinGW-w64 has some additional C99 printf/scanf feature support.
// So we add some helper macros to ease recognition of them.
// If _FORTIFY_SOURCE is enabled, some inline functions may use
// __builtin_va_arg_pack(). GCC may report an error if the address
// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case.
// Enable workaround for ABI incompatibility on affected platforms
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
@ -269,26 +281,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// for backward compatibility
type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
type Ssize_t = int32 /* crtdefs.h:47:13 */
type Ssize_t = int32 /* corecrt.h:52:13 */
type Rsize_t = Size_t /* crtdefs.h:52:16 */
type Rsize_t = Size_t /* corecrt.h:57:16 */
type Intptr_t = int32 /* crtdefs.h:64:13 */
type Intptr_t = int32 /* corecrt.h:69:13 */
type Uintptr_t = uint32 /* crtdefs.h:77:22 */
type Uintptr_t = uint32 /* corecrt.h:82:22 */
type Wint_t = uint16 /* crtdefs.h:106:24 */
type Wctype_t = uint16 /* crtdefs.h:107:24 */
type Wint_t = uint16 /* corecrt.h:111:24 */
type Wctype_t = uint16 /* corecrt.h:112:24 */
type Errno_t = int32 /* crtdefs.h:113:13 */
type Errno_t = int32 /* corecrt.h:118:13 */
type X__time32_t = int32 /* crtdefs.h:118:14 */
type X__time32_t = int32 /* corecrt.h:123:14 */
type X__time64_t = int64 /* crtdefs.h:123:35 */
type X__time64_t = int64 /* corecrt.h:128:35 */
type Time_t = X__time32_t /* crtdefs.h:136:20 */
type Time_t = X__time32_t /* corecrt.h:141:20 */
type Threadlocaleinfostruct = struct {
Frefcount int32
@ -314,29 +328,29 @@ type Threadlocaleinfostruct = struct {
Fpclmap uintptr
Fpcumap uintptr
Flc_time_curr uintptr
} /* crtdefs.h:422:1 */
} /* corecrt.h:435:1 */
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */
type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */
type Localeinfo_struct = struct {
Flocinfo Pthreadlocinfo
Fmbcinfo Pthreadmbcinfo
} /* crtdefs.h:428:9 */
} /* corecrt.h:441:9 */
type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */
type X_locale_t = uintptr /* crtdefs.h:431:19 */
type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */
type X_locale_t = uintptr /* corecrt.h:444:19 */
type TagLC_ID = struct {
FwLanguage uint16
FwCountry uint16
FwCodePage uint16
} /* crtdefs.h:422:1 */
} /* corecrt.h:435:1 */
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
type LC_ID = TagLC_ID /* corecrt.h:452:3 */
type LPLC_ID = uintptr /* corecrt.h:452:9 */
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */
// Posix thread extensions.

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo errno/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno/errno_windows_amd64.go -pkgname errno', DO NOT EDIT.
// Code generated by 'ccgo errno\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o errno\errno_windows_amd64.go -pkgname errno', DO NOT EDIT.
package errno
@ -157,6 +157,7 @@ const (
X_PGLOBAL = 0
X_PTRDIFF_T_ = 0
X_PTRDIFF_T_DEFINED = 0
X_REENTRANT = 1
X_RSIZE_T_DEFINED = 0
X_SECURECRT_ERRCODE_VALUES_DEFINED = 0
X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT.
package fcntl

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_arm64.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_arm64.go -pkgname fcntl', DO NOT EDIT.
package fcntl

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_386.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_386.go -pkgname fcntl', DO NOT EDIT.
package fcntl

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_amd64.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_amd64.go -pkgname fcntl', DO NOT EDIT.
package fcntl

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm.go -pkgname fcntl', DO NOT EDIT.
package fcntl

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm64.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm64.go -pkgname fcntl', DO NOT EDIT.
package fcntl

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_s390x.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_s390x.go -pkgname fcntl', DO NOT EDIT.
package fcntl

5
vendor/modernc.org/libc/fcntl/capi_netbsd_amd64.go generated vendored Normal file
View 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 -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_netbsd_amd64.go -pkgname fcntl', DO NOT EDIT.
package fcntl
var CAPI = map[string]struct{}{}

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
package fcntl

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_windows_amd64.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl\fcntl_windows_amd64.go -pkgname fcntl', DO NOT EDIT.
package fcntl

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT.
package fcntl
@ -774,8 +774,8 @@ type X__darwin_ct_rune_t = int32 /* _types.h:70:33 */ // ct_rune_t
// mbstate_t is an opaque object to keep conversion state, during multibyte
// stream conversions. The content must not be referenced by user programs.
type X__mbstate_t = struct {
_ [0]uint64
F__mbstate8 [128]int8
F__ccgo_pad1 [0]uint64
F__mbstate8 [128]int8
} /* _types.h:79:3 */
type X__darwin_mbstate_t = X__mbstate_t /* _types.h:81:33 */ // mbstate_t
@ -1901,9 +1901,9 @@ type Flocktimeout = struct {
// information passed by user to system
type Radvisory = struct {
Fra_offset Off_t
Fra_count int32
_ [4]byte
Fra_offset Off_t
Fra_count int32
F__ccgo_pad1 [4]byte
} /* fcntl.h:371:1 */
//* Information the user passes in to get the codeblobs out of the kernel
@ -2043,7 +2043,7 @@ type Fbootstraptransfer_t = Fbootstraptransfer /* fcntl.h:463:3 */
type Log2phys = struct {
Fl2p_flags uint32
_ [4]byte
F__ccgo_pad1 [4]byte
Fl2p_contigbytes Off_t
Fl2p_devoffset Off_t
} /* fcntl.h:489:1 */

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_arm64.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_darwin_arm64.go -pkgname fcntl', DO NOT EDIT.
package fcntl
@ -1875,9 +1875,9 @@ type Flocktimeout = struct {
// information passed by user to system
type Radvisory = struct {
Fra_offset Off_t
Fra_count int32
_ [4]byte
Fra_offset Off_t
Fra_count int32
F__ccgo_pad1 [4]byte
} /* fcntl.h:378:1 */
// detached code signatures data type -
@ -1904,7 +1904,7 @@ type Fsupplement = struct {
Ffs_blob_start Off_t
Ffs_blob_size Size_t
Ffs_orig_fd int32
_ [4]byte
F__ccgo_pad1 [4]byte
} /* fcntl.h:403:9 */
type Fsupplement_t = Fsupplement /* fcntl.h:408:3 */
@ -2034,7 +2034,7 @@ type Fbootstraptransfer_t = Fbootstraptransfer /* fcntl.h:487:3 */
type Log2phys = struct {
Fl2p_flags uint32
_ [4]byte
F__ccgo_pad1 [4]byte
Fl2p_contigbytes Off_t
Fl2p_devoffset Off_t
} /* fcntl.h:513:1 */

View file

@ -673,8 +673,8 @@ type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number
// mbstate_t is an opaque object to keep conversion state during multibyte
// stream conversions.
type X__mbstate_t = struct {
_ [0]uint64
F__mbstate8 [128]int8
F__ccgo_pad1 [0]uint64
F__mbstate8 [128]int8
} /* _types.h:124:3 */
type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */
@ -748,13 +748,13 @@ type Pid_t = X__pid_t /* fcntl.h:63:18 */
// Advisory file segment locking data type -
// information passed to system by user
type Flock = struct {
Fl_start Off_t
Fl_len Off_t
Fl_pid Pid_t
Fl_type int16
Fl_whence int16
Fl_sysid int32
_ [4]byte
Fl_start Off_t
Fl_len Off_t
Fl_pid Pid_t
Fl_type int16
Fl_whence int16
Fl_sysid int32
F__ccgo_pad1 [4]byte
} /* fcntl.h:294:1 */
// Old advisory file segment locking data type,

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_386.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_386.go -pkgname fcntl', DO NOT EDIT.
package fcntl
@ -111,13 +111,17 @@ const (
W_OK = 2
X_OK = 1
X_ATFILE_SOURCE = 1
X_BITS_ENDIANNESS_H = 1
X_BITS_ENDIAN_H = 1
X_BITS_STAT_H = 1
X_BITS_TIME64_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_ILP32 = 1
X_MKNOD_VER = 1
X_MKNOD_VER_LINUX = 1
X_MKNOD_VER_SVR4 = 2
@ -148,7 +152,7 @@ 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.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -163,11 +167,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// POSIX Standard: 6.5 File Control Operations <fcntl.h>
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -182,7 +186,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// These are defined by the user (or the compiler)
// to specify the desired environment:
@ -190,6 +194,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __STRICT_ANSI__ ISO Standard C.
// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
// __STDC_WANT_LIB_EXT2__
// Extensions to ISO C99 from TR 27431-2:2010.
// __STDC_WANT_IEC_60559_BFP_EXT__
@ -310,6 +315,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
// define _DEFAULT_SOURCE.
// This is to enable the ISO C2X extension.
// This is to enable the ISO C11 extension.
// This is to enable the ISO C99 extension.
@ -332,9 +339,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// compatibility with various implementations of <cstdio>, this test
// must consider only the value of __cplusplus when compiling C++.
// GNU formerly extended the scanf functions with modified format
// specifiers %as, %aS, and %a[...] that allocate a buffer for the
// input using malloc. This extension conflicts with ISO C99, which
// defines %a as a standalone format specifier that reads a floating-
// point number; moreover, POSIX.1-2008 provides the same feature
// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
//
// We now follow C99 unless GNU extensions are active and the compiler
// is specifically in C89 or C++98 mode (strict or not). For
// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -349,7 +369,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This macro indicates that the installed library is the GNU C Library.
// For historic reasons the value now is 6 and this will stay from now
@ -362,7 +382,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
// Copyright (C) 1992-2018 Free Software Foundation, Inc.
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -377,7 +397,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// We are almost always included from features.h.
@ -492,7 +512,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// 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
// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
// __GNUC_GNU_INLINE__ macro definitions.
// GCC 4.3 and above allow passing all anonymous arguments of an
@ -513,10 +533,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// argument to strncpy and strncat, as the char array is not necessarily
// a NUL-terminated string.
// Undefine (also defined in libc-symbols.h).
// Copies attributes from the declaration or type referenced by
// the argument.
// Determine the wordsize from the preprocessor defines.
// Properties of long double type. ldbl-96 version.
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -531,7 +555,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// long double is distinct from double, so there is nothing to
// define here.
@ -572,7 +596,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Get __mode_t, __dev_t and __off_t .
// bits/types.h -- definitions of __*_t types underlying *_t types.
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -587,11 +611,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Never include this file directly; use <sys/types.h> instead.
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -606,43 +630,63 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Determine the wordsize from the preprocessor defines.
// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
// Copyright (C) 2018-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// For others, time size is word size.
// Convenience types.
type X__u_char = uint8 /* types.h: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 */
type X__u_char = uint8 /* types.h:31:23 */
type X__u_short = uint16 /* types.h:32:28 */
type X__u_int = uint32 /* types.h:33:22 */
type X__u_long = uint32 /* types.h:34: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 */
type X__int8_t = int8 /* types.h:37:21 */
type X__uint8_t = uint8 /* types.h:38:23 */
type X__int16_t = int16 /* types.h:39:26 */
type X__uint16_t = uint16 /* types.h:40:28 */
type X__int32_t = int32 /* types.h:41:20 */
type X__uint32_t = uint32 /* types.h:42:22 */
type X__int64_t = int64 /* types.h:47:44 */
type X__uint64_t = uint64 /* types.h:48: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 */
type X__int_least8_t = X__int8_t /* types.h:52:18 */
type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
type X__int_least16_t = X__int16_t /* types.h:54:19 */
type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
type X__int_least32_t = X__int32_t /* types.h:56:19 */
type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
type X__int_least64_t = X__int64_t /* types.h:58:19 */
type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:65:37 */
type X__u_quad_t = uint64 /* types.h:66:46 */
type X__quad_t = int64 /* types.h:66:37 */
type X__u_quad_t = uint64 /* types.h:67:46 */
// Largest integral types.
type X__intmax_t = int64 /* types.h:74:37 */
type X__uintmax_t = uint64 /* types.h:75:46 */
type X__intmax_t = int64 /* types.h:75:37 */
type X__uintmax_t = uint64 /* types.h:76:46 */
// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
// macros for each of the OS types we define below. The definitions
@ -654,7 +698,7 @@ type X__uintmax_t = uint64 /* types.h:75:46 */
// 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
// QUAD -- 64-bit type, traditionally long long
// WORD -- natural type of __WORDSIZE bits (int or long)
// LONGWORD -- type of __WORDSIZE bits, traditionally long
//
@ -676,7 +720,7 @@ type X__uintmax_t = uint64 /* types.h:75:46 */
// 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.
// Copyright (C) 2012-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -691,7 +735,7 @@ type X__uintmax_t = uint64 /* types.h:75:46 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
@ -700,81 +744,8 @@ type X__uintmax_t = uint64 /* types.h:75:46 */
// 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.
// bits/time64.h -- underlying types for __time64_t. Generic version.
// Copyright (C) 2018-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -789,7 +760,107 @@ type X__sig_atomic_t = int32 /* types.h:212:13 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Define __TIME64_T_TYPE so that it is always a 64-bit type.
// Define a 64-bit time type alongsize the 32-bit one.
type X__dev_t = X__uint64_t /* types.h:145:25 */ // Type of device numbers.
type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
type X__ino_t = uint32 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = X__uint64_t /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int32 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = X__int64_t /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
type X__clock_t = int32 /* types.h:156:27 */ // Type of CPU usage counts.
type X__rlim_t = uint32 /* types.h:157:26 */ // Type for resource measurement.
type X__rlim64_t = X__uint64_t /* types.h:158:28 */ // Type for resource measurement (LFS).
type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
type X__time_t = int32 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int32 /* types.h:162:31 */ // Signed count of microseconds.
type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
type X__clockid_t = int32 /* types.h:168:29 */
// Timer ID returned by `timer_create'.
type X__timer_t = uintptr /* types.h:171:12 */
// Type to represent block size.
type X__blksize_t = int32 /* types.h:174:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
type X__blkcnt_t = int32 /* types.h:179:28 */
type X__blkcnt64_t = X__int64_t /* types.h:180:30 */
// Type to count file system blocks.
type X__fsblkcnt_t = uint32 /* types.h:183:30 */
type X__fsblkcnt64_t = X__uint64_t /* types.h:184:32 */
// Type to count file system nodes.
type X__fsfilcnt_t = uint32 /* types.h:187:30 */
type X__fsfilcnt64_t = X__uint64_t /* types.h:188:32 */
// Type of miscellaneous file system fields.
type X__fsword_t = int32 /* types.h:191:28 */
type X__ssize_t = int32 /* types.h:193:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
type X__syscall_slong_t = int32 /* types.h:196:33 */
// Unsigned long type used in system calls.
type X__syscall_ulong_t = uint32 /* types.h:198:33 */
// These few don't really vary by system, they always correspond
// to one of the other defined types.
type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
type X__caddr_t = uintptr /* types.h:203:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
type X__intptr_t = int32 /* types.h:206:25 */
// Duplicate info from sys/socket.h.
type X__socklen_t = uint32 /* types.h:209:23 */
// C99: An integer type that can be accessed as an atomic entity,
// even in the presence of asynchronous interrupts.
// It is not currently necessary for this to be machine-specific.
type X__sig_atomic_t = int32 /* types.h:214:13 */
// Seconds since the Epoch, visible to user code when time_t is too
// narrow only for consistency with the old way of widening too-narrow
// types. User code should never use __time64_t.
type X__time64_t = X__int64_t /* types.h:222:28 */
// Get the definitions of O_*, F_*, FD_*: all the
// numbers and flag bits for `open', `fcntl', et al.
// O_*, F_*, FD_* bit values for Linux/x86.
// Copyright (C) 2001-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
type Flock = struct {
Fl_type int16
@ -801,7 +872,7 @@ type Flock = struct {
// Include generic Linux declarations.
// O_*, F_*, FD_* bit values for Linux.
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
// Copyright (C) 2001-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -816,7 +887,7 @@ type Flock = struct {
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This file contains shared definitions between Linux architectures
// and is included by <bits/fcntl.h> to declare them. The various
@ -882,7 +953,27 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// 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.
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -899,16 +990,29 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// 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.
// Definitions for byte order, according to significance of bytes,
// from low addresses to high addresses. The value is what you get by
// putting '4' in the most significant byte, '3' in the second most
// significant byte, '2' in the second least significant byte, and '1'
// in the least significant byte, and then writing down one digit for
// each byte, starting with the byte at the lowest address at the left,
// and proceeding to the byte with the highest address at the right.
// This file defines `__BYTE_ORDER' for the particular machine.
// i386/x86_64 are little-endian.
// Some machines may need to use a different endianness for floating point
// values.
// POSIX.1b structure for a time value. This is like a `struct timeval' but
// has nanoseconds instead of microseconds.
type Timespec = struct {
Ftv_sec X__time_t
Ftv_nsec X__syscall_slong_t
} /* struct_timespec.h:9:1 */
} /* struct_timespec.h:10:1 */
// Copyright (C) 1999-2018 Free Software Foundation, Inc.
// Copyright (C) 1999-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -923,28 +1027,28 @@ type Timespec = struct {
//
// 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/>.
// <https://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 {
Fst_dev X__dev_t
F__pad1 uint16
F__ccgo_pad1 [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
F__ccgo_pad2 [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
}

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_amd64.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_amd64.go -pkgname fcntl', DO NOT EDIT.
package fcntl
@ -111,7 +111,10 @@ const (
W_OK = 2
X_OK = 1
X_ATFILE_SOURCE = 1
X_BITS_ENDIANNESS_H = 1
X_BITS_ENDIAN_H = 1
X_BITS_STAT_H = 1
X_BITS_TIME64_H = 1
X_BITS_TYPESIZES_H = 1
X_BITS_TYPES_H = 1
X_DEFAULT_SOURCE = 1
@ -153,7 +156,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -168,11 +171,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// POSIX Standard: 6.5 File Control Operations <fcntl.h>
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -187,7 +190,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// These are defined by the user (or the compiler)
// to specify the desired environment:
@ -195,6 +198,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __STRICT_ANSI__ ISO Standard C.
// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
// __STDC_WANT_LIB_EXT2__
// Extensions to ISO C99 from TR 27431-2:2010.
// __STDC_WANT_IEC_60559_BFP_EXT__
@ -315,6 +319,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
// define _DEFAULT_SOURCE.
// This is to enable the ISO C2X extension.
// This is to enable the ISO C11 extension.
// This is to enable the ISO C99 extension.
@ -337,9 +343,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// compatibility with various implementations of <cstdio>, this test
// must consider only the value of __cplusplus when compiling C++.
// GNU formerly extended the scanf functions with modified format
// specifiers %as, %aS, and %a[...] that allocate a buffer for the
// input using malloc. This extension conflicts with ISO C99, which
// defines %a as a standalone format specifier that reads a floating-
// point number; moreover, POSIX.1-2008 provides the same feature
// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
//
// We now follow C99 unless GNU extensions are active and the compiler
// is specifically in C89 or C++98 mode (strict or not). For
// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -354,7 +373,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This macro indicates that the installed library is the GNU C Library.
// For historic reasons the value now is 6 and this will stay from now
@ -367,7 +386,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
// Copyright (C) 1992-2018 Free Software Foundation, Inc.
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -382,7 +401,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// We are almost always included from features.h.
@ -497,7 +516,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// 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
// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
// __GNUC_GNU_INLINE__ macro definitions.
// GCC 4.3 and above allow passing all anonymous arguments of an
@ -518,11 +537,15 @@ type X__float128 = float64 /* <builtin>:47:21 */
// argument to strncpy and strncat, as the char array is not necessarily
// a NUL-terminated string.
// Undefine (also defined in libc-symbols.h).
// Copies attributes from the declaration or type referenced by
// the argument.
// Determine the wordsize from the preprocessor defines.
// Both x86-64 and x32 use the 64-bit system call interface.
// Properties of long double type. ldbl-96 version.
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -537,7 +560,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// long double is distinct from double, so there is nothing to
// define here.
@ -578,7 +601,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Get __mode_t, __dev_t and __off_t .
// bits/types.h -- definitions of __*_t types underlying *_t types.
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -593,11 +616,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Never include this file directly; use <sys/types.h> instead.
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -612,45 +635,64 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Determine the wordsize from the preprocessor defines.
// Both x86-64 and x32 use the 64-bit system call interface.
// Bit size of the time_t type at glibc build time, x86-64 and x32 case.
// Copyright (C) 2018-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// For others, time size is word size.
// Convenience types.
type X__u_char = uint8 /* types.h: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 */
type X__u_char = uint8 /* types.h:31:23 */
type X__u_short = uint16 /* types.h:32:28 */
type X__u_int = uint32 /* types.h:33:22 */
type X__u_long = uint64 /* types.h:34:27 */
// Fixed-size types, underlying types depend on word size and compiler.
type X__int8_t = int8 /* types.h: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 */
type X__int8_t = int8 /* types.h:37:21 */
type X__uint8_t = uint8 /* types.h:38:23 */
type X__int16_t = int16 /* types.h:39:26 */
type X__uint16_t = uint16 /* types.h:40:28 */
type X__int32_t = int32 /* types.h:41:20 */
type X__uint32_t = uint32 /* types.h:42:22 */
type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
type X__int_least8_t = X__int8_t /* types.h: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 */
type X__int_least8_t = X__int8_t /* types.h:52:18 */
type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
type X__int_least16_t = X__int16_t /* types.h:54:19 */
type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
type X__int_least32_t = X__int32_t /* types.h:56:19 */
type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
type X__int_least64_t = X__int64_t /* types.h:58:19 */
type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:62:18 */
type X__u_quad_t = uint64 /* types.h:63:27 */
type X__quad_t = int64 /* types.h:63:18 */
type X__u_quad_t = uint64 /* types.h:64:27 */
// Largest integral types.
type X__intmax_t = int64 /* types.h:71:18 */
type X__uintmax_t = uint64 /* types.h:72:27 */
type X__intmax_t = int64 /* types.h:72:18 */
type X__uintmax_t = uint64 /* types.h:73:27 */
// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
// macros for each of the OS types we define below. The definitions
@ -662,7 +704,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// 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
// QUAD -- 64-bit type, traditionally long long
// WORD -- natural type of __WORDSIZE bits (int or long)
// LONGWORD -- type of __WORDSIZE bits, traditionally long
//
@ -683,7 +725,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// 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.
// Copyright (C) 2012-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -698,7 +740,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
@ -713,83 +755,111 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// And for __rlim_t and __rlim64_t.
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
// Number of descriptors that can fit in an `fd_set'.
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.
// bits/time64.h -- underlying types for __time64_t. Generic version.
// Copyright (C) 2018-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
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.
// Define __TIME64_T_TYPE so that it is always a 64-bit type.
// If we already have 64-bit time type then use it.
type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
type X__clockid_t = int32 /* types.h:166:29 */
type X__clockid_t = int32 /* types.h:168:29 */
// Timer ID returned by `timer_create'.
type X__timer_t = uintptr /* types.h:169:12 */
type X__timer_t = uintptr /* types.h:171:12 */
// Type to represent block size.
type X__blksize_t = int64 /* types.h:172:29 */
type X__blksize_t = int64 /* types.h:174:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
type X__blkcnt_t = int64 /* types.h:177:28 */
type X__blkcnt64_t = int64 /* types.h:178:30 */
type X__blkcnt_t = int64 /* types.h:179:28 */
type X__blkcnt64_t = int64 /* types.h:180:30 */
// Type to count file system blocks.
type X__fsblkcnt_t = uint64 /* types.h:181:30 */
type X__fsblkcnt64_t = uint64 /* types.h:182:32 */
type X__fsblkcnt_t = uint64 /* types.h:183:30 */
type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
// Type to count file system nodes.
type X__fsfilcnt_t = uint64 /* types.h:185:30 */
type X__fsfilcnt64_t = uint64 /* types.h:186:32 */
type X__fsfilcnt_t = uint64 /* types.h:187:30 */
type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
// Type of miscellaneous file system fields.
type X__fsword_t = int64 /* types.h:189:28 */
type X__fsword_t = int64 /* types.h:191:28 */
type X__ssize_t = int64 /* types.h:191:27 */ // Type of a byte count, or error.
type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
type X__syscall_slong_t = int64 /* types.h:194:33 */
type X__syscall_slong_t = int64 /* types.h:196:33 */
// Unsigned long type used in system calls.
type X__syscall_ulong_t = uint64 /* types.h:196:33 */
type X__syscall_ulong_t = uint64 /* types.h:198:33 */
// These few don't really vary by system, they always correspond
// to one of the other defined types.
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 */
type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
type X__caddr_t = uintptr /* types.h:203:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
type X__intptr_t = int64 /* types.h:204:25 */
type X__intptr_t = int64 /* types.h:206:25 */
// Duplicate info from sys/socket.h.
type X__socklen_t = uint32 /* types.h:207:23 */
type X__socklen_t = uint32 /* types.h:209:23 */
// C99: An integer type that can be accessed as an atomic entity,
// even in the presence of asynchronous interrupts.
// It is not currently necessary for this to be machine-specific.
type X__sig_atomic_t = int32 /* types.h:212:13 */
type X__sig_atomic_t = int32 /* types.h:214:13 */
// Seconds since the Epoch, visible to user code when time_t is too
// narrow only for consistency with the old way of widening too-narrow
// types. User code should never use __time64_t.
// Get the definitions of O_*, F_*, FD_*: all the
// numbers and flag bits for `open', `fcntl', et al.
// O_*, F_*, FD_* bit values for Linux/x86.
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
// Copyright (C) 2001-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -804,23 +874,23 @@ type X__sig_atomic_t = int32 /* types.h:212:13 */
//
// 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/>.
// <https://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
Fl_type int16
Fl_whence int16
F__ccgo_pad1 [4]byte
Fl_start X__off64_t
Fl_len X__off64_t
Fl_pid X__pid_t
F__ccgo_pad2 [4]byte
} /* fcntl.h:35:1 */
// Include generic Linux declarations.
// O_*, F_*, FD_* bit values for Linux.
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
// Copyright (C) 2001-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -835,7 +905,7 @@ type Flock = struct {
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This file contains shared definitions between Linux architectures
// and is included by <bits/fcntl.h> to declare them. The various
@ -901,7 +971,27 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// 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.
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -918,16 +1008,29 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// 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.
// Definitions for byte order, according to significance of bytes,
// from low addresses to high addresses. The value is what you get by
// putting '4' in the most significant byte, '3' in the second most
// significant byte, '2' in the second least significant byte, and '1'
// in the least significant byte, and then writing down one digit for
// each byte, starting with the byte at the lowest address at the left,
// and proceeding to the byte with the highest address at the right.
// This file defines `__BYTE_ORDER' for the particular machine.
// i386/x86_64 are little-endian.
// Some machines may need to use a different endianness for floating point
// values.
// POSIX.1b structure for a time value. This is like a `struct timeval' but
// has nanoseconds instead of microseconds.
type Timespec = struct {
Ftv_sec X__time_t
Ftv_nsec X__syscall_slong_t
} /* struct_timespec.h:9:1 */
} /* struct_timespec.h:10:1 */
// Copyright (C) 1999-2018 Free Software Foundation, Inc.
// Copyright (C) 1999-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -942,7 +1045,7 @@ type Timespec = struct {
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Versions of the `struct stat' data structure.

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm.go -pkgname fcntl', DO NOT EDIT.
package fcntl
@ -111,7 +111,10 @@ const (
W_OK = 2
X_OK = 1
X_ATFILE_SOURCE = 1
X_BITS_ENDIANNESS_H = 1
X_BITS_ENDIAN_H = 1
X_BITS_STAT_H = 1
X_BITS_TIME64_H = 1
X_BITS_TYPESIZES_H = 1
X_BITS_TYPES_H = 1
X_DEFAULT_SOURCE = 1
@ -147,7 +150,7 @@ type Wchar_t = uint32 /* <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.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -162,11 +165,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// POSIX Standard: 6.5 File Control Operations <fcntl.h>
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -181,7 +184,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// These are defined by the user (or the compiler)
// to specify the desired environment:
@ -189,6 +192,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __STRICT_ANSI__ ISO Standard C.
// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
// __STDC_WANT_LIB_EXT2__
// Extensions to ISO C99 from TR 27431-2:2010.
// __STDC_WANT_IEC_60559_BFP_EXT__
@ -309,6 +313,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
// define _DEFAULT_SOURCE.
// This is to enable the ISO C2X extension.
// This is to enable the ISO C11 extension.
// This is to enable the ISO C99 extension.
@ -331,9 +337,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// compatibility with various implementations of <cstdio>, this test
// must consider only the value of __cplusplus when compiling C++.
// GNU formerly extended the scanf functions with modified format
// specifiers %as, %aS, and %a[...] that allocate a buffer for the
// input using malloc. This extension conflicts with ISO C99, which
// defines %a as a standalone format specifier that reads a floating-
// point number; moreover, POSIX.1-2008 provides the same feature
// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
//
// We now follow C99 unless GNU extensions are active and the compiler
// is specifically in C89 or C++98 mode (strict or not). For
// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -348,7 +367,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This macro indicates that the installed library is the GNU C Library.
// For historic reasons the value now is 6 and this will stay from now
@ -361,7 +380,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
// Copyright (C) 1992-2018 Free Software Foundation, Inc.
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -376,7 +395,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// We are almost always included from features.h.
@ -491,7 +510,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// 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
// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
// __GNUC_GNU_INLINE__ macro definitions.
// GCC 4.3 and above allow passing all anonymous arguments of an
@ -512,7 +531,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
// argument to strncpy and strncat, as the char array is not necessarily
// a NUL-terminated string.
// Copyright (C) 1999-2018 Free Software Foundation, Inc.
// Undefine (also defined in libc-symbols.h).
// Copies attributes from the declaration or type referenced by
// the argument.
// Copyright (C) 1999-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -527,10 +550,10 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Properties of long double type.
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -545,7 +568,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This header is included by <sys/cdefs.h>.
//
@ -602,7 +625,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Get __mode_t, __dev_t and __off_t .
// bits/types.h -- definitions of __*_t types underlying *_t types.
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -617,11 +640,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Never include this file directly; use <sys/types.h> instead.
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -636,9 +659,9 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Copyright (C) 1999-2018 Free Software Foundation, Inc.
// Copyright (C) 1999-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -653,41 +676,78 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Bit size of the time_t type at glibc build time, general case.
// Copyright (C) 2018-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Copyright (C) 1999-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Size in bits of the 'time_t' type of the default ABI.
// 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 */
type X__u_char = uint8 /* types.h:31:23 */
type X__u_short = uint16 /* types.h:32:28 */
type X__u_int = uint32 /* types.h:33:22 */
type X__u_long = uint32 /* types.h:34: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 */
type X__int8_t = int8 /* types.h:37:21 */
type X__uint8_t = uint8 /* types.h:38:23 */
type X__int16_t = int16 /* types.h:39:26 */
type X__uint16_t = uint16 /* types.h:40:28 */
type X__int32_t = int32 /* types.h:41:20 */
type X__uint32_t = uint32 /* types.h:42:22 */
type X__int64_t = int64 /* types.h:47:44 */
type X__uint64_t = uint64 /* types.h:48: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 */
type X__int_least8_t = X__int8_t /* types.h:52:18 */
type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
type X__int_least16_t = X__int16_t /* types.h:54:19 */
type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
type X__int_least32_t = X__int32_t /* types.h:56:19 */
type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
type X__int_least64_t = X__int64_t /* types.h:58:19 */
type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:65:37 */
type X__u_quad_t = uint64 /* types.h:66:46 */
type X__quad_t = int64 /* types.h:66:37 */
type X__u_quad_t = uint64 /* types.h:67:46 */
// Largest integral types.
type X__intmax_t = int64 /* types.h:74:37 */
type X__uintmax_t = uint64 /* types.h:75:46 */
type X__intmax_t = int64 /* types.h:75:37 */
type X__uintmax_t = uint64 /* types.h:76:46 */
// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
// macros for each of the OS types we define below. The definitions
@ -699,7 +759,7 @@ type X__uintmax_t = uint64 /* types.h:75:46 */
// 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
// QUAD -- 64-bit type, traditionally long long
// WORD -- natural type of __WORDSIZE bits (int or long)
// LONGWORD -- type of __WORDSIZE bits, traditionally long
//
@ -721,7 +781,7 @@ type X__uintmax_t = uint64 /* types.h:75:46 */
// 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. Generic version.
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -736,88 +796,115 @@ type X__uintmax_t = uint64 /* types.h:75:46 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
// 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.
// bits/time64.h -- underlying types for __time64_t. Generic version.
// Copyright (C) 2018-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
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.
// Define __TIME64_T_TYPE so that it is always a 64-bit type.
// Define a 64-bit time type alongsize the 32-bit one.
type X__dev_t = X__uint64_t /* types.h:145:25 */ // Type of device numbers.
type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
type X__ino_t = uint32 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = X__uint64_t /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int32 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = X__int64_t /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
type X__clock_t = int32 /* types.h:156:27 */ // Type of CPU usage counts.
type X__rlim_t = uint32 /* types.h:157:26 */ // Type for resource measurement.
type X__rlim64_t = X__uint64_t /* types.h:158:28 */ // Type for resource measurement (LFS).
type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
type X__time_t = int32 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int32 /* types.h:162:31 */ // Signed count of microseconds.
type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
type X__clockid_t = int32 /* types.h:166:29 */
type X__clockid_t = int32 /* types.h:168:29 */
// Timer ID returned by `timer_create'.
type X__timer_t = uintptr /* types.h:169:12 */
type X__timer_t = uintptr /* types.h:171:12 */
// Type to represent block size.
type X__blksize_t = int32 /* types.h:172:29 */
type X__blksize_t = int32 /* types.h:174: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 X__blkcnt_t = int32 /* types.h:179:28 */
type X__blkcnt64_t = X__int64_t /* types.h:180: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 X__fsblkcnt_t = uint32 /* types.h:183:30 */
type X__fsblkcnt64_t = X__uint64_t /* types.h:184: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 X__fsfilcnt_t = uint32 /* types.h:187:30 */
type X__fsfilcnt64_t = X__uint64_t /* types.h:188:32 */
// Type of miscellaneous file system fields.
type X__fsword_t = int32 /* types.h:189:28 */
type X__fsword_t = int32 /* types.h:191:28 */
type X__ssize_t = int32 /* types.h:191:27 */ // Type of a byte count, or error.
type X__ssize_t = int32 /* types.h:193: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 */
type X__syscall_slong_t = int32 /* types.h:196:33 */
// Unsigned long type used in system calls.
type X__syscall_ulong_t = uint32 /* types.h:196:33 */
type X__syscall_ulong_t = uint32 /* types.h:198:33 */
// These few don't really vary by system, they always correspond
// to one of the other defined types.
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 */
type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
type X__caddr_t = uintptr /* types.h:203:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
type X__intptr_t = int32 /* types.h:204:25 */
type X__intptr_t = int32 /* types.h:206:25 */
// Duplicate info from sys/socket.h.
type X__socklen_t = uint32 /* types.h:207:23 */
type X__socklen_t = uint32 /* types.h:209:23 */
// C99: An integer type that can be accessed as an atomic entity,
// even in the presence of asynchronous interrupts.
// It is not currently necessary for this to be machine-specific.
type X__sig_atomic_t = int32 /* types.h:212:13 */
type X__sig_atomic_t = int32 /* types.h:214:13 */
// Seconds since the Epoch, visible to user code when time_t is too
// narrow only for consistency with the old way of widening too-narrow
// types. User code should never use __time64_t.
type X__time64_t = X__int64_t /* types.h:222:28 */
// 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) 1995-2018 Free Software Foundation, Inc.
// Copyright (C) 1995-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -832,21 +919,21 @@ type X__sig_atomic_t = int32 /* types.h:212:13 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
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
Fl_type int16
Fl_whence int16
F__ccgo_pad1 [4]byte
Fl_start X__off64_t
Fl_len X__off64_t
Fl_pid X__pid_t
F__ccgo_pad2 [4]byte
} /* fcntl.h:28:1 */
// Include generic Linux declarations.
// O_*, F_*, FD_* bit values for Linux.
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
// Copyright (C) 2001-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -861,7 +948,7 @@ type Flock = struct {
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This file contains shared definitions between Linux architectures
// and is included by <bits/fcntl.h> to declare them. The various
@ -927,7 +1014,27 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// 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.
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -944,16 +1051,29 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// 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.
// Definitions for byte order, according to significance of bytes,
// from low addresses to high addresses. The value is what you get by
// putting '4' in the most significant byte, '3' in the second most
// significant byte, '2' in the second least significant byte, and '1'
// in the least significant byte, and then writing down one digit for
// each byte, starting with the byte at the lowest address at the left,
// and proceeding to the byte with the highest address at the right.
// This file defines `__BYTE_ORDER' for the particular machine.
// ARM has selectable endianness.
// Some machines may need to use a different endianness for floating point
// values.
// POSIX.1b structure for a time value. This is like a `struct timeval' but
// has nanoseconds instead of microseconds.
type Timespec = struct {
Ftv_sec X__time_t
Ftv_nsec X__syscall_slong_t
} /* struct_timespec.h:9:1 */
} /* struct_timespec.h:10:1 */
// Copyright (C) 1992-2018 Free Software Foundation, Inc.
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -968,29 +1088,29 @@ type Timespec = struct {
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Versions of the `struct stat' data structure.
// 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
_ [6]byte
Fst_size X__off64_t
Fst_blksize X__blksize_t
_ [4]byte
Fst_blocks X__blkcnt64_t
Fst_atim struct {
Fst_dev X__dev_t
F__pad1 uint16
F__ccgo_pad1 [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
F__ccgo_pad2 [6]byte
Fst_size X__off64_t
Fst_blksize X__blksize_t
F__ccgo_pad3 [4]byte
Fst_blocks X__blkcnt64_t
Fst_atim struct {
Ftv_sec X__time_t
Ftv_nsec X__syscall_slong_t
}
@ -1007,4 +1127,4 @@ type Stat = struct {
// Define some inlines helping to catch common problems.
var _ int8 /* gen.c:2:13: */
var _ uint8 /* gen.c:2:13: */

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm64.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm64.go -pkgname fcntl', DO NOT EDIT.
package fcntl
@ -15,131 +15,127 @@ var _ atomic.Value
var _ unsafe.Pointer
const (
AT_EACCESS = 0x200
AT_FDCWD = -100
AT_REMOVEDIR = 0x200
AT_SYMLINK_FOLLOW = 0x400
AT_SYMLINK_NOFOLLOW = 0x100
BIG_ENDIAN = 4321
BYTE_ORDER = 1234
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
LITTLE_ENDIAN = 1234
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 = 16384
O_DSYNC = 4096
O_EXCL = 0200
O_FSYNC = 1052672
O_NDELAY = 2048
O_NOCTTY = 0400
O_NOFOLLOW = 32768
O_NONBLOCK = 04000
O_RDONLY = 00
O_RDWR = 02
O_RSYNC = 1052672
O_SYNC = 04010000
O_TRUNC = 01000
O_WRONLY = 01
PDP_ENDIAN = 3412
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_BYTESWAP_H = 1
X_BITS_STAT_H = 1
X_BITS_TYPESIZES_H = 1
X_BITS_TYPES_H = 1
X_BITS_UINTN_IDENTITY_H = 1
X_DEFAULT_SOURCE = 1
X_ENDIAN_H = 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 = 0
X_STAT_VER_KERNEL = 0
X_STAT_VER_LINUX = 0
X_STDC_PREDEF_H = 1
X_STRUCT_TIMESPEC = 1
X_SYS_CDEFS_H = 1
Linux = 1
Unix = 1
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 = 16384
O_DSYNC = 4096
O_EXCL = 0200
O_FSYNC = 1052672
O_NDELAY = 2048
O_NOCTTY = 0400
O_NOFOLLOW = 32768
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_ENDIANNESS_H = 1
X_BITS_ENDIAN_H = 1
X_BITS_STAT_H = 1
X_BITS_TIME64_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 = 0
X_STAT_VER_KERNEL = 0
X_STAT_VER_LINUX = 0
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 */
@ -160,7 +156,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -175,11 +171,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// POSIX Standard: 6.5 File Control Operations <fcntl.h>
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -194,7 +190,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// These are defined by the user (or the compiler)
// to specify the desired environment:
@ -202,6 +198,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __STRICT_ANSI__ ISO Standard C.
// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
// __STDC_WANT_LIB_EXT2__
// Extensions to ISO C99 from TR 27431-2:2010.
// __STDC_WANT_IEC_60559_BFP_EXT__
@ -322,6 +319,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
// define _DEFAULT_SOURCE.
// This is to enable the ISO C2X extension.
// This is to enable the ISO C11 extension.
// This is to enable the ISO C99 extension.
@ -344,9 +343,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// compatibility with various implementations of <cstdio>, this test
// must consider only the value of __cplusplus when compiling C++.
// GNU formerly extended the scanf functions with modified format
// specifiers %as, %aS, and %a[...] that allocate a buffer for the
// input using malloc. This extension conflicts with ISO C99, which
// defines %a as a standalone format specifier that reads a floating-
// point number; moreover, POSIX.1-2008 provides the same feature
// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
//
// We now follow C99 unless GNU extensions are active and the compiler
// is specifically in C89 or C++98 mode (strict or not). For
// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -361,7 +373,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This macro indicates that the installed library is the GNU C Library.
// For historic reasons the value now is 6 and this will stay from now
@ -374,7 +386,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
// Copyright (C) 1992-2018 Free Software Foundation, Inc.
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -389,7 +401,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// We are almost always included from features.h.
@ -504,7 +516,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// 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
// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
// __GNUC_GNU_INLINE__ macro definitions.
// GCC 4.3 and above allow passing all anonymous arguments of an
@ -525,9 +537,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
// argument to strncpy and strncat, as the char array is not necessarily
// a NUL-terminated string.
// Undefine (also defined in libc-symbols.h).
// Copies attributes from the declaration or type referenced by
// the argument.
// Determine the wordsize from the preprocessor defines.
//
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -542,10 +558,10 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Properties of long double type. ldbl-128 version.
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -560,7 +576,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// long double is distinct from double, so there is nothing to
// define here.
@ -594,7 +610,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Determine the wordsize from the preprocessor defines.
//
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -609,7 +625,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This file is automatically generated.
// It defines a symbol `__stub_FUNCTION' for each function
@ -620,7 +636,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Get __mode_t, __dev_t and __off_t .
// bits/types.h -- definitions of __*_t types underlying *_t types.
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -635,11 +651,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Never include this file directly; use <sys/types.h> instead.
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -654,11 +670,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Determine the wordsize from the preprocessor defines.
//
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -673,41 +689,80 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Bit size of the time_t type at glibc build time, general case.
// Copyright (C) 2018-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Determine the wordsize from the preprocessor defines.
//
// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Size in bits of the 'time_t' type of the default ABI.
// 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 */
type X__u_char = uint8 /* types.h:31:23 */
type X__u_short = uint16 /* types.h:32:28 */
type X__u_int = uint32 /* types.h:33:22 */
type X__u_long = uint64 /* types.h:34:27 */
// Fixed-size types, underlying types depend on word size and compiler.
type X__int8_t = int8 /* types.h: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 */
type X__int8_t = int8 /* types.h:37:21 */
type X__uint8_t = uint8 /* types.h:38:23 */
type X__int16_t = int16 /* types.h:39:26 */
type X__uint16_t = uint16 /* types.h:40:28 */
type X__int32_t = int32 /* types.h:41:20 */
type X__uint32_t = uint32 /* types.h:42:22 */
type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
type X__int_least8_t = X__int8_t /* types.h: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 */
type X__int_least8_t = X__int8_t /* types.h:52:18 */
type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
type X__int_least16_t = X__int16_t /* types.h:54:19 */
type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
type X__int_least32_t = X__int32_t /* types.h:56:19 */
type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
type X__int_least64_t = X__int64_t /* types.h:58:19 */
type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:62:18 */
type X__u_quad_t = uint64 /* types.h:63:27 */
type X__quad_t = int64 /* types.h:63:18 */
type X__u_quad_t = uint64 /* types.h:64:27 */
// Largest integral types.
type X__intmax_t = int64 /* types.h:71:18 */
type X__uintmax_t = uint64 /* types.h:72:27 */
type X__intmax_t = int64 /* types.h:72:18 */
type X__uintmax_t = uint64 /* types.h:73:27 */
// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
// macros for each of the OS types we define below. The definitions
@ -719,7 +774,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// 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
// QUAD -- 64-bit type, traditionally long long
// WORD -- natural type of __WORDSIZE bits (int or long)
// LONGWORD -- type of __WORDSIZE bits, traditionally long
//
@ -740,7 +795,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// No need to mark the typedef with __extension__.
// bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
// Copyright (C) 2011-2018 Free Software Foundation, Inc.
// Copyright (C) 2011-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
// Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
//
@ -756,7 +811,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
@ -769,83 +824,110 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// And for __rlim_t and __rlim64_t.
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
// Number of descriptors that can fit in an `fd_set'.
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 = uint32 /* 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.
// bits/time64.h -- underlying types for __time64_t. Generic version.
// Copyright (C) 2018-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
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.
// Define __TIME64_T_TYPE so that it is always a 64-bit type.
// If we already have 64-bit time type then use it.
type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
type X__nlink_t = uint32 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
type X__clockid_t = int32 /* types.h:166:29 */
type X__clockid_t = int32 /* types.h:168:29 */
// Timer ID returned by `timer_create'.
type X__timer_t = uintptr /* types.h:169:12 */
type X__timer_t = uintptr /* types.h:171:12 */
// Type to represent block size.
type X__blksize_t = int32 /* types.h:172:29 */
type X__blksize_t = int32 /* types.h:174:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
type X__blkcnt_t = int64 /* types.h:177:28 */
type X__blkcnt64_t = int64 /* types.h:178:30 */
type X__blkcnt_t = int64 /* types.h:179:28 */
type X__blkcnt64_t = int64 /* types.h:180:30 */
// Type to count file system blocks.
type X__fsblkcnt_t = uint64 /* types.h:181:30 */
type X__fsblkcnt64_t = uint64 /* types.h:182:32 */
type X__fsblkcnt_t = uint64 /* types.h:183:30 */
type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
// Type to count file system nodes.
type X__fsfilcnt_t = uint64 /* types.h:185:30 */
type X__fsfilcnt64_t = uint64 /* types.h:186:32 */
type X__fsfilcnt_t = uint64 /* types.h:187:30 */
type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
// Type of miscellaneous file system fields.
type X__fsword_t = int64 /* types.h:189:28 */
type X__fsword_t = int64 /* types.h:191:28 */
type X__ssize_t = int64 /* types.h:191:27 */ // Type of a byte count, or error.
type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
type X__syscall_slong_t = int64 /* types.h:194:33 */
type X__syscall_slong_t = int64 /* types.h:196:33 */
// Unsigned long type used in system calls.
type X__syscall_ulong_t = uint64 /* types.h:196:33 */
type X__syscall_ulong_t = uint64 /* types.h:198:33 */
// These few don't really vary by system, they always correspond
// to one of the other defined types.
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 */
type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
type X__caddr_t = uintptr /* types.h:203:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
type X__intptr_t = int64 /* types.h:204:25 */
type X__intptr_t = int64 /* types.h:206:25 */
// Duplicate info from sys/socket.h.
type X__socklen_t = uint32 /* types.h:207:23 */
type X__socklen_t = uint32 /* types.h:209:23 */
// C99: An integer type that can be accessed as an atomic entity,
// even in the presence of asynchronous interrupts.
// It is not currently necessary for this to be machine-specific.
type X__sig_atomic_t = int32 /* types.h:212:13 */
type X__sig_atomic_t = int32 /* types.h:214:13 */
// Seconds since the Epoch, visible to user code when time_t is too
// narrow only for consistency with the old way of widening too-narrow
// types. User code should never use __time64_t.
// Get the definitions of O_*, F_*, FD_*: all the
// numbers and flag bits for `open', `fcntl', et al.
// O_*, F_*, FD_* bit values for the AArch64 Linux ABI.
// Copyright (C) 2011-2018 Free Software Foundation, Inc.
// Copyright (C) 2011-2020 Free Software Foundation, Inc.
//
// This file is part of the GNU C Library.
//
@ -861,21 +943,21 @@ type X__sig_atomic_t = int32 /* types.h:212:13 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
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
Fl_type int16
Fl_whence int16
F__ccgo_pad1 [4]byte
Fl_start X__off_t
Fl_len X__off_t
Fl_pid X__pid_t
F__ccgo_pad2 [4]byte
} /* fcntl.h:40:1 */
// Include generic Linux declarations.
// O_*, F_*, FD_* bit values for Linux.
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
// Copyright (C) 2001-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -890,7 +972,7 @@ type Flock = struct {
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This file contains shared definitions between Linux architectures
// and is included by <bits/fcntl.h> to declare them. The various
@ -956,7 +1038,27 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// 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.
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -973,18 +1075,48 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// 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.
// Definitions for byte order, according to significance of bytes,
// from low addresses to high addresses. The value is what you get by
// putting '4' in the most significant byte, '3' in the second most
// significant byte, '2' in the second least significant byte, and '1'
// in the least significant byte, and then writing down one digit for
// each byte, starting with the byte at the lowest address at the left,
// and proceeding to the byte with the highest address at the right.
// This file defines `__BYTE_ORDER' for the particular machine.
// AArch64 has selectable endianness.
// Some machines may need to use a different endianness for floating point
// values.
// POSIX.1b structure for a time value. This is like a `struct timeval' but
// has nanoseconds instead of microseconds.
type Timespec = struct {
Ftv_sec X__time_t
Ftv_nsec X__syscall_slong_t
} /* struct_timespec.h:9:1 */
} /* struct_timespec.h:10:1 */
// Determine the wordsize from the preprocessor defines.
// Copyright (C) 2011-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
// Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
//
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library. If not, see
// <https://www.gnu.org/licenses/>.
// Endian macros for string.h functions
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -1001,6 +1133,25 @@ type Timespec = struct {
// License along with the GNU C Library; if not, see
// <http://www.gnu.org/licenses/>.
// Determine the wordsize from the preprocessor defines.
//
// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// 64-bit libc uses the kernel's 'struct stat', accessed via the
// stat() syscall; 32-bit libc uses the kernel's 'struct stat64'
// and accesses it via the stat64() syscall. All the various
@ -1037,8 +1188,8 @@ type Stat = struct {
Ftv_nsec X__syscall_slong_t
}
F__glibc_reserved [2]int32
} /* stat.h:55:1 */
} /* stat.h:58:1 */
// Define some inlines helping to catch common problems.
var _ int8 /* gen.c:2:13: */
var _ uint8 /* gen.c:2:13: */

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_s390x.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_s390x.go -pkgname fcntl', DO NOT EDIT.
package fcntl
@ -111,7 +111,10 @@ const (
W_OK = 2
X_OK = 1
X_ATFILE_SOURCE = 1
X_BITS_ENDIANNESS_H = 1
X_BITS_ENDIAN_H = 1
X_BITS_STAT_H = 1
X_BITS_TIME64_H = 1
X_BITS_TYPESIZES_H = 1
X_BITS_TYPES_H = 1
X_DEFAULT_SOURCE = 1
@ -153,7 +156,7 @@ type X__uint128_t = struct {
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64 /* <builtin>:47:21 */
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -168,11 +171,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// POSIX Standard: 6.5 File Control Operations <fcntl.h>
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -187,7 +190,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// These are defined by the user (or the compiler)
// to specify the desired environment:
@ -195,6 +198,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// __STRICT_ANSI__ ISO Standard C.
// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
// __STDC_WANT_LIB_EXT2__
// Extensions to ISO C99 from TR 27431-2:2010.
// __STDC_WANT_IEC_60559_BFP_EXT__
@ -315,6 +319,8 @@ type X__float128 = float64 /* <builtin>:47:21 */
// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
// define _DEFAULT_SOURCE.
// This is to enable the ISO C2X extension.
// This is to enable the ISO C11 extension.
// This is to enable the ISO C99 extension.
@ -337,9 +343,22 @@ type X__float128 = float64 /* <builtin>:47:21 */
// compatibility with various implementations of <cstdio>, this test
// must consider only the value of __cplusplus when compiling C++.
// GNU formerly extended the scanf functions with modified format
// specifiers %as, %aS, and %a[...] that allocate a buffer for the
// input using malloc. This extension conflicts with ISO C99, which
// defines %a as a standalone format specifier that reads a floating-
// point number; moreover, POSIX.1-2008 provides the same feature
// using the modifier letter 'm' instead (%ms, %mS, %m[...]).
//
// We now follow C99 unless GNU extensions are active and the compiler
// is specifically in C89 or C++98 mode (strict or not). For
// instance, with GCC, -std=gnu11 will have C99-compliant scanf with
// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
// old extension.
// Get definitions of __STDC_* predefined macros, if the compiler has
// not preincluded this header automatically.
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -354,7 +373,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This macro indicates that the installed library is the GNU C Library.
// For historic reasons the value now is 6 and this will stay from now
@ -367,7 +386,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// these macros to test for features in specific releases.
// This is here only because every header file already includes this one.
// Copyright (C) 1992-2018 Free Software Foundation, Inc.
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -382,7 +401,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// We are almost always included from features.h.
@ -497,7 +516,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// 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
// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
// __GNUC_GNU_INLINE__ macro definitions.
// GCC 4.3 and above allow passing all anonymous arguments of an
@ -518,10 +537,14 @@ type X__float128 = float64 /* <builtin>:47:21 */
// argument to strncpy and strncat, as the char array is not necessarily
// a NUL-terminated string.
// Undefine (also defined in libc-symbols.h).
// Copies attributes from the declaration or type referenced by
// the argument.
// Determine the wordsize from the preprocessor defines.
// Properties of long double type. ldbl-opt version.
// Copyright (C) 2016-2018 Free Software Foundation, Inc.
// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -536,7 +559,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
// intended for use in preprocessor macros.
@ -576,7 +599,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
// Get __mode_t, __dev_t and __off_t .
// bits/types.h -- definitions of __*_t types underlying *_t types.
// Copyright (C) 2002-2018 Free Software Foundation, Inc.
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -591,11 +614,11 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Never include this file directly; use <sys/types.h> instead.
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -610,43 +633,65 @@ type X__float128 = float64 /* <builtin>:47:21 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Determine the wordsize from the preprocessor defines.
// Bit size of the time_t type at glibc build time, general case.
// Copyright (C) 2018-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Determine the wordsize from the preprocessor defines.
// Size in bits of the 'time_t' type of the default ABI.
// 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 */
type X__u_char = uint8 /* types.h:31:23 */
type X__u_short = uint16 /* types.h:32:28 */
type X__u_int = uint32 /* types.h:33:22 */
type X__u_long = uint64 /* types.h:34:27 */
// Fixed-size types, underlying types depend on word size and compiler.
type X__int8_t = int8 /* types.h: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 */
type X__int8_t = int8 /* types.h:37:21 */
type X__uint8_t = uint8 /* types.h:38:23 */
type X__int16_t = int16 /* types.h:39:26 */
type X__uint16_t = uint16 /* types.h:40:28 */
type X__int32_t = int32 /* types.h:41:20 */
type X__uint32_t = uint32 /* types.h:42:22 */
type X__int64_t = int64 /* types.h:44:25 */
type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
type X__int_least8_t = X__int8_t /* types.h: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 */
type X__int_least8_t = X__int8_t /* types.h:52:18 */
type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
type X__int_least16_t = X__int16_t /* types.h:54:19 */
type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
type X__int_least32_t = X__int32_t /* types.h:56:19 */
type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
type X__int_least64_t = X__int64_t /* types.h:58:19 */
type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
// quad_t is also 64 bits.
type X__quad_t = int64 /* types.h:62:18 */
type X__u_quad_t = uint64 /* types.h:63:27 */
type X__quad_t = int64 /* types.h:63:18 */
type X__u_quad_t = uint64 /* types.h:64:27 */
// Largest integral types.
type X__intmax_t = int64 /* types.h:71:18 */
type X__uintmax_t = uint64 /* types.h:72:27 */
type X__intmax_t = int64 /* types.h:72:18 */
type X__uintmax_t = uint64 /* types.h:73:27 */
// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
// macros for each of the OS types we define below. The definitions
@ -658,7 +703,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// 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
// QUAD -- 64-bit type, traditionally long long
// WORD -- natural type of __WORDSIZE bits (int or long)
// LONGWORD -- type of __WORDSIZE bits, traditionally long
//
@ -679,7 +724,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// 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.
// Copyright (C) 2003-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -694,7 +739,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// See <bits/types.h> for the meaning of these macros. This file exists so
// that <bits/types.h> need not vary across different GNU platforms.
@ -709,83 +754,12 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// And for __rlim_t and __rlim64_t.
// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
// Number of descriptors that can fit in an `fd_set'.
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.
// bits/time64.h -- underlying types for __time64_t. Generic version.
// Copyright (C) 2018-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -800,7 +774,106 @@ type X__sig_atomic_t = int32 /* types.h:212:13 */
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Define __TIME64_T_TYPE so that it is always a 64-bit type.
// If we already have 64-bit time type then use it.
type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
type X__clockid_t = int32 /* types.h:168:29 */
// Timer ID returned by `timer_create'.
type X__timer_t = uintptr /* types.h:171:12 */
// Type to represent block size.
type X__blksize_t = int64 /* types.h:174:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
type X__blkcnt_t = int64 /* types.h:179:28 */
type X__blkcnt64_t = int64 /* types.h:180:30 */
// Type to count file system blocks.
type X__fsblkcnt_t = uint64 /* types.h:183:30 */
type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
// Type to count file system nodes.
type X__fsfilcnt_t = uint64 /* types.h:187:30 */
type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
// Type of miscellaneous file system fields.
type X__fsword_t = int64 /* types.h:191:28 */
type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
type X__syscall_slong_t = int64 /* types.h:196:33 */
// Unsigned long type used in system calls.
type X__syscall_ulong_t = uint64 /* types.h:198:33 */
// These few don't really vary by system, they always correspond
// to one of the other defined types.
type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
type X__caddr_t = uintptr /* types.h:203:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
type X__intptr_t = int64 /* types.h:206:25 */
// Duplicate info from sys/socket.h.
type X__socklen_t = uint32 /* types.h:209:23 */
// C99: An integer type that can be accessed as an atomic entity,
// even in the presence of asynchronous interrupts.
// It is not currently necessary for this to be machine-specific.
type X__sig_atomic_t = int32 /* types.h:214:13 */
// Seconds since the Epoch, visible to user code when time_t is too
// narrow only for consistency with the old way of widening too-narrow
// types. User code should never use __time64_t.
// Get the definitions of O_*, F_*, FD_*: all the
// numbers and flag bits for `open', `fcntl', et al.
// O_*, F_*, FD_* bit values for Linux.
// Copyright (C) 2000-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Determine the wordsize from the preprocessor defines.
@ -809,18 +882,18 @@ type X__sig_atomic_t = int32 /* types.h:212:13 */
// 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
Fl_type int16
Fl_whence int16
F__ccgo_pad1 [4]byte
Fl_start X__off_t
Fl_len X__off_t
Fl_pid X__pid_t
F__ccgo_pad2 [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.
// Copyright (C) 2001-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -835,7 +908,7 @@ type Flock = struct {
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// This file contains shared definitions between Linux architectures
// and is included by <bits/fcntl.h> to declare them. The various
@ -901,7 +974,27 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// 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.
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// The GNU C Library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
// <https://www.gnu.org/licenses/>.
// Never include this file directly; use <sys/types.h> instead.
// Endian macros for string.h functions
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -918,16 +1011,29 @@ type Pid_t = X__pid_t /* fcntl.h:69:17 */
// 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.
// Definitions for byte order, according to significance of bytes,
// from low addresses to high addresses. The value is what you get by
// putting '4' in the most significant byte, '3' in the second most
// significant byte, '2' in the second least significant byte, and '1'
// in the least significant byte, and then writing down one digit for
// each byte, starting with the byte at the lowest address at the left,
// and proceeding to the byte with the highest address at the right.
// This file defines `__BYTE_ORDER' for the particular machine.
// S/390 is big-endian.
// Some machines may need to use a different endianness for floating point
// values.
// POSIX.1b structure for a time value. This is like a `struct timeval' but
// has nanoseconds instead of microseconds.
type Timespec = struct {
Ftv_sec X__time_t
Ftv_nsec X__syscall_slong_t
} /* struct_timespec.h:9:1 */
} /* struct_timespec.h:10:1 */
// Copyright (C) 2000-2018 Free Software Foundation, Inc.
// Copyright (C) 2000-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@ -942,7 +1048,7 @@ type Timespec = struct {
//
// 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/>.
// <https://www.gnu.org/licenses/>.
// Determine the wordsize from the preprocessor defines.
@ -979,4 +1085,4 @@ type Stat = struct {
// Define some inlines helping to catch common problems.
var _ int8 /* gen.c:2:13: */
var _ uint8 /* gen.c:2:13: */

1481
vendor/modernc.org/libc/fcntl/fcntl_netbsd_amd64.go generated vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
package fcntl
@ -33,9 +33,7 @@ const (
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
@ -83,6 +81,7 @@ const (
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0
X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0
X_DLL = 0
X_ERRCODE_DEFINED = 0
X_FILE_OFFSET_BITS = 64
@ -90,6 +89,8 @@ const (
X_FILE_OFFSET_BITS_SET_OFFT = 0
X_FINDDATA_T_DEFINED = 0
X_FSIZE_T_DEFINED = 0
X_ILP32 = 1
X_INC_CORECRT = 0
X_INC_CRTDEFS = 0
X_INC_CRTDEFS_MACRO = 0
X_INC_FCNTL = 0
@ -188,6 +189,11 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// This macro holds an monotonic increasing value, which indicates
// a specific fix/patch is present on trunk. This value isn't related to
// minor/major version-macros. It is increased on demand, if a big
@ -208,6 +214,12 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
// MinGW-w64 has some additional C99 printf/scanf feature support.
// So we add some helper macros to ease recognition of them.
// If _FORTIFY_SOURCE is enabled, some inline functions may use
// __builtin_va_arg_pack(). GCC may report an error if the address
// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case.
// Enable workaround for ABI incompatibility on affected platforms
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
@ -248,26 +260,28 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// for backward compatibility
type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
type Ssize_t = int32 /* crtdefs.h:47:13 */
type Ssize_t = int32 /* corecrt.h:52:13 */
type Rsize_t = Size_t /* crtdefs.h:52:16 */
type Rsize_t = Size_t /* corecrt.h:57:16 */
type Intptr_t = int32 /* crtdefs.h:64:13 */
type Intptr_t = int32 /* corecrt.h:69:13 */
type Uintptr_t = uint32 /* crtdefs.h:77:22 */
type Uintptr_t = uint32 /* corecrt.h:82:22 */
type Wint_t = uint16 /* crtdefs.h:106:24 */
type Wctype_t = uint16 /* crtdefs.h:107:24 */
type Wint_t = uint16 /* corecrt.h:111:24 */
type Wctype_t = uint16 /* corecrt.h:112:24 */
type Errno_t = int32 /* crtdefs.h:113:13 */
type Errno_t = int32 /* corecrt.h:118:13 */
type X__time32_t = int32 /* crtdefs.h:118:14 */
type X__time32_t = int32 /* corecrt.h:123:14 */
type X__time64_t = int64 /* crtdefs.h:123:35 */
type X__time64_t = int64 /* corecrt.h:128:35 */
type Time_t = X__time32_t /* crtdefs.h:136:20 */
type Time_t = X__time32_t /* corecrt.h:141:20 */
type Threadlocaleinfostruct = struct {
Frefcount int32
@ -293,29 +307,29 @@ type Threadlocaleinfostruct = struct {
Fpclmap uintptr
Fpcumap uintptr
Flc_time_curr uintptr
} /* crtdefs.h:422:1 */
} /* corecrt.h:435:1 */
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */
type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */
type Localeinfo_struct = struct {
Flocinfo Pthreadlocinfo
Fmbcinfo Pthreadmbcinfo
} /* crtdefs.h:428:9 */
} /* corecrt.h:441:9 */
type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */
type X_locale_t = uintptr /* crtdefs.h:431:19 */
type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */
type X_locale_t = uintptr /* corecrt.h:444:19 */
type TagLC_ID = struct {
FwLanguage uint16
FwCountry uint16
FwCodePage uint16
} /* crtdefs.h:422:1 */
} /* corecrt.h:435:1 */
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
type LC_ID = TagLC_ID /* corecrt.h:452:3 */
type LPLC_ID = uintptr /* corecrt.h:452:9 */
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */
type X_fsize_t = uint32 /* io.h:29:25 */
type X_finddata32_t = struct {
@ -334,12 +348,12 @@ type X_finddata32i64_t = struct {
Ftime_write X__time32_t
Fsize int64
Fname [260]int8
_ [4]byte
F__ccgo_pad1 [4]byte
} /* io.h:44:3 */
type X_finddata64i32_t = struct {
Fattrib uint32
_ [4]byte
F__ccgo_pad1 [4]byte
Ftime_create X__time64_t
Ftime_access X__time64_t
Ftime_write X__time64_t
@ -349,13 +363,13 @@ type X_finddata64i32_t = struct {
type X__finddata64_t = struct {
Fattrib uint32
_ [4]byte
F__ccgo_pad1 [4]byte
Ftime_create X__time64_t
Ftime_access X__time64_t
Ftime_write X__time64_t
Fsize int64
Fname [260]int8
_ [4]byte
F__ccgo_pad2 [4]byte
} /* io.h:62:3 */
type X_wfinddata32_t = struct {
@ -378,18 +392,18 @@ type X_wfinddata32i64_t = struct {
type X_wfinddata64i32_t = struct {
Fattrib uint32
_ [4]byte
F__ccgo_pad1 [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
F__ccgo_pad2 [4]byte
} /* io.h:112:3 */
type X_wfinddata64_t = struct {
Fattrib uint32
_ [4]byte
F__ccgo_pad1 [4]byte
Ftime_create X__time64_t
Ftime_access X__time64_t
Ftime_write X__time64_t

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_windows_amd64.go -pkgname fcntl', DO NOT EDIT.
// Code generated by 'ccgo fcntl\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl\fcntl_windows_amd64.go -pkgname fcntl', DO NOT EDIT.
package fcntl
@ -133,6 +133,7 @@ const (
X_PGLOBAL = 0
X_PTRDIFF_T_ = 0
X_PTRDIFF_T_DEFINED = 0
X_REENTRANT = 1
X_RSIZE_T_DEFINED = 0
X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD
X_SIZE_T_DEFINED = 0
@ -346,12 +347,12 @@ type X_finddata32i64_t = struct {
Ftime_write X__time32_t
Fsize int64
Fname [260]int8
_ [4]byte
F__ccgo_pad1 [4]byte
} /* io.h:44:3 */
type X_finddata64i32_t = struct {
Fattrib uint32
_ [4]byte
F__ccgo_pad1 [4]byte
Ftime_create X__time64_t
Ftime_access X__time64_t
Ftime_write X__time64_t
@ -361,13 +362,13 @@ type X_finddata64i32_t = struct {
type X__finddata64_t = struct {
Fattrib uint32
_ [4]byte
F__ccgo_pad1 [4]byte
Ftime_create X__time64_t
Ftime_access X__time64_t
Ftime_write X__time64_t
Fsize int64
Fname [260]int8
_ [4]byte
F__ccgo_pad2 [4]byte
} /* io.h:62:3 */
type X_wfinddata32_t = struct {
@ -390,18 +391,18 @@ type X_wfinddata32i64_t = struct {
type X_wfinddata64i32_t = struct {
Fattrib uint32
_ [4]byte
F__ccgo_pad1 [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
F__ccgo_pad2 [4]byte
} /* io.h:112:3 */
type X_wfinddata64_t = struct {
Fattrib uint32
_ [4]byte
F__ccgo_pad1 [4]byte
Ftime_create X__time64_t
Ftime_access X__time64_t
Ftime_write X__time64_t

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT.
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_darwin_amd64.go -pkgname fts', DO NOT EDIT.
package fts

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_darwin_arm64.go -pkgname fts', DO NOT EDIT.
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_darwin_arm64.go -pkgname fts', DO NOT EDIT.
package fts

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_386.go -pkgname fts', DO NOT EDIT.
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_386.go -pkgname fts', DO NOT EDIT.
package fts

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_amd64.go -pkgname fts', DO NOT EDIT.
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_amd64.go -pkgname fts', DO NOT EDIT.
package fts

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_arm.go -pkgname fts', DO NOT EDIT.
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_arm.go -pkgname fts', DO NOT EDIT.
package fts

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_arm64.go -pkgname fts', DO NOT EDIT.
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_arm64.go -pkgname fts', DO NOT EDIT.
package fts

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_s390x.go -pkgname fts', DO NOT EDIT.
// Code generated by 'ccgo fts/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_linux_s390x.go -pkgname fts', DO NOT EDIT.
package fts

5
vendor/modernc.org/libc/fts/capi_netbsd_amd64.go generated vendored Normal file
View 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 -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fts/fts_netbsd_amd64.go -pkgname fts', DO NOT EDIT.
package fts
var CAPI = map[string]struct{}{}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

2626
vendor/modernc.org/libc/fts/fts_netbsd_amd64.go generated vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT.
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_darwin_amd64.go -pkgname grp', DO NOT EDIT.
package grp

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_darwin_arm64.go -pkgname grp', DO NOT EDIT.
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_darwin_arm64.go -pkgname grp', DO NOT EDIT.
package grp

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_386.go -pkgname grp', DO NOT EDIT.
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_386.go -pkgname grp', DO NOT EDIT.
package grp

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_amd64.go -pkgname grp', DO NOT EDIT.
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_amd64.go -pkgname grp', DO NOT EDIT.
package grp

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_arm.go -pkgname grp', DO NOT EDIT.
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_arm.go -pkgname grp', DO NOT EDIT.
package grp

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_arm64.go -pkgname grp', DO NOT EDIT.
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_arm64.go -pkgname grp', DO NOT EDIT.
package grp

View file

@ -1,4 +1,4 @@
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_s390x.go -pkgname grp', DO NOT EDIT.
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_linux_s390x.go -pkgname grp', DO NOT EDIT.
package grp

5
vendor/modernc.org/libc/grp/capi_netbsd_amd64.go generated vendored Normal file
View file

@ -0,0 +1,5 @@
// Code generated by 'ccgo grp/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o grp/grp_netbsd_amd64.go -pkgname grp', DO NOT EDIT.
package grp
var CAPI = map[string]struct{}{}

Some files were not shown because too many files have changed in this diff Show more