瀏覽代碼

ipv6: drop support for go1.4 or below

Change-Id: I95dfb05e5c958c2949059c4230c023968a442b50
Reviewed-on: https://go-review.googlesource.com/30895
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Mikio Hara 9 年之前
父節點
當前提交
c4e6936235

+ 0 - 9
ipv6/gen.go

@@ -52,15 +52,6 @@ func genzsys() error {
 	if err != nil {
 		return err
 	}
-	// The ipv6 package still supports go1.2, and so we need to
-	// take care of additional platforms in go1.3 and above for
-	// working with go1.2.
-	switch {
-	case runtime.GOOS == "dragonfly" || runtime.GOOS == "solaris":
-		b = bytes.Replace(b, []byte("package ipv6\n"), []byte("// +build "+runtime.GOOS+"\n\npackage ipv6\n"), 1)
-	case runtime.GOOS == "linux" && (runtime.GOARCH == "arm64" || runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" || runtime.GOARCH == "ppc" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le" || runtime.GOARCH == "s390x"):
-		b = bytes.Replace(b, []byte("package ipv6\n"), []byte("// +build "+runtime.GOOS+","+runtime.GOARCH+"\n\npackage ipv6\n"), 1)
-	}
 	b, err = format.Source(b)
 	if err != nil {
 		return err

+ 0 - 2
ipv6/icmp_solaris.go

@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build solaris
-
 package ipv6
 
 func (f *icmpv6Filter) accept(typ ICMPType) {

+ 2 - 2
ipv6/sys_linux_386.s

@@ -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 go1.2
+#include "textflag.h"
 
-TEXT	·socketcall(SB),4,$0-36
+TEXT	·socketcall(SB),NOSPLIT,$0-36
 	JMP	syscall·socketcall(SB)

+ 0 - 2
ipv6/syscall_solaris.go

@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build solaris
-
 package ipv6
 
 import (

+ 0 - 2
ipv6/zsys_dragonfly.go

@@ -1,8 +1,6 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs defs_dragonfly.go
 
-// +build dragonfly
-
 package ipv6
 
 const (

+ 0 - 2
ipv6/zsys_linux_arm64.go

@@ -1,8 +1,6 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs defs_linux.go
 
-// +build linux,arm64
-
 package ipv6
 
 const (

+ 0 - 2
ipv6/zsys_linux_mips64.go

@@ -1,8 +1,6 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs defs_linux.go
 
-// +build linux,mips64
-
 package ipv6
 
 const (

+ 0 - 2
ipv6/zsys_linux_mips64le.go

@@ -1,8 +1,6 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs defs_linux.go
 
-// +build linux,mips64le
-
 package ipv6
 
 const (

+ 0 - 2
ipv6/zsys_linux_ppc.go

@@ -1,8 +1,6 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs defs_linux.go
 
-// +build linux,ppc
-
 package ipv6
 
 const (

+ 0 - 2
ipv6/zsys_linux_ppc64.go

@@ -1,8 +1,6 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs defs_linux.go
 
-// +build linux,ppc64
-
 package ipv6
 
 const (

+ 0 - 2
ipv6/zsys_linux_ppc64le.go

@@ -1,8 +1,6 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs defs_linux.go
 
-// +build linux,ppc64le
-
 package ipv6
 
 const (

+ 0 - 2
ipv6/zsys_linux_s390x.go

@@ -1,8 +1,6 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs defs_linux.go
 
-// +build linux,s390x
-
 package ipv6
 
 const (

+ 0 - 2
ipv6/zsys_solaris.go

@@ -1,8 +1,6 @@
 // Created by cgo -godefs - DO NOT EDIT
 // cgo -godefs defs_solaris.go
 
-// +build solaris
-
 package ipv6
 
 const (