Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
Add pty_unsupported.go file in order to allow projects to import the …
Browse files Browse the repository at this point in the history
…package and still compile on other os/arch
  • Loading branch information
creack authored and kr committed Mar 4, 2014
1 parent 76284c5 commit 7a543c8
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions pty_unsupported.go
@@ -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
}

0 comments on commit 7a543c8

Please sign in to comment.