unix: merge duplicate code in zsyscall_linux_*.go

Run mkmerge.go on zsyscall_linux_*.go to merge duplicate consts, funcs,
and types into zsyscall_linux.go

Also, run mkmerge.go on zsysnum_linux_*.go; currently there is nothing
to merge.

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

Updates golang/go#33059

Change-Id: I715ada044ee957475669d94b16de059ebb9162d1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/221319
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 authored and Ian Lance Taylor committed 2020-03-01 15:39:31 +00:00
1 parent c5d0d7b4ec
commit 2f85c7ec1e
15 files changed
+1826 -23596

No files matched your search

+1 -1
View File
@@ -563,7 +563,7 @@ func mergeFiles() error {
os.Setenv("GOARCH", runtime.GOARCH) os.Setenv("GOARCH", runtime.GOARCH)
// Merge each of the four type of files // Merge each of the four type of files
for _, ztyp := range []string{"zerrors"} { for _, ztyp := range []string{"zerrors", "zsyscall", "zsysnum"} {
cmd := makeCommand("go", "run", "mkmerge.go", "-out", fmt.Sprintf("%s_%s.go", ztyp, GOOS), fmt.Sprintf("%s_%s_*.go", ztyp, GOOS)) cmd := makeCommand("go", "run", "mkmerge.go", "-out", fmt.Sprintf("%s_%s.go", ztyp, GOOS), fmt.Sprintf("%s_%s_*.go", ztyp, GOOS))
err := cmd.Run() err := cmd.Run()
if err != nil { if err != nil {
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff