Closed taolinke closed 9 years ago
PS. $ go version go version go1.3.1 windows/amd64
@taolinke I'll give a fix tonight, or you can comment out error lines by yourself if you want to fix it as soon as possible. Thank you.
$GOPATH/src/github.com/justmao945/mallory
github.com\justmao945\mallory\util.go
// POSIX ioctl syscall
// From https://github.com/mreiferson/go-simplelog/blob/master/simplelog.go
/*
func Ioctl(fd, request, argp uintptr) syscall.Errno {
_, _, errorp := syscall.Syscall(syscall.SYS_IOCTL, fd, request, argp)
return errorp
}
*/
// Test is a termnial or not
// From https://github.com/mreiferson/go-simplelog/blob/master/simplelog.go
func Isatty(f *os.File) bool {
/*
switch runtime.GOOS {
case "darwin":
case "linux":
default:
return false
}
var t [2]byte
errno := Ioctl(f.Fd(), syscall.TIOCGPGRP, uintptr(unsafe.Pointer(&t)))
return errno == 0
*/
return false;
}
go install github.com/justmao945/mallory/cmd/mallory
$ go get github.com/justmao945/mallory/cmd/mallory
github.com/justmao945/mallory
D:\tass\go-language\work\src\github.com\justmao945\mallory\util.go:58: undefined : syscall.SYS_IOCTL D:\tass\go-language\work\src\github.com\justmao945\mallory\util.go:58: not enoug h arguments in call to syscall.Syscall D:\tass\go-language\work\src\github.com\justmao945\mallory\util.go:72: undefined : syscall.TIOCGPGRP