aboutsummaryrefslogtreecommitdiff
path: root/src/internal/syscall
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2015-03-31 16:59:02 +1100
committerAlex Brainman <alex.brainman@gmail.com>2015-03-31 08:11:24 +0000
commit34ee744d006b3d9c8bd67107b012ad0a5f5ef3b8 (patch)
tree147505e84b4d23c9fd673cd612db70a7858581be /src/internal/syscall
parenta2f3d73fee16ee2a4662593f3bcdd1cdb99a7961 (diff)
downloadgo-34ee744d006b3d9c8bd67107b012ad0a5f5ef3b8.tar.xz
crypto/x509: use syscall.GetVersion instead of internal/syscall/windows.GetVersion
cl8167 introduced internal/syscall/windows.GetVersion, but we already have that function in syscall.GetVersion. Use that instead. Also revert all internal/syscall/windows cl8167 changes. Change-Id: I512a5bf4b3b696e93aaf69e9e8b7df7022670ec0 Reviewed-on: https://go-review.googlesource.com/8302 Reviewed-by: Daniel Theophanes <kardianos@gmail.com> Reviewed-by: Minux Ma <minux@golang.org>
Diffstat (limited to 'src/internal/syscall')
-rw-r--r--src/internal/syscall/windows/syscall_windows.go6
-rw-r--r--src/internal/syscall/windows/zsyscall_windows.go7
2 files changed, 0 insertions, 13 deletions
diff --git a/src/internal/syscall/windows/syscall_windows.go b/src/internal/syscall/windows/syscall_windows.go
index 28aa13b5e7..49bfeea1f4 100644
--- a/src/internal/syscall/windows/syscall_windows.go
+++ b/src/internal/syscall/windows/syscall_windows.go
@@ -97,7 +97,6 @@ const (
//sys GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizeOfPointer *uint32) (errcode error) = iphlpapi.GetAdaptersAddresses
//sys GetComputerNameEx(nameformat uint32, buf *uint16, n *uint32) (err error) = GetComputerNameExW
-//sys getVersion() (v uint32) = GetVersion
const (
ComputerNameNetBIOS = 0
@@ -110,8 +109,3 @@ const (
ComputerNamePhysicalDnsFullyQualified = 7
ComputerNameMax = 8
)
-
-func GetVersion() (major, minor byte) {
- low := uint16(getVersion())
- return byte(low), byte(low >> 8)
-}
diff --git a/src/internal/syscall/windows/zsyscall_windows.go b/src/internal/syscall/windows/zsyscall_windows.go
index bff242126c..50c7c5165b 100644
--- a/src/internal/syscall/windows/zsyscall_windows.go
+++ b/src/internal/syscall/windows/zsyscall_windows.go
@@ -13,7 +13,6 @@ var (
procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
- procGetVersion = modkernel32.NewProc("GetVersion")
)
func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizeOfPointer *uint32) (errcode error) {
@@ -35,9 +34,3 @@ func GetComputerNameEx(nameformat uint32, buf *uint16, n *uint32) (err error) {
}
return
}
-
-func getVersion() (v uint32) {
- r0, _, _ := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0)
- v = uint32(r0)
- return
-}