OSDN Git Service

Update Go compiler, library, and testsuite on gcc 4.7 branch.
[pf3gnuchains/gcc-fork.git] / libgo / go / net / unixsock_plan9.go
index 1d9d757..7b4ae6b 100644 (file)
@@ -7,7 +7,7 @@
 package net
 
 import (
-       "os"
+       "syscall"
        "time"
 )
 
@@ -19,17 +19,17 @@ type UnixConn bool
 
 // Read implements the Conn Read method.
 func (c *UnixConn) Read(b []byte) (n int, err error) {
-       return 0, os.EPLAN9
+       return 0, syscall.EPLAN9
 }
 
 // Write implements the Conn Write method.
 func (c *UnixConn) Write(b []byte) (n int, err error) {
-       return 0, os.EPLAN9
+       return 0, syscall.EPLAN9
 }
 
 // Close closes the Unix domain connection.
 func (c *UnixConn) Close() error {
-       return os.EPLAN9
+       return syscall.EPLAN9
 }
 
 // LocalAddr returns the local network address, a *UnixAddr.
@@ -47,28 +47,28 @@ func (c *UnixConn) RemoteAddr() Addr {
 
 // SetDeadline implements the Conn SetDeadline method.
 func (c *UnixConn) SetDeadline(t time.Time) error {
-       return os.EPLAN9
+       return syscall.EPLAN9
 }
 
 // SetReadDeadline implements the Conn SetReadDeadline method.
 func (c *UnixConn) SetReadDeadline(t time.Time) error {
-       return os.EPLAN9
+       return syscall.EPLAN9
 }
 
 // SetWriteDeadline implements the Conn SetWriteDeadline method.
 func (c *UnixConn) SetWriteDeadline(t time.Time) error {
-       return os.EPLAN9
+       return syscall.EPLAN9
 }
 
 // ReadFrom implements the PacketConn ReadFrom method.
 func (c *UnixConn) ReadFrom(b []byte) (n int, addr Addr, err error) {
-       err = os.EPLAN9
+       err = syscall.EPLAN9
        return
 }
 
 // WriteTo implements the PacketConn WriteTo method.
 func (c *UnixConn) WriteTo(b []byte, addr Addr) (n int, err error) {
-       err = os.EPLAN9
+       err = syscall.EPLAN9
        return
 }
 
@@ -76,7 +76,7 @@ func (c *UnixConn) WriteTo(b []byte, addr Addr) (n int, err error) {
 // which must be "unix" or "unixgram".  If laddr is not nil, it is used
 // as the local address for the connection.
 func DialUnix(net string, laddr, raddr *UnixAddr) (c *UnixConn, err error) {
-       return nil, os.EPLAN9
+       return nil, syscall.EPLAN9
 }
 
 // UnixListener is a Unix domain socket listener.
@@ -87,19 +87,19 @@ type UnixListener bool
 // ListenUnix announces on the Unix domain socket laddr and returns a Unix listener.
 // Net must be "unix" (stream sockets).
 func ListenUnix(net string, laddr *UnixAddr) (l *UnixListener, err error) {
-       return nil, os.EPLAN9
+       return nil, syscall.EPLAN9
 }
 
 // Accept implements the Accept method in the Listener interface;
 // it waits for the next call and returns a generic Conn.
 func (l *UnixListener) Accept() (c Conn, err error) {
-       return nil, os.EPLAN9
+       return nil, syscall.EPLAN9
 }
 
 // Close stops listening on the Unix address.
 // Already accepted connections are not closed.
 func (l *UnixListener) Close() error {
-       return os.EPLAN9
+       return syscall.EPLAN9
 }
 
 // Addr returns the listener's network address.