Commit 06f55f50 authored by Shenghou Ma's avatar Shenghou Ma

net: introduce netgo build tag to build a pure Go net package.

Fixes #4078.

R=golang-dev, bradfitz, rsc, iant
CC=golang-dev
https://golang.org/cl/7100050
parent bdac989e
...@@ -15,4 +15,5 @@ crypto/tls: add support for TLS 1.1. (CL 7872043). ...@@ -15,4 +15,5 @@ crypto/tls: add support for TLS 1.1. (CL 7872043).
fmt: indexed access to arguments in Printf etc. (CL 9680043). fmt: indexed access to arguments in Printf etc. (CL 9680043).
go/build: support including C++ code with cgo (CL 8248043). go/build: support including C++ code with cgo (CL 8248043).
io: Copy prioritizes WriterTo over ReaderFrom (CL 9462044). io: Copy prioritizes WriterTo over ReaderFrom (CL 9462044).
net: new build tag netgo for building a pure Go net package (CL 7100050).
testing: AllocsPerRun is now quantized to an integer (the type is still float64) (CL 9837049). testing: AllocsPerRun is now quantized to an integer (the type is still float64) (CL 9837049).
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build !netgo
// +build darwin freebsd // +build darwin freebsd
package net package net
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build cgo,!netgo
package net package net
/* /*
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build cgo,!netgo
package net package net
/* /*
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build cgo,!netgo
package net package net
/* /*
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build !cgo // +build !cgo netgo
// Stub cgo routines for systems that do not use cgo to do network lookups. // Stub cgo routines for systems that do not use cgo to do network lookups.
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build !netgo
// +build darwin freebsd linux netbsd openbsd // +build darwin freebsd linux netbsd openbsd
package net package net
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment