Revert "windows: make zsyscall_windows.go generatable on non-WSL env"

This reverts commit ad28b68e88.

Reason for revert: It completely breaks 'go generate' on windows

Update golang/go#32349

Change-Id: I4bedc6cf5130eb48c18c3208c8029433407430e4
Reviewed-on: https://go-review.googlesource.com/c/sys/+/179580
Reviewed-by: Takuto Ikuta <tikuta@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
Alex Brainman
2019-05-31 07:31:56 +00:00
parent ad28b68e88
commit 46560c3f3c
4 changed files with 11 additions and 17 deletions
-15
View File
@@ -1,15 +0,0 @@
#!/bin/bash
# Copyright 2019 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
# For successful zsyscall_windows.go generation on non-WSL env, this should
# run before mkerrors.bash.
echo "# Generating zsyscall_windows.go ..."
go run $(go env GOROOT)/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go
echo "# Generating zerrors_windows.go ..."
./mkerrors.bash zerrors_windows.go
+1 -1
View File
@@ -9,7 +9,7 @@ shopt -s nullglob
[[ $# -eq 1 ]] || { echo "Usage: $0 OUTPUT_FILE.go" >&2; exit 1; }
winerror="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/winerror.h | sort -Vr | head -n 1)"
[[ -n $winerror ]] || { echo "Unable to find winerror.h; this expects to be run on Windows with WSL" >&2; exit 1; }
[[ -n $winerror ]] || { echo "Unable to find winerror.h" >&2; exit 1; }
declare -A errors
+1 -1
View File
@@ -6,4 +6,4 @@
package windows
//go:generate ./generate.bash
//go:generate ./mkerrors.bash zerrors_windows.go
+9
View File
@@ -0,0 +1,9 @@
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build generate
package windows
//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go