1
0
mirror of https://github.com/golang/go synced 2024-11-13 17:50:23 -07:00

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
This commit is contained in:
Shenghou Ma 2013-06-11 02:55:16 +08:00
parent bdac989ef7
commit 06f55f5009
7 changed files with 10 additions and 1 deletions

View 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). 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).

View File

@ -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

View File

@ -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
/* /*

View File

@ -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
/* /*

View File

@ -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
/* /*

View File

@ -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.

View File

@ -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