summaryrefslogtreecommitdiffstats
path: root/vendor/modernc.org/libc/musl_freebsd_amd64.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/modernc.org/libc/musl_freebsd_amd64.go')
-rw-r--r--vendor/modernc.org/libc/musl_freebsd_amd64.go1326
1 files changed, 663 insertions, 663 deletions
diff --git a/vendor/modernc.org/libc/musl_freebsd_amd64.go b/vendor/modernc.org/libc/musl_freebsd_amd64.go
index a979c991..ae1a70af 100644
--- a/vendor/modernc.org/libc/musl_freebsd_amd64.go
+++ b/vendor/modernc.org/libc/musl_freebsd_amd64.go
@@ -1,4 +1,4 @@
-// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT.
+// Code generated by 'ccgo -export-externs X -export-fields F -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT.
package libc
@@ -417,35 +417,35 @@ type wchar_t = int32 /* <builtin>:15:24 */
/// extern int __mb_sb_limit;
type _RuneEntry = struct {
- __min int32
- __max int32
- __map int32
- _ [4]byte
- __types uintptr
+ F__min int32
+ F__max int32
+ F__map int32
+ F__ccgo_pad1 [4]byte
+ F__types uintptr
} /* table.cpp.c:290:3 */
type _RuneRange = struct {
- __nranges int32
- _ [4]byte
- __ranges uintptr
+ F__nranges int32
+ F__ccgo_pad1 [4]byte
+ F__ranges uintptr
} /* table.cpp.c:295:3 */
type _RuneLocale = struct {
- __magic [8]int8
- __encoding [32]int8
- __sgetrune uintptr
- __sputrune uintptr
- __invalid_rune int32
- _ [4]byte
- __runetype [256]uint64
- __maplower [256]int32
- __mapupper [256]int32
- __runetype_ext _RuneRange
- __maplower_ext _RuneRange
- __mapupper_ext _RuneRange
- __variable uintptr
- __variable_len int32
- _ [4]byte
+ F__magic [8]int8
+ F__encoding [32]int8
+ F__sgetrune uintptr
+ F__sputrune uintptr
+ F__invalid_rune int32
+ F__ccgo_pad1 [4]byte
+ F__runetype [256]uint64
+ F__maplower [256]int32
+ F__mapupper [256]int32
+ F__runetype_ext _RuneRange
+ F__maplower_ext _RuneRange
+ F__mapupper_ext _RuneRange
+ F__variable uintptr
+ F__variable_len int32
+ F__ccgo_pad2 [4]byte
} /* table.cpp.c:320:3 */
///
/// extern const _RuneLocale _DefaultRuneLocale;
@@ -2371,11 +2371,11 @@ type _RuneLocale = struct {
var X_DefaultRuneLocale = _RuneLocale{
- __magic: *(*[8]int8)(unsafe.Pointer(ts)),
- __encoding: *(*[32]int8)(unsafe.Pointer(ts + 9)),
- __invalid_rune: 0xFFFD,
+ F__magic: *(*[8]int8)(unsafe.Pointer(ts)),
+ F__encoding: *(*[32]int8)(unsafe.Pointer(ts + 9)),
+ F__invalid_rune: 0xFFFD,
- __runetype: [256]uint64{
+ F__runetype: [256]uint64{
0: uint64(0x00000200),
@@ -3237,7 +3237,7 @@ var X_DefaultRuneLocale = _RuneLocale{
127: uint64(0x00000200),
},
- __maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ F__maplower: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -3270,7 +3270,7 @@ var X_DefaultRuneLocale = _RuneLocale{
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
},
- __mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ F__mapupper: [256]int32{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
@@ -3451,39 +3451,39 @@ type ssize_t = int64 /* alltypes.h:65:15 */
type off_t = int64 /* alltypes.h:162:16 */
type _IO_FILE = struct {
- flags uint32
- _ [4]byte
- rpos uintptr
- rend uintptr
- close uintptr
- wend uintptr
- wpos uintptr
- mustbezero_1 uintptr
- wbase uintptr
- read uintptr
- write uintptr
- seek uintptr
- buf uintptr
- buf_size size_t
- prev uintptr
- next uintptr
- fd int32
- pipe_pid int32
- lockcount int64
- mode int32
- lock int32
- lbf int32
- _ [4]byte
- cookie uintptr
- off off_t
- getln_buf uintptr
- mustbezero_2 uintptr
- shend uintptr
- shlim off_t
- shcnt off_t
- prev_locked uintptr
- next_locked uintptr
- locale uintptr
+ Fflags uint32
+ F__ccgo_pad1 [4]byte
+ Frpos uintptr
+ Frend uintptr
+ Fclose uintptr
+ Fwend uintptr
+ Fwpos uintptr
+ Fmustbezero_1 uintptr
+ Fwbase uintptr
+ Fread uintptr
+ Fwrite uintptr
+ Fseek uintptr
+ Fbuf uintptr
+ Fbuf_size size_t
+ Fprev uintptr
+ Fnext uintptr
+ Ffd int32
+ Fpipe_pid int32
+ Flockcount int64
+ Fmode int32
+ Flock int32
+ Flbf int32
+ F__ccgo_pad2 [4]byte
+ Fcookie uintptr
+ Foff off_t
+ Fgetln_buf uintptr
+ Fmustbezero_2 uintptr
+ Fshend uintptr
+ Fshlim off_t
+ Fshcnt off_t
+ Fprev_locked uintptr
+ Fnext_locked uintptr
+ Flocale uintptr
} /* alltypes.h:320:9 */
type FILE = _IO_FILE /* alltypes.h:320:25 */
@@ -3491,8 +3491,8 @@ type FILE = _IO_FILE /* alltypes.h:320:25 */
type va_list = uintptr /* alltypes.h:326:27 */
type _G_fpos64_t = struct {
- _ [0]uint64
- __opaque [16]int8
+ F__ccgo_pad1 [0]uint64
+ F__opaque [16]int8
} /* stdio.h:54:9 */
type fpos_t = _G_fpos64_t /* stdio.h:58:3 */
@@ -3505,7 +3505,7 @@ func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */
bp := tls.Alloc(4)
defer tls.Free(4)
- // var __u struct {__f float32;} at bp, 4
+ // var __u struct {F__f float32;} at bp, 4
*(*float32)(unsafe.Pointer(bp)) = __f
return *(*uint32)(unsafe.Pointer(bp))
@@ -3515,7 +3515,7 @@ func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */
bp := tls.Alloc(8)
defer tls.Free(8)
- // var __u struct {__f float64;} at bp, 8
+ // var __u struct {F__f float64;} at bp, 8
*(*float64)(unsafe.Pointer(bp)) = __f
return *(*uint64)(unsafe.Pointer(bp))
@@ -3530,58 +3530,58 @@ func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */
var neg int32 = 0
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
if c == '+' || c == '-' {
neg = Bool32(c == '-')
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
if uint32(c-'0') >= 10 && pok != 0 {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
}
}
if uint32(c-'0') >= 10 {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
return -0x7fffffffffffffff - int64(1)
}
for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
x = 10*x + c - '0'
}
for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
y = int64(10)*y + int64(c) - int64('0')
}
for ; uint32(c-'0') < 10; c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
}
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
if neg != 0 {
@@ -3620,8 +3620,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32,
// Don't let leading zeros consume buffer space
for ; c == '0'; c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
@@ -3630,13 +3630,13 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32,
if c == '.' {
gotrad = 1
for c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}(); c == '0'; c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
@@ -3647,8 +3647,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32,
*(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0)
for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
@@ -3689,8 +3689,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32,
e10 = scanexp(tls, f, pok)
if e10 == -0x7fffffffffffffff-int64(1) {
if pok != 0 {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
} else {
@@ -3701,8 +3701,8 @@ func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32,
}
lrp = lrp + e10
} else if c >= 0 {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
}
@@ -3944,16 +3944,16 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
var c int32
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
// Skip leading zeros
for ; c == '0'; c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
@@ -3963,8 +3963,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
if c == '.' {
gotrad = 1
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -3978,8 +3978,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
goto __2
__2:
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -3990,8 +3990,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() {
@@ -4020,18 +4020,18 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
}
}
if !(gotdig != 0) {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
if pok != 0 {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
if gotrad != 0 {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
}
@@ -4051,8 +4051,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
e2 = scanexp(tls, f, pok)
if e2 == -0x7fffffffffffffff-int64(1) {
if pok != 0 {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
} else {
@@ -4062,8 +4062,8 @@ func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32
e2 = int64(0)
}
} else {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
}
@@ -4143,8 +4143,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float
}
for __isspace(tls, AssignInt32(&c, func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}())) != 0 {
@@ -4153,8 +4153,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float
if c == '+' || c == '-' {
sign = sign - 2*Bool32(c == '-')
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4163,8 +4163,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float
for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 41 /* "infinity" */ + uintptr(i)))); i++ {
if i < uint64(7) {
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4172,14 +4172,14 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float
}
if i == uint64(3) || i == uint64(8) || i > uint64(3) && pok != 0 {
if i != uint64(8) {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
if pok != 0 {
for ; i > uint64(3); i-- {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
}
@@ -4191,8 +4191,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float
for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 50 /* "nan" */ + uintptr(i)))); i++ {
if i < uint64(2) {
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4201,21 +4201,21 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float
}
if i == uint64(3) {
if func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}() != '(' {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
return float64(X__builtin_nanf(tls, ts+54))
}
for i = uint64(1); ; i++ {
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4225,8 +4225,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float
if c == ')' {
return float64(X__builtin_nanf(tls, ts+54))
}
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
if !(pok != 0) {
@@ -4235,8 +4235,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float
return float64(0)
}
for PostDecUint64(&i, 1) != 0 {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
}
@@ -4246,8 +4246,8 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float
}
if i != 0 {
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
*(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22
@@ -4257,16 +4257,16 @@ func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* float
if c == '0' {
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
if c|32 == 'x' {
return hexfloat(tls, f, bits, emin, sign, pok)
}
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
c = '0'
@@ -4313,8 +4313,8 @@ __1:
;
__2:
if !(__isspace(tls, AssignInt32(&c, func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}())) != 0) {
@@ -4328,8 +4328,8 @@ __3:
}
neg = -Bool32(c == '-')
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4339,8 +4339,8 @@ __4:
goto __5
}
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4348,23 +4348,23 @@ __4:
goto __7
}
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) {
goto __9
}
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
if !(pok != 0) {
goto __10
}
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
goto __11
@@ -4397,8 +4397,8 @@ __13:
if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) {
goto __14
}
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
X__shlim(tls, f, int64(0))
@@ -4420,8 +4420,8 @@ __17:
goto __18
__18:
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4438,8 +4438,8 @@ __20:
goto __21
__21:
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4468,8 +4468,8 @@ __26:
goto __27
__27:
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4486,8 +4486,8 @@ __29:
goto __30
__30:
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4506,8 +4506,8 @@ __32:
goto __33
__33:
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4524,8 +4524,8 @@ __35:
goto __36
__36:
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4547,8 +4547,8 @@ __39:
goto __40
__40:
c = func() int32 {
- if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend {
- return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1))))
+ if (*FILE)(unsafe.Pointer(f)).Frpos != (*FILE)(unsafe.Pointer(f)).Fshend {
+ return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).Frpos, 1))))
}
return X__shgetc(tls, f)
}()
@@ -4567,8 +4567,8 @@ __42:
__38:
;
done:
- if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) {
- (*FILE)(unsafe.Pointer(f)).rpos--
+ if (*FILE)(unsafe.Pointer(f)).Fshlim >= int64(0) {
+ (*FILE)(unsafe.Pointer(f)).Frpos--
} else {
}
if !(y >= lim) {
@@ -4601,34 +4601,34 @@ __43:
// the actual count.
func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */
- (*FILE)(unsafe.Pointer(f)).shlim = lim
- (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1
+ (*FILE)(unsafe.Pointer(f)).Fshlim = lim
+ (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf) - int64((*FILE)(unsafe.Pointer(f)).Frpos)) / 1
// If lim is nonzero, rend must be a valid pointer.
- if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > lim {
- (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr(lim)
+ if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > lim {
+ (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr(lim)
} else {
- (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend
+ (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend
}
}
func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
var c int32
- var cnt off_t = (*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1
- if (*FILE)(unsafe.Pointer(f)).shlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).shlim || AssignInt32(&c, X__uflow(tls, f)) < 0 {
- (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt
- (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos
- (*FILE)(unsafe.Pointer(f)).shlim = int64(-1)
+ var cnt off_t = (*FILE)(unsafe.Pointer(f)).Fshcnt + (int64((*FILE)(unsafe.Pointer(f)).Frpos)-int64((*FILE)(unsafe.Pointer(f)).Fbuf))/1
+ if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).Fshlim || AssignInt32(&c, X__uflow(tls, f)) < 0 {
+ (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt
+ (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos
+ (*FILE)(unsafe.Pointer(f)).Fshlim = int64(-1)
return -1
}
cnt++
- if (*FILE)(unsafe.Pointer(f)).shlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > (*FILE)(unsafe.Pointer(f)).shlim-cnt {
- (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr((*FILE)(unsafe.Pointer(f)).shlim-cnt)
+ if (*FILE)(unsafe.Pointer(f)).Fshlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).Frend)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 > (*FILE)(unsafe.Pointer(f)).Fshlim-cnt {
+ (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frpos + uintptr((*FILE)(unsafe.Pointer(f)).Fshlim-cnt)
} else {
- (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend
+ (*FILE)(unsafe.Pointer(f)).Fshend = (*FILE)(unsafe.Pointer(f)).Frend
}
- (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt
- if (*FILE)(unsafe.Pointer(f)).rpos <= (*FILE)(unsafe.Pointer(f)).buf {
- *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).rpos + UintptrFromInt32(-1))) = uint8(c)
+ (*FILE)(unsafe.Pointer(f)).Fshcnt = (int64((*FILE)(unsafe.Pointer(f)).Fbuf)-int64((*FILE)(unsafe.Pointer(f)).Frpos))/1 + cnt
+ if (*FILE)(unsafe.Pointer(f)).Frpos <= (*FILE)(unsafe.Pointer(f)).Fbuf {
+ *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).Frpos + UintptrFromInt32(-1))) = uint8(c)
}
return c
}
@@ -4655,7 +4655,7 @@ func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */
bp := tls.Alloc(8)
defer tls.Free(8)
- *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) {
+ *(*struct{ Ff float64 })(unsafe.Pointer(bp)) = func() (r struct{ Ff float64 }) {
*(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x
return r
}()
@@ -4684,7 +4684,7 @@ func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */
bp := tls.Alloc(8)
defer tls.Free(8)
- // var u struct {f float64;} at bp, 8
+ // var u struct {Ff float64;} at bp, 8
var y double_t = x
@@ -4721,26 +4721,26 @@ func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */
}
type div_t = struct {
- quot int32
- rem int32
+ Fquot int32
+ Frem int32
} /* stdlib.h:62:35 */
type ldiv_t = struct {
- quot int64
- rem int64
+ Fquot int64
+ Frem int64
} /* stdlib.h:63:36 */
type lldiv_t = struct {
- quot int64
- rem int64
+ Fquot int64
+ Frem int64
} /* stdlib.h:64:41 */
type max_align_t = struct {
- __ll int64
- __ld float64
+ F__ll int64
+ F__ld float64
} /* alltypes.h:41:54 */
type imaxdiv_t = struct {
- quot intmax_t
- rem intmax_t
+ Fquot intmax_t
+ Frem intmax_t
} /* inttypes.h:14:40 */
type pid_t = int32 /* alltypes.h:235:13 */
@@ -4750,8 +4750,8 @@ type uid_t = uint32 /* alltypes.h:245:18 */
type gid_t = uint32 /* alltypes.h:250:18 */
type iovec = struct {
- iov_base uintptr
- iov_len size_t
+ Fiov_base uintptr
+ Fiov_len size_t
} /* alltypes.h:355:1 */
type socklen_t = uint32 /* alltypes.h:361:18 */
@@ -4759,311 +4759,311 @@ type socklen_t = uint32 /* alltypes.h:361:18 */
type sa_family_t = uint16 /* alltypes.h:366:24 */
type msghdr = struct {
- msg_name uintptr
- msg_namelen socklen_t
- _ [4]byte
- msg_iov uintptr
- msg_iovlen int32
- __pad1 int32
- msg_control uintptr
- msg_controllen socklen_t
- __pad2 int32
- msg_flags int32
- _ [4]byte
+ Fmsg_name uintptr
+ Fmsg_namelen socklen_t
+ F__ccgo_pad1 [4]byte
+ Fmsg_iov uintptr
+ Fmsg_iovlen int32
+ F__pad1 int32
+ Fmsg_control uintptr
+ Fmsg_controllen socklen_t
+ F__pad2 int32
+ Fmsg_flags int32
+ F__ccgo_pad2 [4]byte
} /* socket.h:22:1 */
type cmsghdr = struct {
- cmsg_len socklen_t
- __pad1 int32
- cmsg_level int32
- cmsg_type int32
+ Fcmsg_len socklen_t
+ F__pad1 int32
+ Fcmsg_level int32
+ Fcmsg_type int32
} /* socket.h:44:1 */
type linger = struct {
- l_onoff int32
- l_linger int32
+ Fl_onoff int32
+ Fl_linger int32
} /* socket.h:74:1 */
type sockaddr = struct {
- sa_family sa_family_t
- sa_data [14]int8
+ Fsa_family sa_family_t
+ Fsa_data [14]int8
} /* socket.h:367:1 */
type sockaddr_storage = struct {
- ss_family sa_family_t
- __ss_padding [118]int8
- __ss_align uint64
+ Fss_family sa_family_t
+ F__ss_padding [118]int8
+ F__ss_align uint64
} /* socket.h:372:1 */
-type in_port_t = uint16_t /* in.h:12:18 */
-type in_addr_t = uint32_t /* in.h:13:18 */
-type in_addr = struct{ s_addr in_addr_t } /* in.h:14:1 */
+type in_port_t = uint16_t /* in.h:12:18 */
+type in_addr_t = uint32_t /* in.h:13:18 */
+type in_addr = struct{ Fs_addr in_addr_t } /* in.h:14:1 */
type sockaddr_in = struct {
- sin_family sa_family_t
- sin_port in_port_t
- sin_addr struct{ s_addr in_addr_t }
- sin_zero [8]uint8_t
+ Fsin_family sa_family_t
+ Fsin_port in_port_t
+ Fsin_addr struct{ Fs_addr in_addr_t }
+ Fsin_zero [8]uint8_t
} /* in.h:16:1 */
type in6_addr = struct {
- __in6_union struct {
- _ [0]uint32
- __s6_addr [16]uint8_t
+ F__in6_union struct {
+ F__ccgo_pad1 [0]uint32
+ F__s6_addr [16]uint8_t
}
} /* in.h:23:1 */
type sockaddr_in6 = struct {
- sin6_family sa_family_t
- sin6_port in_port_t
- sin6_flowinfo uint32_t
- sin6_addr struct {
- __in6_union struct {
- _ [0]uint32
- __s6_addr [16]uint8_t
+ Fsin6_family sa_family_t
+ Fsin6_port in_port_t
+ Fsin6_flowinfo uint32_t
+ Fsin6_addr struct {
+ F__in6_union struct {
+ F__ccgo_pad1 [0]uint32
+ F__s6_addr [16]uint8_t
}
}
- sin6_scope_id uint32_t
+ Fsin6_scope_id uint32_t
} /* in.h:34:1 */
type ipv6_mreq = struct {
- ipv6mr_multiaddr struct {
- __in6_union struct {
- _ [0]uint32
- __s6_addr [16]uint8_t
+ Fipv6mr_multiaddr struct {
+ F__in6_union struct {
+ F__ccgo_pad1 [0]uint32
+ F__s6_addr [16]uint8_t
}
}
- ipv6mr_interface uint32
+ Fipv6mr_interface uint32
} /* in.h:42:1 */
type ip_opts = struct {
- ip_dst struct{ s_addr in_addr_t }
- ip_opts [40]int8
+ Fip_dst struct{ Fs_addr in_addr_t }
+ Fip_opts [40]int8
} /* in.h:229:1 */
type ip_mreq = struct {
- imr_multiaddr struct{ s_addr in_addr_t }
- imr_interface struct{ s_addr in_addr_t }
+ Fimr_multiaddr struct{ Fs_addr in_addr_t }
+ Fimr_interface struct{ Fs_addr in_addr_t }
} /* in.h:247:1 */
type ip_mreqn = struct {
- imr_multiaddr struct{ s_addr in_addr_t }
- imr_address struct{ s_addr in_addr_t }
- imr_ifindex int32
+ Fimr_multiaddr struct{ Fs_addr in_addr_t }
+ Fimr_address struct{ Fs_addr in_addr_t }
+ Fimr_ifindex int32
} /* in.h:252:1 */
type ip_mreq_source = struct {
- imr_multiaddr struct{ s_addr in_addr_t }
- imr_interface struct{ s_addr in_addr_t }
- imr_sourceaddr struct{ s_addr in_addr_t }
+ Fimr_multiaddr struct{ Fs_addr in_addr_t }
+ Fimr_interface struct{ Fs_addr in_addr_t }
+ Fimr_sourceaddr struct{ Fs_addr in_addr_t }
} /* in.h:258:1 */
type ip_msfilter = struct {
- imsf_multiaddr struct{ s_addr in_addr_t }
- imsf_interface struct{ s_addr in_addr_t }
- imsf_fmode uint32_t
- imsf_numsrc uint32_t
- imsf_slist [1]struct{ s_addr in_addr_t }
+ Fimsf_multiaddr struct{ Fs_addr in_addr_t }
+ Fimsf_interface struct{ Fs_addr in_addr_t }
+ Fimsf_fmode uint32_t
+ Fimsf_numsrc uint32_t
+ Fimsf_slist [1]struct{ Fs_addr in_addr_t }
} /* in.h:264:1 */
type group_req = struct {
- gr_interface uint32_t
- _ [4]byte
- gr_group struct {
- ss_family sa_family_t
- __ss_padding [118]int8
- __ss_align uint64
+ Fgr_interface uint32_t
+ F__ccgo_pad1 [4]byte
+ Fgr_group struct {
+ Fss_family sa_family_t
+ F__ss_padding [118]int8
+ F__ss_align uint64
}
} /* in.h:275:1 */
type group_source_req = struct {
- gsr_interface uint32_t
- _ [4]byte
- gsr_group struct {
- ss_family sa_family_t
- __ss_padding [118]int8
- __ss_align uint64
- }
- gsr_source struct {
- ss_family sa_family_t
- __ss_padding [118]int8
- __ss_align uint64
+ Fgsr_interface uint32_t
+ F__ccgo_pad1 [4]byte
+ Fgsr_group struct {
+ Fss_family sa_family_t
+ F__ss_padding [118]int8
+ F__ss_align uint64
+ }
+ Fgsr_source struct {
+ Fss_family sa_family_t
+ F__ss_padding [118]int8
+ F__ss_align uint64
}
} /* in.h:280:1 */
type group_filter = struct {
- gf_interface uint32_t
- _ [4]byte
- gf_group struct {
- ss_family sa_family_t
- __ss_padding [118]int8
- __ss_align uint64
- }
- gf_fmode uint32_t
- gf_numsrc uint32_t
- gf_slist [1]struct {
- ss_family sa_family_t
- __ss_padding [118]int8
- __ss_align uint64
+ Fgf_interface uint32_t
+ F__ccgo_pad1 [4]byte
+ Fgf_group struct {
+ Fss_family sa_family_t
+ F__ss_padding [118]int8
+ F__ss_align uint64
+ }
+ Fgf_fmode uint32_t
+ Fgf_numsrc uint32_t
+ Fgf_slist [1]struct {
+ Fss_family sa_family_t
+ F__ss_padding [118]int8
+ F__ss_align uint64
}
} /* in.h:286:1 */
type in_pktinfo = struct {
- ipi_ifindex int32
- ipi_spec_dst struct{ s_addr in_addr_t }
- ipi_addr struct{ s_addr in_addr_t }
+ Fipi_ifindex int32
+ Fipi_spec_dst struct{ Fs_addr in_addr_t }
+ Fipi_addr struct{ Fs_addr in_addr_t }
} /* in.h:297:1 */
type in6_pktinfo = struct {
- ipi6_addr struct {
- __in6_union struct {
- _ [0]uint32
- __s6_addr [16]uint8_t
+ Fipi6_addr struct {
+ F__in6_union struct {
+ F__ccgo_pad1 [0]uint32
+ F__s6_addr [16]uint8_t
}
}
- ipi6_ifindex uint32
+ Fipi6_ifindex uint32
} /* in.h:303:1 */
type ip6_mtuinfo = struct {
- ip6m_addr struct {
- sin6_family sa_family_t
- sin6_port in_port_t
- sin6_flowinfo uint32_t
- sin6_addr struct {
- __in6_union struct {
- _ [0]uint32
- __s6_addr [16]uint8_t
+ Fip6m_addr struct {
+ Fsin6_family sa_family_t
+ Fsin6_port in_port_t
+ Fsin6_flowinfo uint32_t
+ Fsin6_addr struct {
+ F__in6_union struct {
+ F__ccgo_pad1 [0]uint32
+ F__s6_addr [16]uint8_t
}
}
- sin6_scope_id uint32_t
+ Fsin6_scope_id uint32_t
}
- ip6m_mtu uint32_t
+ Fip6m_mtu uint32_t
} /* in.h:308:1 */
type addrinfo = struct {
- ai_flags int32
- ai_family int32
- ai_socktype int32
- ai_protocol int32
- ai_addrlen socklen_t
- _ [4]byte
- ai_addr uintptr
- ai_canonname uintptr
- ai_next uintptr
+ Fai_flags int32
+ Fai_family int32
+ Fai_socktype int32
+ Fai_protocol int32
+ Fai_addrlen socklen_t
+ F__ccgo_pad1 [4]byte
+ Fai_addr uintptr
+ Fai_canonname uintptr
+ Fai_next uintptr
} /* netdb.h:16:1 */
// Legacy functions follow (marked OBsolete in SUS)
type netent = struct {
- n_name uintptr
- n_aliases uintptr
- n_addrtype int32
- n_net uint32_t
+ Fn_name uintptr
+ Fn_aliases uintptr
+ Fn_addrtype int32
+ Fn_net uint32_t
} /* netdb.h:62:1 */
type hostent = struct {
- h_name uintptr
- h_aliases uintptr
- h_addrtype int32
- h_length int32
- h_addr_list uintptr
+ Fh_name uintptr
+ Fh_aliases uintptr
+ Fh_addrtype int32
+ Fh_length int32
+ Fh_addr_list uintptr
} /* netdb.h:69:1 */
type servent = struct {
- s_name uintptr
- s_aliases uintptr
- s_port int32
- _ [4]byte
- s_proto uintptr
+ Fs_name uintptr
+ Fs_aliases uintptr
+ Fs_port int32
+ F__ccgo_pad1 [4]byte
+ Fs_proto uintptr
} /* netdb.h:78:1 */
type protoent = struct {
- p_name uintptr
- p_aliases uintptr
- p_proto int32
- _ [4]byte
+ Fp_name uintptr
+ Fp_aliases uintptr
+ Fp_proto int32
+ F__ccgo_pad1 [4]byte
} /* netdb.h:85:1 */
type aibuf = struct {
- ai struct {
- ai_flags int32
- ai_family int32
- ai_socktype int32
- ai_protocol int32
- ai_addrlen socklen_t
- _ [4]byte
- ai_addr uintptr
- ai_canonname uintptr
- ai_next uintptr
- }
- sa struct {
- sin struct {
- sin_family sa_family_t
- sin_port in_port_t
- sin_addr struct{ s_addr in_addr_t }
- sin_zero [8]uint8_t
- }
- _ [12]byte
- }
- lock [1]int32
- slot int16
- ref int16
- _ [4]byte
+ Fai struct {
+ Fai_flags int32
+ Fai_family int32
+ Fai_socktype int32
+ Fai_protocol int32
+ Fai_addrlen socklen_t
+ F__ccgo_pad1 [4]byte
+ Fai_addr uintptr
+ Fai_canonname uintptr
+ Fai_next uintptr
+ }
+ Fsa struct {
+ Fsin struct {
+ Fsin_family sa_family_t
+ Fsin_port in_port_t
+ Fsin_addr struct{ Fs_addr in_addr_t }
+ Fsin_zero [8]uint8_t
+ }
+ F__ccgo_pad1 [12]byte
+ }
+ Flock [1]int32
+ Fslot int16
+ Fref int16
+ F__ccgo_pad1 [4]byte
} /* lookup.h:10:1 */
type sa = struct {
- sin struct {
- sin_family sa_family_t
- sin_port in_port_t
- sin_addr struct{ s_addr in_addr_t }
- sin_zero [8]uint8_t
+ Fsin struct {
+ Fsin_family sa_family_t
+ Fsin_port in_port_t
+ Fsin_addr struct{ Fs_addr in_addr_t }
+ Fsin_zero [8]uint8_t
}
- _ [12]byte
+ F__ccgo_pad1 [12]byte
} /* lookup.h:10:1 */
type address = struct {
- family int32
- scopeid uint32
- addr [16]uint8_t
- sortkey int32
+ Ffamily int32
+ Fscopeid uint32
+ Faddr [16]uint8_t
+ Fsortkey int32
} /* lookup.h:20:1 */
type service = struct {
- port uint16_t
- proto uint8
- socktype uint8
+ Fport uint16_t
+ Fproto uint8
+ Fsocktype uint8
} /* lookup.h:27:1 */
type resolvconf = struct {
- ns [3]struct {
- family int32
- scopeid uint32
- addr [16]uint8_t
- sortkey int32
- }
- nns uint32
- attempts uint32
- ndots uint32
- timeout uint32
+ Fns [3]struct {
+ Ffamily int32
+ Fscopeid uint32
+ Faddr [16]uint8_t
+ Fsortkey int32
+ }
+ Fnns uint32
+ Fattempts uint32
+ Fndots uint32
+ Ftimeout uint32
} /* lookup.h:34:1 */
func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */
var cnt size_t
cnt = uint64(1)
__1:
- if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) {
+ if !((*addrinfo)(unsafe.Pointer(p)).Fai_next != 0) {
goto __3
}
goto __2
__2:
cnt++
- p = (*addrinfo)(unsafe.Pointer(p)).ai_next
+ p = (*addrinfo)(unsafe.Pointer(p)).Fai_next
goto __1
goto __3
__3:
;
var b uintptr = p - uintptr(uint64(uintptr(0)))
- b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot)
+ b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).Fslot)
//TODO LOCK(b->lock);
if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) {
Xfree(tls, b)
@@ -5076,8 +5076,8 @@ type time_t = int64 /* alltypes.h:85:16 */
type clockid_t = int32 /* alltypes.h:214:13 */
type timespec = struct {
- tv_sec time_t
- tv_nsec int64
+ Ftv_sec time_t
+ Ftv_nsec int64
} /* alltypes.h:229:1 */
type pthread_t = uintptr /* alltypes.h:273:26 */
@@ -5088,62 +5088,62 @@ type pthread_key_t = uint32 /* alltypes.h:284:18 */
type pthread_spinlock_t = int32 /* alltypes.h:289:13 */
-type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:294:37 */
+type pthread_mutexattr_t = struct{ F__attr uint32 } /* alltypes.h:294:37 */
-type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */
+type pthread_condattr_t = struct{ F__attr uint32 } /* alltypes.h:299:37 */
-type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */
+type pthread_barrierattr_t = struct{ F__attr uint32 } /* alltypes.h:304:37 */
-type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */
+type pthread_rwlockattr_t = struct{ F__attr [2]uint32 } /* alltypes.h:309:40 */
-type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:349:9 */
+type __sigset_t = struct{ F__bits [16]uint64 } /* alltypes.h:349:9 */
type sigset_t = __sigset_t /* alltypes.h:349:71 */
type pthread_attr_t = struct {
- __u struct {
- _ [0]uint64
- __i [14]int32
+ F__u struct {
+ F__ccgo_pad1 [0]uint64
+ F__i [14]int32
}
} /* alltypes.h:372:147 */
type pthread_mutex_t = struct {
- __u struct {
- _ [0]uint64
- __i [10]int32
+ F__u struct {
+ F__ccgo_pad1 [0]uint64
+ F__i [10]int32
}
} /* alltypes.h:377:157 */
type pthread_cond_t = struct {
- __u struct {
- _ [0]uint64
- __i [12]int32
+ F__u struct {
+ F__ccgo_pad1 [0]uint64
+ F__i [12]int32
}
} /* alltypes.h:387:112 */
type pthread_rwlock_t = struct {
- __u struct {
- _ [0]uint64
- __i [14]int32
+ F__u struct {
+ F__ccgo_pad1 [0]uint64
+ F__i [14]int32
}
} /* alltypes.h:397:139 */
type pthread_barrier_t = struct {
- __u struct {
- _ [0]uint64
- __i [8]int32
+ F__u struct {
+ F__ccgo_pad1 [0]uint64
+ F__i [8]int32
}
} /* alltypes.h:402:137 */
type sched_param = struct {
- sched_priority int32
- __reserved1 int32
- __reserved2 [2]struct {
- __reserved1 time_t
- __reserved2 int64
- }
- __reserved3 int32
- _ [4]byte
+ Fsched_priority int32
+ F__reserved1 int32
+ F__reserved2 [2]struct {
+ F__reserved1 time_t
+ F__reserved2 int64
+ }
+ F__reserved3 int32
+ F__ccgo_pad1 [4]byte
} /* sched.h:19:1 */
type timer_t = uintptr /* alltypes.h:209:14 */
@@ -5151,35 +5151,35 @@ type timer_t = uintptr /* alltypes.h:209:14 */
type clock_t = int64 /* alltypes.h:219:14 */
type tm = struct {
- tm_sec int32
- tm_min int32
- tm_hour int32
- tm_mday int32
- tm_mon int32
- tm_year int32
- tm_wday int32
- tm_yday int32
- tm_isdst int32
- _ [4]byte
- tm_gmtoff int64
- tm_zone uintptr
+ Ftm_sec int32
+ Ftm_min int32
+ Ftm_hour int32
+ Ftm_mday int32
+ Ftm_mon int32
+ Ftm_year int32
+ Ftm_wday int32
+ Ftm_yday int32
+ Ftm_isdst int32
+ F__ccgo_pad1 [4]byte
+ Ftm_gmtoff int64
+ Ftm_zone uintptr
} /* time.h:38:1 */
type itimerspec = struct {
- it_interval struct {
- tv_sec time_t
- tv_nsec int64
+ Fit_interval struct {
+ Ftv_sec time_t
+ Ftv_nsec int64
}
- it_value struct {
- tv_sec time_t
- tv_nsec int64
+ Fit_value struct {
+ Ftv_sec time_t
+ Ftv_nsec int64
}
} /* time.h:80:1 */
type __ptcb = struct {
- __f uintptr
- __x uintptr
- __next uintptr
+ F__f uintptr
+ F__x uintptr
+ F__next uintptr
} /* pthread.h:206:1 */
type useconds_t = uint32 /* alltypes.h:260:18 */
@@ -5213,10 +5213,10 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt
}
if hint != 0 {
- family = (*addrinfo)(unsafe.Pointer(hint)).ai_family
- flags = (*addrinfo)(unsafe.Pointer(hint)).ai_flags
- proto = (*addrinfo)(unsafe.Pointer(hint)).ai_protocol
- socktype = (*addrinfo)(unsafe.Pointer(hint)).ai_socktype
+ family = (*addrinfo)(unsafe.Pointer(hint)).Fai_family
+ flags = (*addrinfo)(unsafe.Pointer(hint)).Fai_flags
+ proto = (*addrinfo)(unsafe.Pointer(hint)).Fai_protocol
+ socktype = (*addrinfo)(unsafe.Pointer(hint)).Fai_socktype
var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400
if flags&mask != flags {
@@ -5312,7 +5312,7 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt
goto __3
}
{
- (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k)
+ (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fslot = int16(k)
//TODO out[k].ai = (struct addrinfo){
//TODO .ai_family = addrs[i].family,
//TODO .ai_socktype = ports[j].socktype,
@@ -5322,30 +5322,30 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt
//TODO : sizeof(struct sockaddr_in6),
//TODO .ai_addr = (void *)&out[k].sa,
//TODO .ai_canonname = outcanon };
- (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family
- (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).socktype)
- (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).proto)
- (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addrlen = func() uint32 {
- if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).family == 2 {
+ (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily
+ (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fsocktype)
+ (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).Fproto)
+ (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addrlen = func() uint32 {
+ if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).Ffamily == 2 {
return uint32(unsafe.Sizeof(sockaddr_in{}))
}
return uint32(unsafe.Sizeof(sockaddr_in6{}))
}()
- (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addr = out + uintptr(k)*88 + 48
- (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_canonname = outcanon
+ (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_addr = out + uintptr(k)*88 + 48
+ (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).Fai.Fai_canonname = outcanon
if k != 0 {
- (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88
+ (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).Fai.Fai_next = out + uintptr(k)*88
}
- switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family {
+ switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Ffamily {
case 2:
- (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_family = sa_family_t(2)
- (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port)
+ (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_family = sa_family_t(2)
+ (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport)
Xmemcpy(tls, out+uintptr(k)*88+48+4, bp+8+uintptr(i)*28+8, uint64(4))
break
case 10:
- (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_family = sa_family_t(10)
- (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port)
- (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).scopeid
+ (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_family = sa_family_t(10)
+ (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).Fport)
+ (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).Fsin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).Fscopeid
Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16))
break
}
@@ -5359,33 +5359,33 @@ func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintpt
goto __3
__3:
}
- (*aibuf)(unsafe.Pointer(out)).ref = int16(nais)
+ (*aibuf)(unsafe.Pointer(out)).Fref = int16(nais)
*(*uintptr)(unsafe.Pointer(res)) = out
return 0
}
type ucred = struct {
- pid pid_t
- uid uid_t
- gid gid_t
+ Fpid pid_t
+ Fuid uid_t
+ Fgid gid_t
} /* socket.h:57:1 */
type mmsghdr = struct {
- msg_hdr struct {
- msg_name uintptr
- msg_namelen socklen_t
- _ [4]byte
- msg_iov uintptr
- msg_iovlen int32
- __pad1 int32
- msg_control uintptr
- msg_controllen socklen_t
- __pad2 int32
- msg_flags int32
- _ [4]byte
- }
- msg_len uint32
- _ [4]byte
+ Fmsg_hdr struct {
+ Fmsg_name uintptr
+ Fmsg_namelen socklen_t
+ F__ccgo_pad1 [4]byte
+ Fmsg_iov uintptr
+ Fmsg_iovlen int32
+ F__pad1 int32
+ Fmsg_control uintptr
+ Fmsg_controllen socklen_t
+ F__pad2 int32
+ Fmsg_flags int32
+ F__ccgo_pad2 [4]byte
+ }
+ Fmsg_len uint32
+ F__ccgo_pad1 [4]byte
} /* socket.h:63:1 */
func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */
@@ -5483,8 +5483,8 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr,
}
}
- (*hostent)(unsafe.Pointer(h)).h_addrtype = af
- (*hostent)(unsafe.Pointer(h)).h_length = func() int32 {
+ (*hostent)(unsafe.Pointer(h)).Fh_addrtype = af
+ (*hostent)(unsafe.Pointer(h)).Fh_length = func() int32 {
if af == 10 {
return 16
}
@@ -5495,7 +5495,7 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr,
align = -uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1))
need = uint64(4) * uint64(unsafe.Sizeof(uintptr(0)))
- need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).h_length))
+ need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).Fh_length))
need = need + (Xstrlen(tls, name) + uint64(1))
need = need + (Xstrlen(tls, bp+1344) + uint64(1))
need = need + align
@@ -5505,117 +5505,117 @@ func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr,
}
buf += uintptr(align)
- (*hostent)(unsafe.Pointer(h)).h_aliases = buf
+ (*hostent)(unsafe.Pointer(h)).Fh_aliases = buf
buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0))))
- (*hostent)(unsafe.Pointer(h)).h_addr_list = buf
+ (*hostent)(unsafe.Pointer(h)).Fh_addr_list = buf
buf += uintptr(uint64(cnt+1) * uint64(unsafe.Sizeof(uintptr(0))))
for i = 0; i < cnt; i++ {
- *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = buf
- buf += uintptr((*hostent)(unsafe.Pointer(h)).h_length)
- Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).h_length))
+ *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = buf
+ buf += uintptr((*hostent)(unsafe.Pointer(h)).Fh_length)
+ Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).Fh_length))
}
- *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0)
+ *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_addr_list + uintptr(i)*8)) = uintptr(0)
- (*hostent)(unsafe.Pointer(h)).h_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).h_aliases, buf)
- Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).h_name, bp+1344)
- buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).h_name) + uint64(1))
+ (*hostent)(unsafe.Pointer(h)).Fh_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).Fh_aliases, buf)
+ Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, bp+1344)
+ buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).Fh_name) + uint64(1))
- if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).h_name, name) != 0 {
- *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = buf
- Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)), name)
- buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8))) + uint64(1))
+ if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).Fh_name, name) != 0 {
+ *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = buf
+ Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)), name)
+ buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8))) + uint64(1))
} else {
- *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0)
+ *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 1*8)) = uintptr(0)
}
- *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0)
+ *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).Fh_aliases + 2*8)) = uintptr(0)
*(*uintptr)(unsafe.Pointer(res)) = h
return 0
}
type if_nameindex = struct {
- if_index uint32
- _ [4]byte
- if_name uintptr
+ Fif_index uint32
+ F__ccgo_pad1 [4]byte
+ Fif_name uintptr
} /* if.h:12:1 */
type ifaddr = struct {
- ifa_addr struct {
- sa_family sa_family_t
- sa_data [14]int8
+ Fifa_addr struct {
+ Fsa_family sa_family_t
+ Fsa_data [14]int8
}
- ifa_ifu struct {
- ifu_broadaddr struct {
- sa_family sa_family_t
- sa_data [14]int8
+ Fifa_ifu struct {
+ Fifu_broadaddr struct {
+ Fsa_family sa_family_t
+ Fsa_data [14]int8
}
}
- ifa_ifp uintptr
- ifa_next uintptr
+ Fifa_ifp uintptr
+ Fifa_next uintptr
} /* if.h:51:1 */
type ifmap = struct {
- mem_start uint64
- mem_end uint64
- base_addr uint16
- irq uint8
- dma uint8
- port uint8
- _ [3]byte
+ Fmem_start uint64
+ Fmem_end uint64
+ Fbase_addr uint16
+ Firq uint8
+ Fdma uint8
+ Fport uint8
+ F__ccgo_pad1 [3]byte
} /* if.h:64:1 */
type ifreq = struct {
- ifr_ifrn struct{ ifrn_name [16]int8 }
- ifr_ifru struct {
- _ [0]uint64
- ifru_addr struct {
- sa_family sa_family_t
- sa_data [14]int8
+ Fifr_ifrn struct{ Fifrn_name [16]int8 }
+ Fifr_ifru struct {
+ F__ccgo_pad1 [0]uint64
+ Fifru_addr struct {
+ Fsa_family sa_family_t
+ Fsa_data [14]int8
}
- _ [8]byte
+ F__ccgo_pad2 [8]byte
}
} /* if.h:76:1 */
type ifconf = struct {
- ifc_len int32
- _ [4]byte
- ifc_ifcu struct{ ifcu_buf uintptr }
+ Fifc_len int32
+ F__ccgo_pad1 [4]byte
+ Fifc_ifcu struct{ Fifcu_buf uintptr }
} /* if.h:116:1 */
type ns_sect = uint32 /* nameser.h:37:3 */
type __ns_msg = struct {
- _msg uintptr
- _eom uintptr
- _id uint16_t
- _flags uint16_t
- _counts [4]uint16_t
- _ [4]byte
- _sections [4]uintptr
- _sect ns_sect
- _rrnum int32
- _msg_ptr uintptr
+ F_msg uintptr
+ F_eom uintptr
+ F_id uint16_t
+ F_flags uint16_t
+ F_counts [4]uint16_t
+ F__ccgo_pad1 [4]byte
+ F_sections [4]uintptr
+ F_sect ns_sect
+ F_rrnum int32
+ F_msg_ptr uintptr
} /* nameser.h:39:9 */
type ns_msg = __ns_msg /* nameser.h:46:3 */
type _ns_flagdata = struct {
- mask int32
- shift int32
+ Fmask int32
+ Fshift int32
} /* nameser.h:48:1 */
type __ns_rr = struct {
- name [1025]int8
- _ [1]byte
- __type uint16_t
- rr_class uint16_t
- _ [2]byte
- ttl uint32_t
- rdlength uint16_t
- _ [2]byte
- rdata uintptr
+ Fname [1025]int8
+ F__ccgo_pad1 [1]byte
+ Ftype uint16_t
+ Frr_class uint16_t
+ F__ccgo_pad2 [2]byte
+ Fttl uint32_t
+ Frdlength uint16_t
+ F__ccgo_pad3 [2]byte
+ Frdata uintptr
} /* nameser.h:59:9 */
type ns_rr = __ns_rr /* nameser.h:66:3 */
@@ -5629,24 +5629,24 @@ type ns_rcode = uint32 /* nameser.h:115:3 */
type ns_update_operation = uint32 /* nameser.h:121:3 */
type ns_tsig_key1 = struct {
- name [1025]int8
- alg [1025]int8
- _ [6]byte
- data uintptr
- len int32
- _ [4]byte
+ Fname [1025]int8
+ Falg [1025]int8
+ F__ccgo_pad1 [6]byte
+ Fdata uintptr
+ Flen int32
+ F__ccgo_pad2 [4]byte
} /* nameser.h:123:1 */
type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */
type ns_tcp_tsig_state1 = struct {
- counter int32
- _ [4]byte
- key uintptr
- ctx uintptr
- sig [512]uint8
- siglen int32
- _ [4]byte
+ Fcounter int32
+ F__ccgo_pad1 [4]byte
+ Fkey uintptr
+ Fctx uintptr
+ Fsig [512]uint8
+ Fsiglen int32
+ F__ccgo_pad2 [4]byte
} /* nameser.h:130:1 */
type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */
@@ -5660,45 +5660,45 @@ type ns_key_types = uint32 /* nameser.h:226:3 */
type ns_cert_types = uint32 /* nameser.h:234:3 */
type HEADER = struct {
- _ [0]uint32
- id uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */
- qdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */
- nscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */
+ F__ccgo_pad1 [0]uint32
+ Fid uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */
+ Fqdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */
+ Fnscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */
} /* nameser.h:353:3 */
// unused; purely for broken apps
type __res_state = struct {
- retrans int32
- retry int32
- options uint64
- nscount int32
- nsaddr_list [3]struct {
- sin_family sa_family_t
- sin_port in_port_t
- sin_addr struct{ s_addr in_addr_t }
- sin_zero [8]uint8_t
- }
- id uint16
- _ [2]byte
- dnsrch [7]uintptr
- defdname [256]int8
- pfcode uint64
- ndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */
- _ [4]byte
- sort_list [10]struct {
- addr struct{ s_addr in_addr_t }
- mask uint32_t
- }
- qhook uintptr
- rhook uintptr
- res_h_errno int32
- _vcsock int32
- _flags uint32
- _ [4]byte
- _u struct {
- _ [0]uint64
- pad [52]int8
- _ [4]byte
+ Fretrans int32
+ Fretry int32
+ Foptions uint64
+ Fnscount int32
+ Fnsaddr_list [3]struct {
+ Fsin_family sa_family_t
+ Fsin_port in_port_t
+ Fsin_addr struct{ Fs_addr in_addr_t }
+ Fsin_zero [8]uint8_t
+ }
+ Fid uint16
+ F__ccgo_pad1 [2]byte
+ Fdnsrch [7]uintptr
+ Fdefdname [256]int8
+ Fpfcode uint64
+ Fndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */
+ F__ccgo_pad2 [4]byte
+ Fsort_list [10]struct {
+ Faddr struct{ Fs_addr in_addr_t }
+ Fmask uint32_t
+ }
+ Fqhook uintptr
+ Frhook uintptr
+ Fres_h_errno int32
+ F_vcsock int32
+ F_flags uint32
+ F__ccgo_pad3 [4]byte
+ F_u struct {
+ F__ccgo_pad1 [0]uint64
+ Fpad [52]int8
+ F__ccgo_pad2 [4]byte
}
} /* resolv.h:26:9 */
@@ -5706,10 +5706,10 @@ type __res_state = struct {
type res_state = uintptr /* resolv.h:62:3 */
type res_sym = struct {
- number int32
- _ [4]byte
- name uintptr
- humanname uintptr
+ Fnumber int32
+ F__ccgo_pad1 [4]byte
+ Fname uintptr
+ Fhumanname uintptr
} /* resolv.h:70:1 */
func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */
@@ -5780,13 +5780,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3
continue
}
- if (*address)(unsafe.Pointer(bp+528)).family == 2 {
+ if (*address)(unsafe.Pointer(bp+528)).Ffamily == 2 {
Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4))
Xmemcpy(tls, bp+528+8, ts+129, uint64(12))
- (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0)
+ (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).Fscopeid = uint32(0)
}
- if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid {
+ if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).Fscopeid != scopeid {
continue
}
@@ -6071,8 +6071,8 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3
return -2
}
Xmemcpy(tls, buf+8, bp, uint64(unsafe.Sizeof(in_addr{})))
- (*address)(unsafe.Pointer(buf)).family = 2
- (*address)(unsafe.Pointer(buf)).scopeid = uint32(0)
+ (*address)(unsafe.Pointer(buf)).Ffamily = 2
+ (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(0)
return 1
}
// var tmp [64]int8 at bp+4, 64
@@ -6095,7 +6095,7 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3
}
Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{})))
- (*address)(unsafe.Pointer(buf)).family = 10
+ (*address)(unsafe.Pointer(buf)).Ffamily = 10
if p != 0 {
if func() int32 {
if 0 != 0 {
@@ -6119,20 +6119,20 @@ func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int3
return -2
}
}
- (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid)
+ (*address)(unsafe.Pointer(buf)).Fscopeid = uint32(scopeid)
return 1
}
type mode_t = uint32 /* alltypes.h:152:18 */
type flock = struct {
- l_type int16
- l_whence int16
- _ [4]byte
- l_start off_t
- l_len off_t
- l_pid pid_t
- _ [4]byte
+ Fl_type int16
+ Fl_whence int16
+ F__ccgo_pad1 [4]byte
+ Fl_start off_t
+ Fl_len off_t
+ Fl_pid pid_t
+ F__ccgo_pad2 [4]byte
} /* fcntl.h:24:1 */
func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */
@@ -6158,14 +6158,14 @@ func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int
//TODO buf[cnt++] = (struct address){ .family = AF_INET };
if family != 10 {
var x = Xzero_struct_address
- x.family = 2
+ x.Ffamily = 2
*(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x
}
//TODO if (family != AF_INET)
//TODO buf[cnt++] = (struct address){ .family = AF_INET6 };
if family != 2 {
var x = Xzero_struct_address
- x.family = 10
+ x.Ffamily = 10
*(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x
}
} else {
@@ -6258,10 +6258,10 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family
}
type dpc_ctx = struct {
- addrs uintptr
- canon uintptr
- cnt int32
- _ [4]byte
+ Faddrs uintptr
+ Fcanon uintptr
+ Fcnt int32
+ F__ccgo_pad1 [4]byte
} /* lookup_name.c:112:1 */
func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */
@@ -6311,31 +6311,31 @@ func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, fa
}
type policy = struct {
- addr [16]uint8
- len uint8
- mask uint8
- prec uint8
- label uint8
+ Faddr [16]uint8
+ Flen uint8
+ Fmask uint8
+ Fprec uint8
+ Flabel uint8
} /* lookup_name.c:237:14 */
var defpolicy = [6]policy{
- {addr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)},
- {addr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)},
- {addr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)},
- {addr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)},
- {addr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)},
+ {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 211)), Flen: uint8(15), Fmask: uint8(0xff), Fprec: uint8(50)},
+ {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 228)), Flen: uint8(11), Fmask: uint8(0xff), Fprec: uint8(35), Flabel: uint8(4)},
+ {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 244)), Flen: uint8(1), Fmask: uint8(0xff), Fprec: uint8(30), Flabel: uint8(2)},
+ {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 260)), Flen: uint8(3), Fmask: uint8(0xff), Fprec: uint8(5), Flabel: uint8(5)},
+ {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 276)), Fmask: uint8(0xfe), Fprec: uint8(3), Flabel: uint8(13)},
// Last rule must match all addresses to stop loop.
- {addr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), prec: uint8(40), label: uint8(1)},
+ {Faddr: *(*[16]uint8)(unsafe.Pointer(ts + 292)), Fprec: uint8(40), Flabel: uint8(1)},
} /* lookup_name.c:241:3 */
func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */
var i int32
for i = 0; ; i++ {
- if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].len)) != 0 {
+ if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].Flen)) != 0 {
continue
}
- if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].len))))&int32(defpolicy[i].mask) !=
- int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].len)))) {
+ if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].Flen))))&int32(defpolicy[i].Fmask) !=
+ int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].Flen)))) {
continue
}
return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20
@@ -6344,7 +6344,7 @@ func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */
}
func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */
- return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label)
+ return int32((*policy)(unsafe.Pointer(policyof(tls, a))).Flabel)
}
func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */
@@ -6377,7 +6377,7 @@ func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12
func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */
var a uintptr = _a
var b uintptr = _b
- return (*address)(unsafe.Pointer(b)).sortkey - (*address)(unsafe.Pointer(a)).sortkey
+ return (*address)(unsafe.Pointer(b)).Fsortkey - (*address)(unsafe.Pointer(a)).Fsortkey
}
func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */
@@ -6457,7 +6457,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
return cnt
}
for i = 0; i < cnt; i++ {
- if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 {
+ if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).Ffamily != 2 {
break
}
}
@@ -6474,12 +6474,12 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
// excessive runtime and code size cost and dubious benefit.
// So far the label/precedence table cannot be customized.
for i = 0; i < cnt; i++ {
- var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family
+ var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Ffamily
var key int32 = 0
*(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{}
- *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid}
+ *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{Fsin6_family: sa_family_t(10), Fsin6_port: in_port_t(65535), Fsin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fscopeid}
*(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{}
- *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)}
+ *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{Fsin_family: sa_family_t(2), Fsin_port: in_port_t(65535)}
var sa1 uintptr
var da uintptr
// var salen socklen_t at bp+88, 4
@@ -6506,8 +6506,8 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
}
var dpolicy uintptr = policyof(tls, bp+8)
var dscope int32 = scopeof(tls, bp+8)
- var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label)
- var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec)
+ var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Flabel)
+ var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).Fprec)
var prefixlen int32 = 0
var fd int32 = Xsocket(tls, family, 2|02000000, 17)
if fd >= 0 {
@@ -6535,7 +6535,7 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
key = key | (15-dscope)<<16
key = key | prefixlen<<8
key = key | (48-i)<<0
- (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key
+ (*address)(unsafe.Pointer(buf + uintptr(i)*28)).Fsortkey = key
}
Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct {
f func(*TLS, uintptr, uintptr) int32
@@ -6587,9 +6587,9 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i
if name != 0 {
return -8
}
- (*service)(unsafe.Pointer(buf)).port = uint16_t(0)
- (*service)(unsafe.Pointer(buf)).proto = uint8(proto)
- (*service)(unsafe.Pointer(buf)).socktype = uint8(socktype)
+ (*service)(unsafe.Pointer(buf)).Fport = uint16_t(0)
+ (*service)(unsafe.Pointer(buf)).Fproto = uint8(proto)
+ (*service)(unsafe.Pointer(buf)).Fsocktype = uint8(socktype)
return 1
}
@@ -6604,14 +6604,14 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i
return -8
}
if proto != 17 {
- (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port)
- (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(1)
- (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(6)
+ (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port)
+ (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(1)
+ (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(6)
}
if proto != 6 {
- (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port)
- (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(2)
- (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(17)
+ (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fport = uint16_t(port)
+ (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).Fsocktype = uint8(2)
+ (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).Fproto = uint8(17)
}
return cnt
}
@@ -6672,19 +6672,19 @@ func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype i
}
func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */
- *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1
- if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase {
+ *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).Fmode - 1
+ if (*FILE)(unsafe.Pointer(f)).Fwpos != (*FILE)(unsafe.Pointer(f)).Fwbase {
(*struct {
f func(*TLS, uintptr, uintptr, size_t) size_t
- })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).write})).f(tls, f, uintptr(0), uint64(0))
+ })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fwrite})).f(tls, f, uintptr(0), uint64(0))
}
- (*FILE)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0)))
- if (*FILE)(unsafe.Pointer(f)).flags&uint32(4) != 0 {
+ (*FILE)(unsafe.Pointer(f)).Fwpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0)))
+ if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(4) != 0 {
*(*uint32)(unsafe.Pointer(f)) |= uint32(32)
return -1
}
- (*FILE)(unsafe.Pointer(f)).rpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).buf+uintptr((*FILE)(unsafe.Pointer(f)).buf_size))
- if (*FILE)(unsafe.Pointer(f)).flags&uint32(16) != 0 {
+ (*FILE)(unsafe.Pointer(f)).Frpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).Fbuf+uintptr((*FILE)(unsafe.Pointer(f)).Fbuf_size))
+ if (*FILE)(unsafe.Pointer(f)).Fflags&uint32(16) != 0 {
return -1
}
return 0
@@ -6706,7 +6706,7 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
if !(X__toread(tls, f) != 0) && (*struct {
f func(*TLS, uintptr, uintptr, size_t) size_t
- })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).read})).f(tls, f, bp, uint64(1)) == uint64(1) {
+ })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).Fread})).f(tls, f, bp, uint64(1)) == uint64(1) {
return int32(*(*uint8)(unsafe.Pointer(bp)))
}
return -1
@@ -6738,11 +6738,11 @@ func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:
// var f FILE at bp, 232
- (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s)
- (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1)
+ (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s)
+ (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1)
X__shlim(tls, bp, int64(0))
var y float64 = X__floatscan(tls, bp, prec, 1)
- var cnt off_t = (*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1
+ var cnt off_t = (*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1
if p != 0 {
*(*uintptr)(unsafe.Pointer(p)) = func() uintptr {
if cnt != 0 {
@@ -6772,12 +6772,12 @@ func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /*
// var f FILE at bp, 232
- (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s)
- (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1)
+ (*FILE)(unsafe.Pointer(bp)).Fbuf = AssignPtrUintptr(bp+8, s)
+ (*FILE)(unsafe.Pointer(bp)).Frend = UintptrFromInt32(-1)
X__shlim(tls, bp, int64(0))
var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim)
if p != 0 {
- var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1)
+ var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).Fshcnt + (int64((*FILE)(unsafe.Pointer(bp)).Frpos)-int64((*FILE)(unsafe.Pointer(bp)).Fbuf))/1)
*(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt)
}
return y