Skip to content

Commit 8e2f460

Browse files
committed
ipv4: drop support for go1.4 or below
Change-Id: Ifbc3848dcf1f7d43e3d781bcfe24e144ce028c32 Reviewed-on: https://go-review.googlesource.com/30894 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
1 parent 6dba816 commit 8e2f460

12 files changed

+2
-31
lines changed

ipv4/gen.go

-9
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,6 @@ func genzsys() error {
5252
if err != nil {
5353
return err
5454
}
55-
// The ipv4 package still supports go1.2, and so we need to
56-
// take care of additional platforms in go1.3 and above for
57-
// working with go1.2.
58-
switch {
59-
case runtime.GOOS == "dragonfly" || runtime.GOOS == "solaris":
60-
b = bytes.Replace(b, []byte("package ipv4\n"), []byte("// +build "+runtime.GOOS+"\n\npackage ipv4\n"), 1)
61-
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"):
62-
b = bytes.Replace(b, []byte("package ipv4\n"), []byte("// +build "+runtime.GOOS+","+runtime.GOARCH+"\n\npackage ipv4\n"), 1)
63-
}
6455
b, err = format.Source(b)
6556
if err != nil {
6657
return err

ipv4/sys_linux_386.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// +build go1.2
5+
#include "textflag.h"
66

7-
TEXT ·socketcall(SB),4,$0-36
7+
TEXT ·socketcall(SB),NOSPLIT,$0-36
88
JMP syscall·socketcall(SB)

ipv4/syscall_solaris.go

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
// +build solaris
6-
75
package ipv4
86

97
import (

ipv4/zsys_dragonfly.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Created by cgo -godefs - DO NOT EDIT
22
// cgo -godefs defs_dragonfly.go
33

4-
// +build dragonfly
5-
64
package ipv4
75

86
const (

ipv4/zsys_linux_arm64.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Created by cgo -godefs - DO NOT EDIT
22
// cgo -godefs defs_linux.go
33

4-
// +build linux,arm64
5-
64
package ipv4
75

86
const (

ipv4/zsys_linux_mips64.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Created by cgo -godefs - DO NOT EDIT
22
// cgo -godefs defs_linux.go
33

4-
// +build linux,mips64
5-
64
package ipv4
75

86
const (

ipv4/zsys_linux_mips64le.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Created by cgo -godefs - DO NOT EDIT
22
// cgo -godefs defs_linux.go
33

4-
// +build linux,mips64le
5-
64
package ipv4
75

86
const (

ipv4/zsys_linux_ppc.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Created by cgo -godefs - DO NOT EDIT
22
// cgo -godefs defs_linux.go
33

4-
// +build linux,ppc
5-
64
package ipv4
75

86
const (

ipv4/zsys_linux_ppc64.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Created by cgo -godefs - DO NOT EDIT
22
// cgo -godefs defs_linux.go
33

4-
// +build linux,ppc64
5-
64
package ipv4
75

86
const (

ipv4/zsys_linux_ppc64le.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Created by cgo -godefs - DO NOT EDIT
22
// cgo -godefs defs_linux.go
33

4-
// +build linux,ppc64le
5-
64
package ipv4
75

86
const (

ipv4/zsys_linux_s390x.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Created by cgo -godefs - DO NOT EDIT
22
// cgo -godefs defs_linux.go
33

4-
// +build linux,s390x
5-
64
package ipv4
75

86
const (

ipv4/zsys_solaris.go

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Created by cgo -godefs - DO NOT EDIT
22
// cgo -godefs defs_solaris.go
33

4-
// +build solaris
5-
64
package ipv4
75

86
const (

0 commit comments

Comments
 (0)