Add pty_unsupported.go file in order to allow projects to import the package and still compile on other os/arch

This commit is contained in:
Guillaume J. Charmes
2014-02-09 04:30:15 -08:00
committed by Keith Rarick
parent 76284c52ce
commit 7a543c8bf6

32
pty_unsupported.go Normal file
View File

@@ -0,0 +1,32 @@
// +build !linux,!darwin,!freebsd
package pty
import (
"errors"
"os"
)
var (
ErrUnsupported = errors.New("Unsupported")
)
func open() (pty, tty *os.File, err error) {
return nil, nil, ErrUnsupported
}
func ptsname(f *os.File) (string, error) {
return "", ErrUnsupported
}
func grantpt(f *os.File) error {
return ErrUnsupported
}
func unlockpt(f *os.File) error {
return ErrUnsupported
}
func ioctl(fd, cmd, ptr uintptr) error {
return ErrUnsupported
}