mirror of
https://github.com/golang/go
synced 2024-11-22 02:24:41 -07:00
syscall: remove unused windows code and comments
R=golang-dev, vcc.163, rsc CC=golang-dev https://golang.org/cl/4826042
This commit is contained in:
parent
3a07d516b4
commit
770543107d
@ -76,7 +76,7 @@ func StringToUTF16Ptr(s string) *uint16 { return &StringToUTF16(s)[0] }
|
||||
|
||||
// dll helpers
|
||||
|
||||
// implemented in ../runtime/windows/syscall.cgo
|
||||
// Implemented in ../runtime/windows/syscall.goc
|
||||
func Syscall(trap, nargs, a1, a2, a3 uintptr) (r1, r2, err uintptr)
|
||||
func Syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
|
||||
func Syscall9(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2, err uintptr)
|
||||
@ -105,14 +105,9 @@ func Getpagesize() int { return 4096 }
|
||||
// Converts a Go function to a function pointer conforming
|
||||
// to the stdcall calling convention. This is useful when
|
||||
// interoperating with Windows code requiring callbacks.
|
||||
// Implemented in ../runtime/windows/syscall.cgo
|
||||
// Implemented in ../runtime/windows/syscall.goc
|
||||
func NewCallback(fn interface{}) uintptr
|
||||
|
||||
// TODO
|
||||
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, errno int) {
|
||||
return -1, ENOSYS
|
||||
}
|
||||
|
||||
// windows api calls
|
||||
|
||||
//sys GetLastError() (lasterrno int)
|
||||
@ -728,24 +723,3 @@ func Geteuid() (euid int) { return -1 }
|
||||
func Getgid() (gid int) { return -1 }
|
||||
func Getegid() (egid int) { return -1 }
|
||||
func Getgroups() (gids []int, errno int) { return nil, EWINDOWS }
|
||||
|
||||
// TODO(brainman): fix all this meaningless code, it is here to compile exec.go
|
||||
|
||||
func read(fd Handle, buf *byte, nbuf int) (n int, errno int) {
|
||||
return 0, EWINDOWS
|
||||
}
|
||||
|
||||
func fcntl(fd Handle, cmd, arg int) (val int, errno int) {
|
||||
return 0, EWINDOWS
|
||||
}
|
||||
|
||||
const (
|
||||
PTRACE_TRACEME = 1 + iota
|
||||
WNOHANG
|
||||
WSTOPPED
|
||||
WUNTRACED
|
||||
SYS_CLOSE
|
||||
SYS_WRITE
|
||||
SYS_EXIT
|
||||
SYS_READ
|
||||
)
|
||||
|
@ -1,22 +1,5 @@
|
||||
package syscall
|
||||
|
||||
// TODO(brainman): autogenerate types in ztypes_windows_386.go
|
||||
|
||||
//import "unsafe"
|
||||
|
||||
// Constants
|
||||
const (
|
||||
sizeofPtr = 0x4
|
||||
sizeofShort = 0x2
|
||||
sizeofInt = 0x4
|
||||
sizeofLong = 0x4
|
||||
sizeofLongLong = 0x8
|
||||
PathMax = 0x1000
|
||||
SizeofLinger = 0x8
|
||||
SizeofMsghdr = 0x1c
|
||||
SizeofCmsghdr = 0xc
|
||||
)
|
||||
|
||||
const (
|
||||
// Windows errors.
|
||||
ERROR_FILE_NOT_FOUND = 2
|
||||
@ -179,16 +162,6 @@ const (
|
||||
CRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x00000080
|
||||
)
|
||||
|
||||
// Types
|
||||
|
||||
type _C_short int16
|
||||
|
||||
type _C_int int32
|
||||
|
||||
type _C_long int32
|
||||
|
||||
type _C_long_long int64
|
||||
|
||||
// Invented values to support what package os expects.
|
||||
type Timeval struct {
|
||||
Sec int32
|
||||
@ -393,23 +366,8 @@ type WSABuf struct {
|
||||
Buf *byte
|
||||
}
|
||||
|
||||
// TODO(brainman): fix all needed for os
|
||||
|
||||
// Invented values to support what package os expects.
|
||||
const (
|
||||
PROT_READ = 0x1
|
||||
PROT_WRITE = 0x2
|
||||
MAP_SHARED = 0x1
|
||||
SYS_FORK = 0
|
||||
SYS_PTRACE = 0
|
||||
SYS_CHDIR = 0
|
||||
SYS_DUP2 = 0
|
||||
SYS_FCNTL = 0
|
||||
SYS_EXECVE = 0
|
||||
F_GETFD = 0x1
|
||||
F_SETFD = 0x2
|
||||
F_GETFL = 0x3
|
||||
F_SETFL = 0x4
|
||||
FD_CLOEXEC = 0
|
||||
S_IFMT = 0x1f000
|
||||
S_IFIFO = 0x1000
|
||||
S_IFCHR = 0x2000
|
||||
|
Loading…
Reference in New Issue
Block a user