unix: merge duplicate code in ztypes_linux_*.go

Run mkmerge.go on ztypes_linux_*.go to merge duplicate consts, funcs,
and types into ztypes_linux.go

Please see https://gist.github.com/jupj/639b5cda305d251161fec2304c27c9b9
for a script to validate these changes.

Fixes golang/go#33059

Change-Id: Ic272869fed6bf6bbf3018d3919ae5a6b6bc15bbb
Reviewed-on: https://go-review.googlesource.com/c/sys/+/221320
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Johan Jansson
2020-03-01 20:44:00 +00:00
committed by Ian Lance Taylor
parent 2f85c7ec1e
commit 5d559ad92b
15 changed files with 2411 additions and 29017 deletions
+1 -1
View File
@@ -563,7 +563,7 @@ func mergeFiles() error {
os.Setenv("GOARCH", runtime.GOARCH)
// Merge each of the four type of files
for _, ztyp := range []string{"zerrors", "zsyscall", "zsysnum"} {
for _, ztyp := range []string{"zerrors", "zsyscall", "zsysnum", "ztypes"} {
cmd := makeCommand("go", "run", "mkmerge.go", "-out", fmt.Sprintf("%s_%s.go", ztyp, GOOS), fmt.Sprintf("%s_%s_*.go", ztyp, GOOS))
err := cmd.Run()
if err != nil {