386 system call fixes:

* use 64-bit file system calls (Linux, Darwin)
  * use 32-bit [sic] uid/gid calls (Linux)
  * fix sockets on Linux

Darwin/386 works again.

Linux/386 is better but must never have worked;
there are still bugs surrounding the creation of new
threads in the runtime package.

R=austin
DELTA=1332  (673 added, 614 deleted, 45 changed)
OCL=30327
CL=30380
This commit is contained in:
Russ Cox 2009-06-16 17:17:02 -07:00
parent cb897436eb
commit 76c87d58cd
16 changed files with 424 additions and 365 deletions

View file

@ -6,13 +6,35 @@ package syscall
import "syscall"
//sys Chown(path string, uid int, gid int) (errno int)
//sys Fchown(fd int, uid int, gid int) (errno int)
//sys Fstat(fd int, stat *Stat_t) (errno int)
//sys Fstatfs(fd int, buf *Statfs_t) (errno int)
//sys Getegid() (egid int)
//sys Geteuid() (euid int)
//sys Getgid() (gid int)
//sys Getuid() (uid int)
//sys Lchown(path string, uid int, gid int) (errno int)
//sys Listen(s int, n int) (errno int)
//sys Lstat(path string, stat *Stat_t) (errno int)
//sys Seek(fd int, offset int64, whence int) (off int64, errno int) = SYS_LSEEK
//sys Setfsgid(gid int) (errno int)
//sys Setfsuid(uid int) (errno int)
//sys Setgid(gid int) (errno int)
//sys Setregid(rgid int, egid int) (errno int)
//sys Setresgid(rgid int, egid int, sgid int) (errno int)
//sys Setresuid(ruid int, euid int, suid int) (errno int)
//sys Setreuid(ruid int, euid int) (errno int)
//sys Shutdown(fd int, how int) (errno int)
//sys Stat(path string, stat *Stat_t) (errno int)
//sys Statfs(path string, buf *Statfs_t) (errno int)
//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, errno int)
//sys bind(s int, addr uintptr, addrlen _Socklen) (errno int)
//sys connect(s int, addr uintptr, addrlen _Socklen) (errno int)
//sys socket(domain int, typ int, proto int) (fd int, errno int)
//sys getgroups(n int, list *_Gid_t) (nn int, errno int)
//sys setgroups(n int, list *_Gid_t) (errno int)
//sys setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int)
//sys Listen(s int, n int) (errno int)
//sys Shutdown(fd int, how int) (errno int)
//sys socket(domain int, typ int, proto int) (fd int, errno int)
func Getpagesize() int {
return 4096