mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-27 20:36:31 -04:00
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:
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
|
||||
package windows
|
||||
|
||||
//go:generate ./generate.bash
|
||||
//go:generate ./mkerrors.bash zerrors_windows.go
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user