1
0
mirror of https://github.com/golang/go synced 2024-11-25 21:47:59 -07:00

arm: fix build, regenerate syscall files

R=r
CC=golang-dev
https://golang.org/cl/1952046
This commit is contained in:
Kai Backman 2010-08-23 13:25:14 +03:00
parent 4642708984
commit 534dbc738f
6 changed files with 148 additions and 105 deletions

View File

@ -143,12 +143,10 @@ nacl_386)
mkerrors="./mkerrors_nacl.sh $NACLRUN/include/sys/errno.h" mkerrors="./mkerrors_nacl.sh $NACLRUN/include/sys/errno.h"
;; ;;
linux_arm) linux_arm)
ARM="/home/kaib/public/linux-2.6.28" mkerrors="$mkerrors"
mksyscall="./mksyscall.sh -l32" mksyscall="./mksyscall.sh -l32"
mksysnum="./mksysnum_linux.sh $ARM/arch/arm/include/asm/unistd.h" mksysnum="./mksysnum_linux.sh /usr/include/asm/unistd.h"
# mktypes="godefs -gsyscall -carm-gcc -f-I$ARM/arch/arm/include -f-I$ARM/include -f-D__deprecated='' -f-I$ARM/arch/arm/mach-at91/include -f-DCONFIG_ARCH_AT91SAM9260 " mktypes="godefs -gsyscall"
mktypes="godefs -gsyscall -carm-gcc"
mkerrors='GORUN="qemu-arm -cpu cortex-a8" ./mkerrors.sh'
;; ;;
windows_386) windows_386)
mksyscall="./mksyscall_windows.sh -l32" mksyscall="./mksyscall_windows.sh -l32"

View File

@ -11,14 +11,7 @@ unset LANG
export LC_ALL=C export LC_ALL=C
export LC_CTYPE=C export LC_CTYPE=C
case "$GOARCH" in
arm)
GCC=arm-gcc
;;
*)
GCC=gcc GCC=gcc
;;
esac
uname=$(uname) uname=$(uname)

View File

@ -4,15 +4,6 @@
package syscall package syscall
// These seem not to be defined in our gcc's ARM headers
// and are thus missing from zerrors_linux_arm.go.
const (
WSTOPPED = 0x7f
O_CLOEXEC = 0
EPOLLRDHUP = EPOLLHUP
EPOLLONESHOT = 0x40000000
)
func Getpagesize() int { return 4096 } func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
@ -41,6 +32,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
//sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) //sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int)
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, errno int) //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, errno int)
//sys sendto(s int, buf []byte, flags int, to uintptr, addrlen _Socklen) (errno int) //sys sendto(s int, buf []byte, flags int, to uintptr, addrlen _Socklen) (errno int)
//sys socketpair(domain int, typ int, flags int, fd *[2]int) (errno int)
//sys Chown(path string, uid int, gid int) (errno int) //sys Chown(path string, uid int, gid int) (errno int)
//sys Fchown(fd int, uid int, gid int) (errno int) //sys Fchown(fd int, uid int, gid int) (errno int)

View File

@ -1,7 +1,7 @@
// mkerrors.sh // mkerrors.sh
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// godefs -c arm-gcc -gsyscall _const.c // godefs -c gcc -gsyscall _const.c
// MACHINE GENERATED - DO NOT EDIT. // MACHINE GENERATED - DO NOT EDIT.
@ -23,9 +23,11 @@ const (
AF_INET6 = 0xa AF_INET6 = 0xa
AF_IPX = 0x4 AF_IPX = 0x4
AF_IRDA = 0x17 AF_IRDA = 0x17
AF_ISDN = 0x22
AF_IUCV = 0x20
AF_KEY = 0xf AF_KEY = 0xf
AF_LOCAL = 0x1 AF_LOCAL = 0x1
AF_MAX = 0x20 AF_MAX = 0x23
AF_NETBEUI = 0xd AF_NETBEUI = 0xd
AF_NETLINK = 0x10 AF_NETLINK = 0x10
AF_NETROM = 0x6 AF_NETROM = 0x6
@ -33,6 +35,7 @@ const (
AF_PPPOX = 0x18 AF_PPPOX = 0x18
AF_ROSE = 0xb AF_ROSE = 0xb
AF_ROUTE = 0x10 AF_ROUTE = 0x10
AF_RXRPC = 0x21
AF_SECURITY = 0xe AF_SECURITY = 0xe
AF_SNA = 0x16 AF_SNA = 0x16
AF_UNIX = 0x1 AF_UNIX = 0x1
@ -152,15 +155,19 @@ const (
EPOLLHUP = 0x10 EPOLLHUP = 0x10
EPOLLIN = 0x1 EPOLLIN = 0x1
EPOLLMSG = 0x400 EPOLLMSG = 0x400
EPOLLONESHOT = 0x40000000
EPOLLOUT = 0x4 EPOLLOUT = 0x4
EPOLLPRI = 0x2 EPOLLPRI = 0x2
EPOLLRDBAND = 0x80 EPOLLRDBAND = 0x80
EPOLLRDHUP = 0x2000
EPOLLRDNORM = 0x40 EPOLLRDNORM = 0x40
EPOLLWRBAND = 0x200 EPOLLWRBAND = 0x200
EPOLLWRNORM = 0x100 EPOLLWRNORM = 0x100
EPOLL_CLOEXEC = 0x80000
EPOLL_CTL_ADD = 0x1 EPOLL_CTL_ADD = 0x1
EPOLL_CTL_DEL = 0x2 EPOLL_CTL_DEL = 0x2
EPOLL_CTL_MOD = 0x3 EPOLL_CTL_MOD = 0x3
EPOLL_NONBLOCK = 0x800
EPROTO = 0x47 EPROTO = 0x47
EPROTONOSUPPORT = 0x5d EPROTONOSUPPORT = 0x5d
EPROTOTYPE = 0x5b EPROTOTYPE = 0x5b
@ -169,6 +176,7 @@ const (
EREMOTE = 0x42 EREMOTE = 0x42
EREMOTEIO = 0x79 EREMOTEIO = 0x79
ERESTART = 0x55 ERESTART = 0x55
ERFKILL = 0x84
EROFS = 0x1e EROFS = 0x1e
ESHUTDOWN = 0x6c ESHUTDOWN = 0x6c
ESOCKTNOSUPPORT = 0x5e ESOCKTNOSUPPORT = 0x5e
@ -187,10 +195,10 @@ const (
EWOULDBLOCK = 0xb EWOULDBLOCK = 0xb
EXDEV = 0x12 EXDEV = 0x12
EXFULL = 0x36 EXFULL = 0x36
EXPR_NEST_MAX = 0x20
FD_CLOEXEC = 0x1 FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400 FD_SETSIZE = 0x400
F_DUPFD = 0 F_DUPFD = 0
F_DUPFD_CLOEXEC = 0x406
F_EXLCK = 0x4 F_EXLCK = 0x4
F_GETFD = 0x1 F_GETFD = 0x1
F_GETFL = 0x3 F_GETFL = 0x3
@ -220,6 +228,7 @@ const (
F_WRLCK = 0x1 F_WRLCK = 0x1
IPPROTO_AH = 0x33 IPPROTO_AH = 0x33
IPPROTO_COMP = 0x6c IPPROTO_COMP = 0x6c
IPPROTO_DCCP = 0x21
IPPROTO_DSTOPTS = 0x3c IPPROTO_DSTOPTS = 0x3c
IPPROTO_EGP = 0x8 IPPROTO_EGP = 0x8
IPPROTO_ENCAP = 0x62 IPPROTO_ENCAP = 0x62
@ -241,18 +250,29 @@ const (
IPPROTO_RAW = 0xff IPPROTO_RAW = 0xff
IPPROTO_ROUTING = 0x2b IPPROTO_ROUTING = 0x2b
IPPROTO_RSVP = 0x2e IPPROTO_RSVP = 0x2e
IPPROTO_SCTP = 0x84
IPPROTO_TCP = 0x6 IPPROTO_TCP = 0x6
IPPROTO_TP = 0x1d IPPROTO_TP = 0x1d
IPPROTO_UDP = 0x11 IPPROTO_UDP = 0x11
IPPROTO_UDPLITE = 0x88
IPV6_2292DSTOPTS = 0x4
IPV6_2292HOPLIMIT = 0x8
IPV6_2292HOPOPTS = 0x3
IPV6_2292PKTINFO = 0x2
IPV6_2292PKTOPTIONS = 0x6
IPV6_2292RTHDR = 0x5
IPV6_ADDRFORM = 0x1 IPV6_ADDRFORM = 0x1
IPV6_ADD_MEMBERSHIP = 0x14 IPV6_ADD_MEMBERSHIP = 0x14
IPV6_AUTHHDR = 0xa IPV6_AUTHHDR = 0xa
IPV6_CHECKSUM = 0x7 IPV6_CHECKSUM = 0x7
IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DROP_MEMBERSHIP = 0x15
IPV6_DSTOPTS = 0x4 IPV6_DSTOPTS = 0x3b
IPV6_HOPLIMIT = 0x8 IPV6_HOPLIMIT = 0x34
IPV6_HOPOPTS = 0x3 IPV6_HOPOPTS = 0x36
IPV6_IPSEC_POLICY = 0x22
IPV6_JOIN_ANYCAST = 0x1b
IPV6_JOIN_GROUP = 0x14 IPV6_JOIN_GROUP = 0x14
IPV6_LEAVE_ANYCAST = 0x1c
IPV6_LEAVE_GROUP = 0x15 IPV6_LEAVE_GROUP = 0x15
IPV6_MTU = 0x18 IPV6_MTU = 0x18
IPV6_MTU_DISCOVER = 0x17 IPV6_MTU_DISCOVER = 0x17
@ -260,29 +280,43 @@ const (
IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_IF = 0x11
IPV6_MULTICAST_LOOP = 0x13 IPV6_MULTICAST_LOOP = 0x13
IPV6_NEXTHOP = 0x9 IPV6_NEXTHOP = 0x9
IPV6_PKTINFO = 0x2 IPV6_PKTINFO = 0x32
IPV6_PKTOPTIONS = 0x6
IPV6_PMTUDISC_DO = 0x2 IPV6_PMTUDISC_DO = 0x2
IPV6_PMTUDISC_DONT = 0 IPV6_PMTUDISC_DONT = 0
IPV6_PMTUDISC_PROBE = 0x3
IPV6_PMTUDISC_WANT = 0x1 IPV6_PMTUDISC_WANT = 0x1
IPV6_RECVDSTOPTS = 0x3a
IPV6_RECVERR = 0x19 IPV6_RECVERR = 0x19
IPV6_RECVHOPLIMIT = 0x33
IPV6_RECVHOPOPTS = 0x35
IPV6_RECVPKTINFO = 0x31
IPV6_RECVRTHDR = 0x38
IPV6_RECVTCLASS = 0x42
IPV6_ROUTER_ALERT = 0x16 IPV6_ROUTER_ALERT = 0x16
IPV6_RTHDR = 0x5 IPV6_RTHDR = 0x39
IPV6_RTHDRDSTOPTS = 0x37
IPV6_RTHDR_LOOSE = 0 IPV6_RTHDR_LOOSE = 0
IPV6_RTHDR_STRICT = 0x1 IPV6_RTHDR_STRICT = 0x1
IPV6_RTHDR_TYPE_0 = 0 IPV6_RTHDR_TYPE_0 = 0
IPV6_RXDSTOPTS = 0x4 IPV6_RXDSTOPTS = 0x3b
IPV6_RXHOPOPTS = 0x3 IPV6_RXHOPOPTS = 0x36
IPV6_TCLASS = 0x43
IPV6_UNICAST_HOPS = 0x10 IPV6_UNICAST_HOPS = 0x10
IPV6_V6ONLY = 0x1a
IPV6_XFRM_POLICY = 0x23
IP_ADD_MEMBERSHIP = 0x23 IP_ADD_MEMBERSHIP = 0x23
IP_ADD_SOURCE_MEMBERSHIP = 0x27
IP_BLOCK_SOURCE = 0x26
IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000 IP_DF = 0x4000
IP_DROP_MEMBERSHIP = 0x24 IP_DROP_MEMBERSHIP = 0x24
IP_DROP_SOURCE_MEMBERSHIP = 0x28
IP_HDRINCL = 0x3 IP_HDRINCL = 0x3
IP_MAXPACKET = 0xffff IP_MAXPACKET = 0xffff
IP_MAX_MEMBERSHIPS = 0x14 IP_MAX_MEMBERSHIPS = 0x14
IP_MF = 0x2000 IP_MF = 0x2000
IP_MSFILTER = 0x29
IP_MSS = 0x240 IP_MSS = 0x240
IP_MTU_DISCOVER = 0xa IP_MTU_DISCOVER = 0xa
IP_MULTICAST_IF = 0x20 IP_MULTICAST_IF = 0x20
@ -295,6 +329,7 @@ const (
IP_PMTUDISC = 0xa IP_PMTUDISC = 0xa
IP_PMTUDISC_DO = 0x2 IP_PMTUDISC_DO = 0x2
IP_PMTUDISC_DONT = 0 IP_PMTUDISC_DONT = 0
IP_PMTUDISC_PROBE = 0x3
IP_PMTUDISC_WANT = 0x1 IP_PMTUDISC_WANT = 0x1
IP_RECVERR = 0xb IP_RECVERR = 0xb
IP_RECVOPTS = 0x6 IP_RECVOPTS = 0x6
@ -306,10 +341,12 @@ const (
IP_ROUTER_ALERT = 0x5 IP_ROUTER_ALERT = 0x5
IP_TOS = 0x1 IP_TOS = 0x1
IP_TTL = 0x2 IP_TTL = 0x2
IP_UNBLOCK_SOURCE = 0x25
NAME_MAX = 0xff NAME_MAX = 0xff
O_ACCMODE = 0x3 O_ACCMODE = 0x3
O_APPEND = 0x400 O_APPEND = 0x400
O_ASYNC = 0x2000 O_ASYNC = 0x2000
O_CLOEXEC = 0x80000
O_CREAT = 0x40 O_CREAT = 0x40
O_DIRECT = 0x10000 O_DIRECT = 0x10000
O_DIRECTORY = 0x4000 O_DIRECTORY = 0x4000
@ -318,6 +355,7 @@ const (
O_FSYNC = 0x1000 O_FSYNC = 0x1000
O_LARGEFILE = 0x20000 O_LARGEFILE = 0x20000
O_NDELAY = 0x800 O_NDELAY = 0x800
O_NOATIME = 0x40000
O_NOCTTY = 0x100 O_NOCTTY = 0x100
O_NOFOLLOW = 0x8000 O_NOFOLLOW = 0x8000
O_NONBLOCK = 0x800 O_NONBLOCK = 0x800
@ -336,10 +374,12 @@ const (
PTRACE_EVENT_FORK = 0x1 PTRACE_EVENT_FORK = 0x1
PTRACE_EVENT_VFORK = 0x2 PTRACE_EVENT_VFORK = 0x2
PTRACE_EVENT_VFORK_DONE = 0x5 PTRACE_EVENT_VFORK_DONE = 0x5
PTRACE_GETCRUNCHREGS = 0x19
PTRACE_GETEVENTMSG = 0x4201 PTRACE_GETEVENTMSG = 0x4201
PTRACE_GETFPREGS = 0xe PTRACE_GETFPREGS = 0xe
PTRACE_GETREGS = 0xc PTRACE_GETREGS = 0xc
PTRACE_GETSIGINFO = 0x4202 PTRACE_GETSIGINFO = 0x4202
PTRACE_GETVFPREGS = 0x1b
PTRACE_GETWMMXREGS = 0x12 PTRACE_GETWMMXREGS = 0x12
PTRACE_GET_THREAD_AREA = 0x16 PTRACE_GET_THREAD_AREA = 0x16
PTRACE_KILL = 0x8 PTRACE_KILL = 0x8
@ -358,11 +398,14 @@ const (
PTRACE_POKEDATA = 0x5 PTRACE_POKEDATA = 0x5
PTRACE_POKETEXT = 0x4 PTRACE_POKETEXT = 0x4
PTRACE_POKEUSR = 0x6 PTRACE_POKEUSR = 0x6
PTRACE_SETCRUNCHREGS = 0x1a
PTRACE_SETFPREGS = 0xf PTRACE_SETFPREGS = 0xf
PTRACE_SETOPTIONS = 0x4200 PTRACE_SETOPTIONS = 0x4200
PTRACE_SETREGS = 0xd PTRACE_SETREGS = 0xd
PTRACE_SETSIGINFO = 0x4203 PTRACE_SETSIGINFO = 0x4203
PTRACE_SETVFPREGS = 0x1c
PTRACE_SETWMMXREGS = 0x13 PTRACE_SETWMMXREGS = 0x13
PTRACE_SET_SYSCALL = 0x17
PTRACE_SINGLESTEP = 0x9 PTRACE_SINGLESTEP = 0x9
PTRACE_SYSCALL = 0x18 PTRACE_SYSCALL = 0x18
PTRACE_TRACEME = 0 PTRACE_TRACEME = 0
@ -404,7 +447,10 @@ const (
SIGWINCH = 0x1c SIGWINCH = 0x1c
SIGXCPU = 0x18 SIGXCPU = 0x18
SIGXFSZ = 0x19 SIGXFSZ = 0x19
SOCK_CLOEXEC = 0x80000
SOCK_DCCP = 0x6
SOCK_DGRAM = 0x2 SOCK_DGRAM = 0x2
SOCK_NONBLOCK = 0x800
SOCK_PACKET = 0xa SOCK_PACKET = 0xa
SOCK_RAW = 0x3 SOCK_RAW = 0x3
SOCK_RDM = 0x4 SOCK_RDM = 0x4
@ -434,14 +480,17 @@ const (
SO_ERROR = 0x4 SO_ERROR = 0x4
SO_KEEPALIVE = 0x9 SO_KEEPALIVE = 0x9
SO_LINGER = 0xd SO_LINGER = 0xd
SO_MARK = 0x24
SO_NO_CHECK = 0xb SO_NO_CHECK = 0xb
SO_OOBINLINE = 0xa SO_OOBINLINE = 0xa
SO_PASSCRED = 0x10 SO_PASSCRED = 0x10
SO_PASSSEC = 0x22
SO_PEERCRED = 0x11 SO_PEERCRED = 0x11
SO_PEERNAME = 0x1c SO_PEERNAME = 0x1c
SO_PEERSEC = 0x1f SO_PEERSEC = 0x1f
SO_PRIORITY = 0xc SO_PRIORITY = 0xc
SO_RCVBUF = 0x8 SO_RCVBUF = 0x8
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x12 SO_RCVLOWAT = 0x12
SO_RCVTIMEO = 0x14 SO_RCVTIMEO = 0x14
SO_REUSEADDR = 0x2 SO_REUSEADDR = 0x2
@ -449,9 +498,12 @@ const (
SO_SECURITY_ENCRYPTION_NETWORK = 0x18 SO_SECURITY_ENCRYPTION_NETWORK = 0x18
SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
SO_SNDBUF = 0x7 SO_SNDBUF = 0x7
SO_SNDBUFFORCE = 0x20
SO_SNDLOWAT = 0x13 SO_SNDLOWAT = 0x13
SO_SNDTIMEO = 0x15 SO_SNDTIMEO = 0x15
SO_TIMESTAMP = 0x1d SO_TIMESTAMP = 0x1d
SO_TIMESTAMPING = 0x25
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x3 SO_TYPE = 0x3
S_BLKSIZE = 0x200 S_BLKSIZE = 0x200
S_IEXEC = 0x40 S_IEXEC = 0x40
@ -480,6 +532,7 @@ const (
S_IXGRP = 0x8 S_IXGRP = 0x8
S_IXOTH = 0x1 S_IXOTH = 0x1
S_IXUSR = 0x40 S_IXUSR = 0x40
TCP_CONGESTION = 0xd
TCP_CORK = 0x3 TCP_CORK = 0x3
TCP_DEFER_ACCEPT = 0x9 TCP_DEFER_ACCEPT = 0x9
TCP_INFO = 0xb TCP_INFO = 0xb
@ -490,6 +543,8 @@ const (
TCP_MAXSEG = 0x2 TCP_MAXSEG = 0x2
TCP_MAXWIN = 0xffff TCP_MAXWIN = 0xffff
TCP_MAX_WINSHIFT = 0xe TCP_MAX_WINSHIFT = 0xe
TCP_MD5SIG = 0xe
TCP_MD5SIG_MAXKEYLEN = 0x50
TCP_MSS = 0x200 TCP_MSS = 0x200
TCP_NODELAY = 0x1 TCP_NODELAY = 0x1
TCP_QUICKACK = 0xc TCP_QUICKACK = 0xc
@ -497,9 +552,13 @@ const (
TCP_WINDOW_CLAMP = 0xa TCP_WINDOW_CLAMP = 0xa
WALL = 0x40000000 WALL = 0x40000000
WCLONE = 0x80000000 WCLONE = 0x80000000
WCOREFLAG = 0x80 WCONTINUED = 0x8
WEXITED = 0x4
WNOHANG = 0x1 WNOHANG = 0x1
WNOTHREAD = 0x20000000
WNOWAIT = 0x1000000
WORDSIZE = 0x20 WORDSIZE = 0x20
WSTOPPED = 0x2
WUNTRACED = 0x2 WUNTRACED = 0x2
) )
@ -551,9 +610,9 @@ var errors = [...]string{
106: "transport endpoint is already connected", 106: "transport endpoint is already connected",
21: "is a directory", 21: "is a directory",
120: "is a named type file", 120: "is a named type file",
127: "unknown error 127", 127: "key has expired",
129: "unknown error 129", 129: "key was rejected by service",
128: "unknown error 128", 128: "key has been revoked",
51: "level 2 halted", 51: "level 2 halted",
45: "level 2 not synchronized", 45: "level 2 not synchronized",
46: "level 3 halted", 46: "level 3 halted",
@ -583,7 +642,7 @@ var errors = [...]string{
19: "no such device", 19: "no such device",
2: "no such file or directory", 2: "no such file or directory",
8: "exec format error", 8: "exec format error",
126: "unknown error 126", 126: "required key not available",
37: "no locks available", 37: "no locks available",
67: "link has been severed", 67: "link has been severed",
123: "no medium found", 123: "no medium found",
@ -601,14 +660,14 @@ var errors = [...]string{
20: "not a directory", 20: "not a directory",
39: "directory not empty", 39: "directory not empty",
118: "not a XENIX named type file", 118: "not a XENIX named type file",
131: "unknown error 131", 131: "state not recoverable",
88: "socket operation on non-socket", 88: "socket operation on non-socket",
95: "operation not supported", 95: "operation not supported",
25: "inappropriate ioctl for device", 25: "inappropriate ioctl for device",
76: "name not unique on network", 76: "name not unique on network",
6: "no such device or address", 6: "no such device or address",
75: "value too large for defined data type", 75: "value too large for defined data type",
130: "unknown error 130", 130: "owner died",
1: "operation not permitted", 1: "operation not permitted",
96: "protocol family not supported", 96: "protocol family not supported",
32: "broken pipe", 32: "broken pipe",
@ -620,6 +679,7 @@ var errors = [...]string{
66: "object is remote", 66: "object is remote",
121: "remote I/O error", 121: "remote I/O error",
85: "interrupted system call should be restarted", 85: "interrupted system call should be restarted",
132: "unknown error 132",
30: "read-only file system", 30: "read-only file system",
108: "cannot send after transport endpoint shutdown", 108: "cannot send after transport endpoint shutdown",
94: "socket type not supported", 94: "socket type not supported",

View File

@ -628,14 +628,6 @@ func socket(domain int, typ int, proto int) (fd int, errno int) {
return return
} }
func socketpair(domain int, typ int, proto int) (fd [2]int, errno int) {
var f [2]int
_, _, e1 := Syscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(&f)), 0, 0)
fd = f
errno = int(e1)
return
}
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) { func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
_, _, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) _, _, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
errno = int(e1) errno = int(e1)
@ -669,6 +661,12 @@ func sendto(s int, buf []byte, flags int, to uintptr, addrlen _Socklen) (errno i
return return
} }
func socketpair(domain int, typ int, flags int, fd *[2]int) (errno int) {
_, _, e1 := Syscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
errno = int(e1)
return
}
func Chown(path string, uid int, gid int) (errno int) { func Chown(path string, uid int, gid int) (errno int) {
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid)) _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid))
errno = int(e1) errno = int(e1)

View File

@ -1,4 +1,4 @@
// godefs -gsyscall -f-m32 types_linux.c // godefs -gsyscall types_linux.c
// MACHINE GENERATED - DO NOT EDIT. // MACHINE GENERATED - DO NOT EDIT.
@ -14,8 +14,11 @@ const (
PathMax = 0x1000 PathMax = 0x1000
SizeofSockaddrInet4 = 0x10 SizeofSockaddrInet4 = 0x10
SizeofSockaddrInet6 = 0x1c SizeofSockaddrInet6 = 0x1c
SizeofSockaddrAny = 0x1c SizeofSockaddrAny = 0x70
SizeofSockaddrUnix = 0x6e SizeofSockaddrUnix = 0x6e
SizeofLinger = 0x8
SizeofMsghdr = 0x1c
SizeofCmsghdr = 0xc
) )
// Types // Types
@ -114,18 +117,19 @@ type _Gid_t uint32
type Stat_t struct { type Stat_t struct {
Dev uint64 Dev uint64
__pad1 uint16 X__pad1 uint16
Pad0 [2]byte Pad0 [2]byte
__st_ino uint32 X__st_ino uint32
Mode uint32 Mode uint32
Nlink uint32 Nlink uint32
Uid uint32 Uid uint32
Gid uint32 Gid uint32
Rdev uint64 Rdev uint64
__pad2 uint16 X__pad2 uint16
Pad1 [2]byte Pad1 [6]byte
Size int64 Size int64
Blksize int32 Blksize int32
Pad2 [4]byte
Blocks int64 Blocks int64
Atim Timespec Atim Timespec
Mtim Timespec Mtim Timespec
@ -145,6 +149,7 @@ type Statfs_t struct {
Namelen int32 Namelen int32
Frsize int32 Frsize int32
Spare [5]int32 Spare [5]int32
Pad0 [4]byte
} }
type Dirent struct { type Dirent struct {
@ -152,8 +157,8 @@ type Dirent struct {
Off int64 Off int64
Reclen uint16 Reclen uint16
Type uint8 Type uint8
Name [256]int8 Name [256]uint8
Pad0 [1]byte Pad0 [5]byte
} }
type RawSockaddrInet4 struct { type RawSockaddrInet4 struct {
@ -178,12 +183,12 @@ type RawSockaddrUnix struct {
type RawSockaddr struct { type RawSockaddr struct {
Family uint16 Family uint16
Data [14]int8 Data [14]uint8
} }
type RawSockaddrAny struct { type RawSockaddrAny struct {
Addr RawSockaddr Addr RawSockaddr
Pad [12]int8 Pad [96]uint8
} }
type _Socklen uint32 type _Socklen uint32
@ -193,32 +198,29 @@ type Linger struct {
Linger int32 Linger int32
} }
type PtraceRegs struct { type Iovec struct {
Ebx int32 Base *byte
Ecx int32 Len uint32
Edx int32
Esi int32
Edi int32
Ebp int32
Eax int32
Ds uint16
__ds uint16
Es uint16
__es uint16
Fs uint16
__fs uint16
Gs uint16
__gs uint16
Orig_eax int32
Eip int32
Cs uint16
__cs uint16
Eflags int32
Esp int32
Ss uint16
__ss uint16
} }
type Msghdr struct {
Name *byte
Namelen uint32
Iov *Iovec
Iovlen uint32
Control *byte
Controllen uint32
Flags int32
}
type Cmsghdr struct {
Len uint32
Level int32
Type int32
}
type PtraceRegs struct{}
type FdSet struct { type FdSet struct {
Bits [32]int32 Bits [32]int32
} }
@ -237,23 +239,23 @@ type Sysinfo_t struct {
Totalhigh uint32 Totalhigh uint32
Freehigh uint32 Freehigh uint32
Unit uint32 Unit uint32
_f [8]int8 X_f [8]uint8
} }
type Utsname struct { type Utsname struct {
Sysname [65]int8 Sysname [65]uint8
Nodename [65]int8 Nodename [65]uint8
Release [65]int8 Release [65]uint8
Version [65]int8 Version [65]uint8
Machine [65]int8 Machine [65]uint8
Domainname [65]int8 Domainname [65]uint8
} }
type Ustat_t struct { type Ustat_t struct {
Tfree int32 Tfree int32
Tinode uint32 Tinode uint32
Fname [6]int8 Fname [6]uint8
Fpack [6]int8 Fpack [6]uint8
} }
type EpollEvent struct { type EpollEvent struct {