]> Cypherpunks repositories - gostls13.git/commitdiff
net: introduce netgo build tag to build a pure Go net package.
authorShenghou Ma <minux.ma@gmail.com>
Mon, 10 Jun 2013 18:55:16 +0000 (02:55 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Mon, 10 Jun 2013 18:55:16 +0000 (02:55 +0800)
Fixes #4078.

R=golang-dev, bradfitz, rsc, iant
CC=golang-dev
https://golang.org/cl/7100050

doc/go1.2.txt
src/pkg/net/cgo_bsd.go
src/pkg/net/cgo_linux.go
src/pkg/net/cgo_netbsd.go
src/pkg/net/cgo_openbsd.go
src/pkg/net/cgo_stub.go
src/pkg/net/cgo_unix.go

index b8034894b83488b18de219677b0a35d7f1b5ea01..37172db0bb486a56e4d940075f147b701dffde4d 100644 (file)
@@ -15,4 +15,5 @@ crypto/tls: add support for TLS 1.1. (CL 7872043).
 fmt: indexed access to arguments in Printf etc. (CL 9680043).
 go/build: support including C++ code with cgo (CL 8248043).
 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).
index 3b38e3d83e75da5077b9a456f793566f4df3dcf3..53f8c38e3be0cb5e9590d29707d5f897eee10fa6 100644 (file)
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build !netgo
 // +build darwin freebsd
 
 package net
index f6cefa89ae785c8f059e03ecaff0de0c48fb0590..693aef03d244301e60721ed715d35a61169c12bc 100644 (file)
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build cgo,!netgo
+
 package net
 
 /*
index aeaf8e568adc06bbb5e8b687cf192064e6a048d0..09c5ad2d9fde595bd5a3dbdef199d98d356bf8a3 100644 (file)
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build cgo,!netgo
+
 package net
 
 /*
index aeaf8e568adc06bbb5e8b687cf192064e6a048d0..09c5ad2d9fde595bd5a3dbdef199d98d356bf8a3 100644 (file)
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build cgo,!netgo
+
 package net
 
 /*
index 52e57d7400e075ef3f6ee968bed1616ee93ed792..f533c14212fb9836dec8eeb35348ae625b415060 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // 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.
 
index 7476140ebf8d4f8ee44c4a4418773f26e5d4e1a5..0c3c56936ec02f556b0f9d4ee430a3e14361b2e3 100644 (file)
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build !netgo
 // +build darwin freebsd linux netbsd openbsd
 
 package net