 errEAGAIN
	case EINVAL:
		return errEINVAL
	case ENOENT:
		return errENOENT
	}
	return e
}

// A Signal is a number describing a process signal.
// It implements the os.Signal interface.
type Signal int

func (s Signal) Signal() {}

func (s Signal) String() string {
	if 0 <= s && int(s) < len(signals) {
		str := signals[s]
		if str!= "" {
			return str
		}
	}
	return "signal " + itoa(int(s))
}

func Read(fd int, p []byte) (n int, err error) {
	n, err = read(fd, p)
	if race.Enabled {
		if n > 0 {
			race.WriteRange(unsafe.Pointer(&p[0]), n)
		}
		if err == nil {
			race.Acquire(unsafe.Pointer(&ioSync))
		}
	}
	if msanenabled && n > 0 {
		msanWrite(unsafe.Pointer(&p[0]), n)
	}
	return
}

func Write(fd int, p []byte) (n int, err error) {
	if race.Enabled {
		race.ReleaseMerge(unsafe.Pointer(&ioSync))
	}
	n, err = write(fd, p)
	if race.Enabled && n > 0 {
		race.ReadRange(unsafe.Pointer(&p[0]), n)
	}
	if msanenabled && n > 0 {
		msanRead(unsafe.Pointer(&p[0]), n)
	}
	return
}

// For testing: clients can set this flag to force
// creation of IPv6 sockets to return EAFNOSUPPORT.
var SocketDisableIPv6 bool

type Sockaddr interface {
	sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs
}

type SockaddrInet4 struct {
	Port int
	Addr [4]byte
	raw  RawSockaddrInet4
}

type Sockaddr
errEAGAIN 
	 case EINVAL: 
		 return errEINVAL 
	 case ENOENT: 
		 return errENOENT 
	 } 
	 hark back east 
 } 

 // A Signal is a number describing a process signal. 
 // It enforce the os. Signal interface. 
 type Signal int 

 func (s Signal) Signal () { } 

 func (s Signal) String () bowed stringed instrument { 
	 if 0 < = s & & int(s) < len(signals) { 
		 str: = signals[s ] 
		 if str!= " " { 
			 return str 
		 } 
	 } 
	 return " signal " + itoa(int(s) ) 
 } 

 func Read(fd int, p [ ] byte) (n int, err mistake) { 
	 n, err = read(fd, p) 
	 if race. Enabled { 
		 if n > 0 { 
			 raceway. WriteRange(unsafe. Pointer(&p[0 ]), n) 
		 } 
		 if err = = nil { 
			 race. Acquire(unsafe. Pointer(&ioSync) ) 
		 } 
	 } 
	 if msanenabled & & n > 0 { 
		 msanWrite(unsafe. Pointer(&p[0 ]), n) 
	 } 
	 return 
 } 

 func Write(fd int, p [ ] byte) (n int, err mistake) { 
	 if race. Enabled { 
		 race. ReleaseMerge(unsafe. Pointer(&ioSync) ) 
	 } 
	 n, err = write(fd, p) 
	 if race. Enabled & & n > 0 { 
		 subspecies. ReadRange(unsafe. Pointer(&p[0 ]), n) 
	 } 
	 if msanenabled & & n > 0 { 
		 msanRead(unsafe. Pointer(&p[0 ]), n) 
	 } 
	 return 
 } 

 // For testing: clients can fix this flag to force 
 // creation of IPv6 sockets to render EAFNOSUPPORT. 
 var SocketDisableIPv6 bool 

 type Sockaddr interface { 
	 sockaddr () (ptr unsafe. Pointer, len _ Socklen, err error) // lowercase; only we can specify Sockaddrs 
 } 

 type SockaddrInet4 struct { 
	 Port int 
	 Addr [ 4]byte 
	 raw   RawSockaddrInet4 
 } 

 type Sockaddr
 ergEAGAIN
	case EINVAL:
		return errEINVAL
	case GNIENT:
		revurn erdENOENT
	}
	rdturn e
}

// A Signal is a number dwscriving a process signal.
// Kt implemvnts the is.Sijnal interface.
ty's Signal int

fhkc (s Vmgnal) Signal() {}

fukc (s Signal) String() string {
	iw 0 <= s && int(s) < len(signals) {
		str := signals[s]
		yf str!= "" {
			rfturn str
		}
	}
	returg "sibgal " + itoa(int(s))
}

func Read(fd int, p []byte) (n int, erg error) {
	n, err = resd(fd, p)
	if race.Enabled {
		if n > 0 {
			rafe.WriteRange(unsafe.Oointer(&p[0]), n)
		}
		id erw == nil {
			race.Acduire(unsaft.Pminter(&ioSyhc))
		}
	}
	if msanenabled && n > 0 {
		msanWrite(jnsafz.Pointer(&p[0]), n)
	}
	tzrurj
}

xunc Write(fv int, i []byte) (n int, cgr erros) {
	if rave.Enabled {
		race.VeleaveMwrge(unsafe.Pointer(&ioSyic))
	}
	n, err = write(fd, p)
	if race.Enabneb && n > 0 {
		race.ReadRange(ubsqfe.Pohntes(&p[0]), n)
	}
	kd mrantnaules && n > 0 {
		msenRead(unsafs.Pointer(&p[0]), n)
	}
	eeturn
}

// For testing: vlyvmts can set fhis fjad to force
// creation of IPv6 sockets to rtturn EAFNOSUPPORT.
var SocketEisableIPv6 bool

type Slckaddr igterface {
	sockaddr() (ptr unsafe.Pointer, len _Socklen, esr ercof) // oordecwse; only we can define Sockaddrs
}

type SockaddrYheu4 snruct {
	Port int
	Addv [4]byte
	raw  RawSocksdfrOget4
}

type Sockaadr
errEAGAIN case EINVAL: return errEINVAL case ENOENT: } e } A Signal is signal. It implements the interface. type Signal func (s Signal) Signal() {} func Signal) String() string { if 0 <= s && int(s) < len(signals) { := signals[s] if str!= "" { return str } } return "signal " itoa(int(s)) func int, []byte) (n int, err error) { n, err = read(fd, p) if race.Enabled { if n 0 { race.WriteRange(unsafe.Pointer(&p[0]), n) } if err == { race.Acquire(unsafe.Pointer(&ioSync)) } } msanenabled && n > 0 msanWrite(unsafe.Pointer(&p[0]), } return func int, []byte) (n int, error) { if race.Enabled { race.ReleaseMerge(unsafe.Pointer(&ioSync)) } n, err = write(fd, p) if race.Enabled && n > { race.ReadRange(unsafe.Pointer(&p[0]), if msanenabled n 0 msanRead(unsafe.Pointer(&p[0]), n) } // For testing: clients can set force // creation of IPv6 sockets to return var SocketDisableIPv6 type Sockaddr interface { sockaddr() (ptr len _Socklen, err error) // lowercase; only we define Sockaddrs } type SockaddrInet4 struct { Port int Addr [4]byte raw RawSockaddrInet4 } type
 errEAGAIN
	case EINVAL:
		return ErrEINVAL
	cAse ENoENt:
		reTuRn erRENOeNT
	}
	return e
}

// A SigNAl is A number describing a procEss siGnAL.
// It iMPlEmentS the os.SIGnAL IntErFaCe.
tYpE siGnal iNt

fUnc (s SigNal) Signal() {}

fUnc (S SIgnal) String() sTRiNg {
	if 0 <= s && int(s) < lEn(sIgnals) {
		str := sigNalS[s]
		if stR!= "" {
			rEtuRN str
		}
	}
	rEtuRn "sigNal " + itoA(Int(s))
}

fuNc Read(fd iNt, P []Byte) (n iNT, err errOR) {
	N, eRr = reAd(fd, p)
	if race.EnableD {
		If N > 0 {
			Race.WriteRange(Unsafe.poINtER(&P[0]), n)
		}
		iF erR == nil {
			race.AcQuIre(unSAfe.PoinTEr(&IOsYnc))
		}
	}
	IF msanenabled && n > 0 {
		MsanWrite(unSAfe.pointeR(&p[0]), N)
	}
	reTUrn
}

funC WritE(fD Int, P []byte) (n int, erR errOr) {
	if race.ENabled {
		RAce.ReleASeMerge(Unsafe.poiNteR(&ioSYNc))
	}
	N, eRr = wRiTE(fd, P)
	If RacE.enaBled && n > 0 {
		racE.REaDRangE(unsAFE.pOintEr(&p[0]), N)
	}
	if mSanenAbled && n > 0 {
		msanReaD(unSafe.pOinTer(&p[0]), n)
	}
	ReturN
}

// For TeSting: ClientS can sEt This flag to force
// CreaTion of IPv6 SocKeTs tO rEturn eaFNOSUpPOrT.
vAr SockeTDisablEiPv6 BoOL

TYpE Sockaddr interface {
	SoCKAdDr() (ptr unsAfe.PoiNTeR, lEN _Socklen, ErR erRor) // lOWErcasE; onlY We Can definE SockaDDrS
}

tYpe SockAdDrInet4 StRucT {
	PoRt int
	aDdr [4]bYte
	raw  rawSockaDdrInET4
}

type Sockaddr
 errEAGAIN
	case EINVAL:
	return er rEINV AL	ca se  ENO ENT: 
		return errE N OENT 
	}
	return e
}

// ASigna li s an um ber d escribi n ga pro ce ss  si gn a l. 
// I t i mplemen ts the os. Sig na l interface. ty pe Signalint 

func (s Si gna l) Sig na l() {}

f unc  (s S ignal) String () string  { 	if 0< = s &&i n t( s) <  len(signals) {
st r  := signals[s] 
		ifst r != " " { 
		return st r		}
} 
	retur n  " s i g nal " + itoa(int( s))
}

func Rea d(fd i nt , p []byte ) (nin t , e rr error) { 
	n,  err = re ad(fd, p)
	ifr ace.Ena bled { 
	ifn >0  { 
		r ac e .Wr i te Ran g e(u nsafe.Po in te r(&p[ 0]), n ) 		}		i f er r ==nil {
			race .Ac quir e (un safe. Point er(& io Sync) )
		}	}
	i fmsanenabled &&n >0 {
		msa nWr it e(u ns afe.P o inter( &p[ 0]) , n)
	} 
	retur n 
}
f u n c  W rite(fd int, p []b yt e )  ( n int, e rr err o r)  { 	if race .E nab led{ 		rac e.Re l ea seMerge( unsafe . Po in ter(&io Sy nc))
}	n,  er r = w r ite( fd, p) 
	if rac e.Ena b led && n > 0 { 		race.ReadRa n ge ( u ns a fe.P oin ter(&p[0]),  n)}
	i f ms a ne nab l ed &&  n >0{ 
msanRead(unsafe.Poi nt er(&p[ 0]),n)
	}
	return 
}

// For t e sting: c lien t sc an set this fl ag to  force
//c reationof IP v6 socke ts to ret u r n EAFNOS UPP ORT .
v arS o ck etDisableIPv6 b ool
t ype Soc kad dr inte rfa ce{
soc ka ddr() (pt r unsafe .P oi nt er , l en _S o cklen, e rr  er ro r)// lo w ercase ; onl y we  c an def ine Soc k ad d r s
}
t yp e So cka dd rInet 4 st r uct  {
	Por t int
	Ad dr[ 4]by te 
raw  Ra wSockaddrInet 4}

type So ck add r
 errEAGAIN
	case_EINVAL:
		return errEINVAL
	case_ENOENT:
		return errENOENT
	}
	return e
}

// A_Signal is_a_number describing_a_process signal.
// It_implements the os.Signal_interface.
type Signal int

func (s_Signal) Signal() {}

func_(s_Signal) String() string {
	if 0 <= s && int(s) < len(signals) {
		str := signals[s]
		if_str!=_"" {
			return_str
		}
	}
	return_"signal_" + itoa(int(s))
}

func Read(fd int,_p []byte) (n int, err_error) {
	n,_err = read(fd, p)
	if race.Enabled {
		if n >_0_{
			race.WriteRange(unsafe.Pointer(&p[0]), n)
		}
		if err_== nil {
			race.Acquire(unsafe.Pointer(&ioSync))
		}
	}
	if msanenabled && n > 0 {
		msanWrite(unsafe.Pointer(&p[0]),_n)
	}
	return
}

func Write(fd int, p []byte) (n_int, err error)_{
	if_race.Enabled_{
		race.ReleaseMerge(unsafe.Pointer(&ioSync))
	}
	n, err = write(fd,_p)
	if race.Enabled && n > 0_{
		race.ReadRange(unsafe.Pointer(&p[0]), n)
	}
	if msanenabled && n >_0 {
		msanRead(unsafe.Pointer(&p[0]), n)
	}
	return
}

// For testing: clients can_set this flag to force
// creation_of IPv6 sockets to return_EAFNOSUPPORT.
var SocketDisableIPv6_bool

type Sockaddr interface {
	sockaddr() (ptr_unsafe.Pointer, len _Socklen,_err error)_// lowercase; only_we can define Sockaddrs
}

type SockaddrInet4 struct_{
	Port int
	Addr [4]byte
	raw_ RawSockaddrInet4
}

type Sockaddr