diff options
| author | Russ Cox <rsc@golang.org> | 2009-06-16 17:17:02 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2009-06-16 17:17:02 -0700 |
| commit | 67d5e00af1c62a237623278b0181b98f25a3179c (patch) | |
| tree | e6f2ed8488a281a586664e0a0085aa6fe227365e /src/pkg/syscall/syscall_linux_386.go | |
| parent | 16cf893acaf7106a53a595ac6ca736026a617f93 (diff) | |
| download | golang-67d5e00af1c62a237623278b0181b98f25a3179c.tar.gz | |
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
Diffstat (limited to 'src/pkg/syscall/syscall_linux_386.go')
| -rw-r--r-- | src/pkg/syscall/syscall_linux_386.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/pkg/syscall/syscall_linux_386.go b/src/pkg/syscall/syscall_linux_386.go index 9bf3f9cf0..b41c60a55 100644 --- a/src/pkg/syscall/syscall_linux_386.go +++ b/src/pkg/syscall/syscall_linux_386.go @@ -34,6 +34,34 @@ func NsecToTimeval(nsec int64) (tv Timeval) { return; } +// 64-bit file system and 32-bit uid calls +// (386 default is 32-bit file system and 16-bit uid). +//sys Chown(path string, uid int, gid int) (errno int) = SYS_CHOWN32 +//sys Fchown(fd int, uid int, gid int) (errno int) = SYS_FCHOWN32 +//sys Fstat(fd int, stat *Stat_t) (errno int) = SYS_FSTAT64 +//sys Fstatfs(fd int, buf *Statfs_t) (errno int) = SYS_FSTATFS64 +//sys Getegid() (egid int) = SYS_GETEGID32 +//sys Geteuid() (euid int) = SYS_GETEUID32 +//sys Getgid() (gid int) = SYS_GETGID32 +//sys Getuid() (uid int) = SYS_GETUID32 +//sys Lchown(path string, uid int, gid int) (errno int) = SYS_LCHOWN32 +//sys Lstat(path string, stat *Stat_t) (errno int) = SYS_LSTAT64 +//sys Setfsgid(gid int) (errno int) = SYS_SETFSGID32 +//sys Setfsuid(uid int) (errno int) = SYS_SETFSUID32 +//sys Setgid(gid int) (errno int) = SYS_SETGID32 +//sys Setregid(rgid int, egid int) (errno int) = SYS_SETREGID32 +//sys Setresgid(rgid int, egid int, sgid int) (errno int) = SYS_SETRESGID32 +//sys Setresuid(ruid int, euid int, suid int) (errno int) = SYS_SETRESUID32 +//sys Setreuid(ruid int, euid int) (errno int) = SYS_SETREUID32 +//sys Stat(path string, stat *Stat_t) (errno int) = SYS_STAT64 +//sys Statfs(path string, buf *Statfs_t) (errno int) = SYS_STATFS64 +//sys getgroups(n int, list *_Gid_t) (nn int, errno int) = SYS_GETGROUPS32 +//sys setgroups(n int, list *_Gid_t) (errno int) = SYS_SETGROUPS32 + +// Underlying system call writes to newoffset via pointer. +// Implemented in assembly to avoid allocation. +func Seek(fd int, offset int64, whence int) (newoffset int64, errno int) + // On x86 Linux, all the socket calls go through an extra indirection, // I think because the 5-register system call interface can't handle // the 6-argument calls like sendto and recvfrom. Instead the |
