Browse Source

upgrade x/crypto and dependencies

tags/v2.7.0-rc1
Shivaram Lingamneni 3 years ago
parent
commit
c62edcc909
100 changed files with 2804 additions and 1014 deletions
  1. 1
    2
      go.mod
  2. 8
    0
      go.sum
  3. 2
    1
      vendor/golang.org/x/crypto/sha3/hashes_generic.go
  4. 2
    1
      vendor/golang.org/x/crypto/sha3/keccakf.go
  5. 2
    1
      vendor/golang.org/x/crypto/sha3/keccakf_amd64.go
  6. 1
    1
      vendor/golang.org/x/crypto/sha3/keccakf_amd64.s
  7. 1
    0
      vendor/golang.org/x/crypto/sha3/register.go
  8. 2
    1
      vendor/golang.org/x/crypto/sha3/sha3_s390x.go
  9. 1
    1
      vendor/golang.org/x/crypto/sha3/sha3_s390x.s
  10. 2
    1
      vendor/golang.org/x/crypto/sha3/shake_generic.go
  11. 2
    1
      vendor/golang.org/x/crypto/sha3/xor.go
  12. 2
    1
      vendor/golang.org/x/crypto/sha3/xor_unaligned.go
  13. 38
    949
      vendor/golang.org/x/crypto/ssh/terminal/terminal.go
  14. 1
    1
      vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
  15. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_arm64.s
  16. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
  17. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
  18. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
  19. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_s390x.s
  20. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_x86.s
  21. 1
    1
      vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
  22. 8
    0
      vendor/golang.org/x/sys/plan9/asm.s
  23. 30
    0
      vendor/golang.org/x/sys/plan9/asm_plan9_386.s
  24. 30
    0
      vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s
  25. 25
    0
      vendor/golang.org/x/sys/plan9/asm_plan9_arm.s
  26. 70
    0
      vendor/golang.org/x/sys/plan9/const_plan9.go
  27. 212
    0
      vendor/golang.org/x/sys/plan9/dir_plan9.go
  28. 31
    0
      vendor/golang.org/x/sys/plan9/env_plan9.go
  29. 50
    0
      vendor/golang.org/x/sys/plan9/errors_plan9.go
  30. 150
    0
      vendor/golang.org/x/sys/plan9/mkall.sh
  31. 246
    0
      vendor/golang.org/x/sys/plan9/mkerrors.sh
  32. 23
    0
      vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh
  33. 21
    0
      vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
  34. 23
    0
      vendor/golang.org/x/sys/plan9/pwd_plan9.go
  35. 30
    0
      vendor/golang.org/x/sys/plan9/race.go
  36. 25
    0
      vendor/golang.org/x/sys/plan9/race0.go
  37. 22
    0
      vendor/golang.org/x/sys/plan9/str.go
  38. 116
    0
      vendor/golang.org/x/sys/plan9/syscall.go
  39. 349
    0
      vendor/golang.org/x/sys/plan9/syscall_plan9.go
  40. 284
    0
      vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
  41. 284
    0
      vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
  42. 284
    0
      vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
  43. 49
    0
      vendor/golang.org/x/sys/plan9/zsysnum_plan9.go
  44. 1
    1
      vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
  45. 1
    1
      vendor/golang.org/x/sys/unix/asm_darwin_386.s
  46. 1
    1
      vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
  47. 1
    1
      vendor/golang.org/x/sys/unix/asm_darwin_arm.s
  48. 1
    1
      vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
  49. 1
    1
      vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
  50. 1
    1
      vendor/golang.org/x/sys/unix/asm_freebsd_386.s
  51. 1
    1
      vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
  52. 1
    1
      vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
  53. 1
    1
      vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
  54. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_386.s
  55. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_amd64.s
  56. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_arm.s
  57. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_arm64.s
  58. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
  59. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
  60. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
  61. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
  62. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_s390x.s
  63. 1
    1
      vendor/golang.org/x/sys/unix/asm_netbsd_386.s
  64. 1
    1
      vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
  65. 1
    1
      vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
  66. 1
    1
      vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
  67. 1
    1
      vendor/golang.org/x/sys/unix/asm_openbsd_386.s
  68. 1
    1
      vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
  69. 1
    1
      vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
  70. 1
    1
      vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s
  71. 1
    1
      vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s
  72. 1
    1
      vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
  73. 1
    1
      vendor/golang.org/x/sys/unix/endian_big.go
  74. 1
    1
      vendor/golang.org/x/sys/unix/endian_little.go
  75. 2
    0
      vendor/golang.org/x/sys/unix/mkerrors.sh
  76. 13
    0
      vendor/golang.org/x/sys/unix/syscall_dragonfly.go
  77. 1
    1
      vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
  78. 1
    1
      vendor/golang.org/x/sys/unix/syscall_linux_gc.go
  79. 1
    1
      vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
  80. 1
    1
      vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go
  81. 1
    1
      vendor/golang.org/x/sys/unix/syscall_unix_gc.go
  82. 1
    1
      vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
  83. 6
    0
      vendor/golang.org/x/sys/unix/zerrors_linux.go
  84. 1
    1
      vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
  85. 10
    0
      vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
  86. 18
    0
      vendor/golang.org/x/sys/unix/ztypes_linux.go
  87. 2
    0
      vendor/golang.org/x/sys/windows/dll_windows.go
  88. 2
    1
      vendor/golang.org/x/sys/windows/security_windows.go
  89. 100
    0
      vendor/golang.org/x/sys/windows/setupapierrors_windows.go
  90. 8
    2
      vendor/golang.org/x/sys/windows/syscall_windows.go
  91. 29
    0
      vendor/golang.org/x/sys/windows/types_windows.go
  92. 39
    5
      vendor/golang.org/x/sys/windows/zsyscall_windows.go
  93. 3
    0
      vendor/golang.org/x/term/AUTHORS
  94. 26
    0
      vendor/golang.org/x/term/CONTRIBUTING.md
  95. 3
    0
      vendor/golang.org/x/term/CONTRIBUTORS
  96. 27
    0
      vendor/golang.org/x/term/LICENSE
  97. 22
    0
      vendor/golang.org/x/term/PATENTS
  98. 17
    0
      vendor/golang.org/x/term/README.md
  99. 5
    0
      vendor/golang.org/x/term/go.mod
  100. 0
    0
      vendor/golang.org/x/term/go.sum

+ 1
- 2
go.mod View File

@@ -19,8 +19,7 @@ require (
19 19
 	github.com/tidwall/buntdb v1.2.3
20 20
 	github.com/tidwall/rtree v0.0.0-20201027154624-32188eeb08a8 // indirect
21 21
 	github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208
22
-	golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
23
-	golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf // indirect
22
+	golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc
24 23
 	golang.org/x/text v0.3.4
25 24
 	gopkg.in/yaml.v2 v2.3.0
26 25
 )

+ 8
- 0
go.sum View File

@@ -105,9 +105,12 @@ github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208/go.mod h1:BzWtXXrXz
105 105
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
106 106
 golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=
107 107
 golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
108
+golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc h1:+q90ECDSAQirdykUN6sPEiBXBsp8Csjcca8Oy7bgLTA=
109
+golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
108 110
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
109 111
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
110 112
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
113
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
111 114
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
112 115
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
113 116
 golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -117,9 +120,14 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwg
117 120
 golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
118 121
 golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf h1:kt3wY1Lu5MJAnKTfoMR52Cu4gwvna4VTzNOiT8tY73s=
119 122
 golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
123
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
124
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
125
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
126
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
120 127
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
121 128
 golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
122 129
 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
130
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
123 131
 golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
124 132
 golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
125 133
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

+ 2
- 1
vendor/golang.org/x/crypto/sha3/hashes_generic.go View File

@@ -2,7 +2,8 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build gccgo appengine !s390x
5
+//go:build !gc || purego || !s390x
6
+// +build !gc purego !s390x
6 7
 
7 8
 package sha3
8 9
 

+ 2
- 1
vendor/golang.org/x/crypto/sha3/keccakf.go View File

@@ -2,7 +2,8 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-//  +build !amd64 appengine gccgo
5
+//go:build !amd64 || purego || !gc
6
+// +build !amd64 purego !gc
6 7
 
7 8
 package sha3
8 9
 

+ 2
- 1
vendor/golang.org/x/crypto/sha3/keccakf_amd64.go View File

@@ -2,7 +2,8 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build amd64,!appengine,!gccgo
5
+//go:build amd64 && !purego && gc
6
+// +build amd64,!purego,gc
6 7
 
7 8
 package sha3
8 9
 

+ 1
- 1
vendor/golang.org/x/crypto/sha3/keccakf_amd64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build amd64,!appengine,!gccgo
5
+// +build amd64,!purego,gc
6 6
 
7 7
 // This code was translated into a form compatible with 6a from the public
8 8
 // domain sources at https://github.com/gvanas/KeccakCodePackage

+ 1
- 0
vendor/golang.org/x/crypto/sha3/register.go View File

@@ -2,6 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
+//go:build go1.4
5 6
 // +build go1.4
6 7
 
7 8
 package sha3

+ 2
- 1
vendor/golang.org/x/crypto/sha3/sha3_s390x.go View File

@@ -2,7 +2,8 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo,!appengine
5
+//go:build gc && !purego
6
+// +build gc,!purego
6 7
 
7 8
 package sha3
8 9
 

+ 1
- 1
vendor/golang.org/x/crypto/sha3/sha3_s390x.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo,!appengine
5
+// +build gc,!purego
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 2
- 1
vendor/golang.org/x/crypto/sha3/shake_generic.go View File

@@ -2,7 +2,8 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build gccgo appengine !s390x
5
+//go:build !gc || purego || !s390x
6
+// +build !gc purego !s390x
6 7
 
7 8
 package sha3
8 9
 

+ 2
- 1
vendor/golang.org/x/crypto/sha3/xor.go View File

@@ -2,7 +2,8 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !amd64,!386,!ppc64le appengine
5
+//go:build (!amd64 && !386 && !ppc64le) || purego
6
+// +build !amd64,!386,!ppc64le purego
6 7
 
7 8
 package sha3
8 9
 

+ 2
- 1
vendor/golang.org/x/crypto/sha3/xor_unaligned.go View File

@@ -2,8 +2,9 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
+//go:build (amd64 || 386 || ppc64le) && !purego
5 6
 // +build amd64 386 ppc64le
6
-// +build !appengine
7
+// +build !purego
7 8
 
8 9
 package sha3
9 10
 

+ 38
- 949
vendor/golang.org/x/crypto/ssh/terminal/terminal.go
File diff suppressed because it is too large
View File


+ 1
- 1
vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/cpu/cpu_arm64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 package cpu
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 package cpu
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/cpu/cpu_gc_x86.go View File

@@ -3,7 +3,7 @@
3 3
 // license that can be found in the LICENSE file.
4 4
 
5 5
 // +build 386 amd64 amd64p32
6
-// +build !gccgo
6
+// +build gc
7 7
 
8 8
 package cpu
9 9
 

+ 1
- 1
vendor/golang.org/x/sys/cpu/cpu_s390x.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/cpu/cpu_x86.s View File

@@ -3,7 +3,7 @@
3 3
 // license that can be found in the LICENSE file.
4 4
 
5 5
 // +build 386 amd64 amd64p32
6
-// +build !gccgo
6
+// +build gc
7 7
 
8 8
 #include "textflag.h"
9 9
 

+ 1
- 1
vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go View File

@@ -7,7 +7,7 @@
7 7
 // (See golang.org/issue/32102)
8 8
 
9 9
 // +build aix,ppc64
10
-// +build !gccgo
10
+// +build gc
11 11
 
12 12
 package cpu
13 13
 

+ 8
- 0
vendor/golang.org/x/sys/plan9/asm.s View File

@@ -0,0 +1,8 @@
1
+// Copyright 2014 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+#include "textflag.h"
6
+
7
+TEXT ·use(SB),NOSPLIT,$0
8
+	RET

+ 30
- 0
vendor/golang.org/x/sys/plan9/asm_plan9_386.s View File

@@ -0,0 +1,30 @@
1
+// Copyright 2009 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+#include "textflag.h"
6
+
7
+//
8
+// System call support for 386, Plan 9
9
+//
10
+
11
+// Just jump to package syscall's implementation for all these functions.
12
+// The runtime may know about them.
13
+
14
+TEXT	·Syscall(SB),NOSPLIT,$0-32
15
+	JMP	syscall·Syscall(SB)
16
+
17
+TEXT	·Syscall6(SB),NOSPLIT,$0-44
18
+	JMP	syscall·Syscall6(SB)
19
+
20
+TEXT ·RawSyscall(SB),NOSPLIT,$0-28
21
+	JMP	syscall·RawSyscall(SB)
22
+
23
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
24
+	JMP	syscall·RawSyscall6(SB)
25
+
26
+TEXT ·seek(SB),NOSPLIT,$0-36
27
+	JMP	syscall·seek(SB)
28
+
29
+TEXT ·exit(SB),NOSPLIT,$4-4
30
+	JMP	syscall·exit(SB)

+ 30
- 0
vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s View File

@@ -0,0 +1,30 @@
1
+// Copyright 2009 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+#include "textflag.h"
6
+
7
+//
8
+// System call support for amd64, Plan 9
9
+//
10
+
11
+// Just jump to package syscall's implementation for all these functions.
12
+// The runtime may know about them.
13
+
14
+TEXT	·Syscall(SB),NOSPLIT,$0-64
15
+	JMP	syscall·Syscall(SB)
16
+
17
+TEXT	·Syscall6(SB),NOSPLIT,$0-88
18
+	JMP	syscall·Syscall6(SB)
19
+
20
+TEXT ·RawSyscall(SB),NOSPLIT,$0-56
21
+	JMP	syscall·RawSyscall(SB)
22
+
23
+TEXT	·RawSyscall6(SB),NOSPLIT,$0-80
24
+	JMP	syscall·RawSyscall6(SB)
25
+
26
+TEXT ·seek(SB),NOSPLIT,$0-56
27
+	JMP	syscall·seek(SB)
28
+
29
+TEXT ·exit(SB),NOSPLIT,$8-8
30
+	JMP	syscall·exit(SB)

+ 25
- 0
vendor/golang.org/x/sys/plan9/asm_plan9_arm.s View File

@@ -0,0 +1,25 @@
1
+// Copyright 2009 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+#include "textflag.h"
6
+
7
+// System call support for plan9 on arm
8
+
9
+// Just jump to package syscall's implementation for all these functions.
10
+// The runtime may know about them.
11
+
12
+TEXT ·Syscall(SB),NOSPLIT,$0-32
13
+	JMP	syscall·Syscall(SB)
14
+
15
+TEXT ·Syscall6(SB),NOSPLIT,$0-44
16
+	JMP	syscall·Syscall6(SB)
17
+
18
+TEXT ·RawSyscall(SB),NOSPLIT,$0-28
19
+	JMP	syscall·RawSyscall(SB)
20
+
21
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
22
+	JMP	syscall·RawSyscall6(SB)
23
+
24
+TEXT ·seek(SB),NOSPLIT,$0-36
25
+	JMP	syscall·exit(SB)

+ 70
- 0
vendor/golang.org/x/sys/plan9/const_plan9.go View File

@@ -0,0 +1,70 @@
1
+package plan9
2
+
3
+// Plan 9 Constants
4
+
5
+// Open modes
6
+const (
7
+	O_RDONLY  = 0
8
+	O_WRONLY  = 1
9
+	O_RDWR    = 2
10
+	O_TRUNC   = 16
11
+	O_CLOEXEC = 32
12
+	O_EXCL    = 0x1000
13
+)
14
+
15
+// Rfork flags
16
+const (
17
+	RFNAMEG  = 1 << 0
18
+	RFENVG   = 1 << 1
19
+	RFFDG    = 1 << 2
20
+	RFNOTEG  = 1 << 3
21
+	RFPROC   = 1 << 4
22
+	RFMEM    = 1 << 5
23
+	RFNOWAIT = 1 << 6
24
+	RFCNAMEG = 1 << 10
25
+	RFCENVG  = 1 << 11
26
+	RFCFDG   = 1 << 12
27
+	RFREND   = 1 << 13
28
+	RFNOMNT  = 1 << 14
29
+)
30
+
31
+// Qid.Type bits
32
+const (
33
+	QTDIR    = 0x80
34
+	QTAPPEND = 0x40
35
+	QTEXCL   = 0x20
36
+	QTMOUNT  = 0x10
37
+	QTAUTH   = 0x08
38
+	QTTMP    = 0x04
39
+	QTFILE   = 0x00
40
+)
41
+
42
+// Dir.Mode bits
43
+const (
44
+	DMDIR    = 0x80000000
45
+	DMAPPEND = 0x40000000
46
+	DMEXCL   = 0x20000000
47
+	DMMOUNT  = 0x10000000
48
+	DMAUTH   = 0x08000000
49
+	DMTMP    = 0x04000000
50
+	DMREAD   = 0x4
51
+	DMWRITE  = 0x2
52
+	DMEXEC   = 0x1
53
+)
54
+
55
+const (
56
+	STATMAX    = 65535
57
+	ERRMAX     = 128
58
+	STATFIXLEN = 49
59
+)
60
+
61
+// Mount and bind flags
62
+const (
63
+	MREPL   = 0x0000
64
+	MBEFORE = 0x0001
65
+	MAFTER  = 0x0002
66
+	MORDER  = 0x0003
67
+	MCREATE = 0x0004
68
+	MCACHE  = 0x0010
69
+	MMASK   = 0x0017
70
+)

+ 212
- 0
vendor/golang.org/x/sys/plan9/dir_plan9.go View File

@@ -0,0 +1,212 @@
1
+// Copyright 2012 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+// Plan 9 directory marshalling. See intro(5).
6
+
7
+package plan9
8
+
9
+import "errors"
10
+
11
+var (
12
+	ErrShortStat = errors.New("stat buffer too short")
13
+	ErrBadStat   = errors.New("malformed stat buffer")
14
+	ErrBadName   = errors.New("bad character in file name")
15
+)
16
+
17
+// A Qid represents a 9P server's unique identification for a file.
18
+type Qid struct {
19
+	Path uint64 // the file server's unique identification for the file
20
+	Vers uint32 // version number for given Path
21
+	Type uint8  // the type of the file (plan9.QTDIR for example)
22
+}
23
+
24
+// A Dir contains the metadata for a file.
25
+type Dir struct {
26
+	// system-modified data
27
+	Type uint16 // server type
28
+	Dev  uint32 // server subtype
29
+
30
+	// file data
31
+	Qid    Qid    // unique id from server
32
+	Mode   uint32 // permissions
33
+	Atime  uint32 // last read time
34
+	Mtime  uint32 // last write time
35
+	Length int64  // file length
36
+	Name   string // last element of path
37
+	Uid    string // owner name
38
+	Gid    string // group name
39
+	Muid   string // last modifier name
40
+}
41
+
42
+var nullDir = Dir{
43
+	Type: ^uint16(0),
44
+	Dev:  ^uint32(0),
45
+	Qid: Qid{
46
+		Path: ^uint64(0),
47
+		Vers: ^uint32(0),
48
+		Type: ^uint8(0),
49
+	},
50
+	Mode:   ^uint32(0),
51
+	Atime:  ^uint32(0),
52
+	Mtime:  ^uint32(0),
53
+	Length: ^int64(0),
54
+}
55
+
56
+// Null assigns special "don't touch" values to members of d to
57
+// avoid modifying them during plan9.Wstat.
58
+func (d *Dir) Null() { *d = nullDir }
59
+
60
+// Marshal encodes a 9P stat message corresponding to d into b
61
+//
62
+// If there isn't enough space in b for a stat message, ErrShortStat is returned.
63
+func (d *Dir) Marshal(b []byte) (n int, err error) {
64
+	n = STATFIXLEN + len(d.Name) + len(d.Uid) + len(d.Gid) + len(d.Muid)
65
+	if n > len(b) {
66
+		return n, ErrShortStat
67
+	}
68
+
69
+	for _, c := range d.Name {
70
+		if c == '/' {
71
+			return n, ErrBadName
72
+		}
73
+	}
74
+
75
+	b = pbit16(b, uint16(n)-2)
76
+	b = pbit16(b, d.Type)
77
+	b = pbit32(b, d.Dev)
78
+	b = pbit8(b, d.Qid.Type)
79
+	b = pbit32(b, d.Qid.Vers)
80
+	b = pbit64(b, d.Qid.Path)
81
+	b = pbit32(b, d.Mode)
82
+	b = pbit32(b, d.Atime)
83
+	b = pbit32(b, d.Mtime)
84
+	b = pbit64(b, uint64(d.Length))
85
+	b = pstring(b, d.Name)
86
+	b = pstring(b, d.Uid)
87
+	b = pstring(b, d.Gid)
88
+	b = pstring(b, d.Muid)
89
+
90
+	return n, nil
91
+}
92
+
93
+// UnmarshalDir decodes a single 9P stat message from b and returns the resulting Dir.
94
+//
95
+// If b is too small to hold a valid stat message, ErrShortStat is returned.
96
+//
97
+// If the stat message itself is invalid, ErrBadStat is returned.
98
+func UnmarshalDir(b []byte) (*Dir, error) {
99
+	if len(b) < STATFIXLEN {
100
+		return nil, ErrShortStat
101
+	}
102
+	size, buf := gbit16(b)
103
+	if len(b) != int(size)+2 {
104
+		return nil, ErrBadStat
105
+	}
106
+	b = buf
107
+
108
+	var d Dir
109
+	d.Type, b = gbit16(b)
110
+	d.Dev, b = gbit32(b)
111
+	d.Qid.Type, b = gbit8(b)
112
+	d.Qid.Vers, b = gbit32(b)
113
+	d.Qid.Path, b = gbit64(b)
114
+	d.Mode, b = gbit32(b)
115
+	d.Atime, b = gbit32(b)
116
+	d.Mtime, b = gbit32(b)
117
+
118
+	n, b := gbit64(b)
119
+	d.Length = int64(n)
120
+
121
+	var ok bool
122
+	if d.Name, b, ok = gstring(b); !ok {
123
+		return nil, ErrBadStat
124
+	}
125
+	if d.Uid, b, ok = gstring(b); !ok {
126
+		return nil, ErrBadStat
127
+	}
128
+	if d.Gid, b, ok = gstring(b); !ok {
129
+		return nil, ErrBadStat
130
+	}
131
+	if d.Muid, b, ok = gstring(b); !ok {
132
+		return nil, ErrBadStat
133
+	}
134
+
135
+	return &d, nil
136
+}
137
+
138
+// pbit8 copies the 8-bit number v to b and returns the remaining slice of b.
139
+func pbit8(b []byte, v uint8) []byte {
140
+	b[0] = byte(v)
141
+	return b[1:]
142
+}
143
+
144
+// pbit16 copies the 16-bit number v to b in little-endian order and returns the remaining slice of b.
145
+func pbit16(b []byte, v uint16) []byte {
146
+	b[0] = byte(v)
147
+	b[1] = byte(v >> 8)
148
+	return b[2:]
149
+}
150
+
151
+// pbit32 copies the 32-bit number v to b in little-endian order and returns the remaining slice of b.
152
+func pbit32(b []byte, v uint32) []byte {
153
+	b[0] = byte(v)
154
+	b[1] = byte(v >> 8)
155
+	b[2] = byte(v >> 16)
156
+	b[3] = byte(v >> 24)
157
+	return b[4:]
158
+}
159
+
160
+// pbit64 copies the 64-bit number v to b in little-endian order and returns the remaining slice of b.
161
+func pbit64(b []byte, v uint64) []byte {
162
+	b[0] = byte(v)
163
+	b[1] = byte(v >> 8)
164
+	b[2] = byte(v >> 16)
165
+	b[3] = byte(v >> 24)
166
+	b[4] = byte(v >> 32)
167
+	b[5] = byte(v >> 40)
168
+	b[6] = byte(v >> 48)
169
+	b[7] = byte(v >> 56)
170
+	return b[8:]
171
+}
172
+
173
+// pstring copies the string s to b, prepending it with a 16-bit length in little-endian order, and
174
+// returning the remaining slice of b..
175
+func pstring(b []byte, s string) []byte {
176
+	b = pbit16(b, uint16(len(s)))
177
+	n := copy(b, s)
178
+	return b[n:]
179
+}
180
+
181
+// gbit8 reads an 8-bit number from b and returns it with the remaining slice of b.
182
+func gbit8(b []byte) (uint8, []byte) {
183
+	return uint8(b[0]), b[1:]
184
+}
185
+
186
+// gbit16 reads a 16-bit number in little-endian order from b and returns it with the remaining slice of b.
187
+func gbit16(b []byte) (uint16, []byte) {
188
+	return uint16(b[0]) | uint16(b[1])<<8, b[2:]
189
+}
190
+
191
+// gbit32 reads a 32-bit number in little-endian order from b and returns it with the remaining slice of b.
192
+func gbit32(b []byte) (uint32, []byte) {
193
+	return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24, b[4:]
194
+}
195
+
196
+// gbit64 reads a 64-bit number in little-endian order from b and returns it with the remaining slice of b.
197
+func gbit64(b []byte) (uint64, []byte) {
198
+	lo := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
199
+	hi := uint32(b[4]) | uint32(b[5])<<8 | uint32(b[6])<<16 | uint32(b[7])<<24
200
+	return uint64(lo) | uint64(hi)<<32, b[8:]
201
+}
202
+
203
+// gstring reads a string from b, prefixed with a 16-bit length in little-endian order.
204
+// It returns the string with the remaining slice of b and a boolean. If the length is
205
+// greater than the number of bytes in b, the boolean will be false.
206
+func gstring(b []byte) (string, []byte, bool) {
207
+	n, b := gbit16(b)
208
+	if int(n) > len(b) {
209
+		return "", b, false
210
+	}
211
+	return string(b[:n]), b[n:], true
212
+}

+ 31
- 0
vendor/golang.org/x/sys/plan9/env_plan9.go View File

@@ -0,0 +1,31 @@
1
+// Copyright 2011 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+// Plan 9 environment variables.
6
+
7
+package plan9
8
+
9
+import (
10
+	"syscall"
11
+)
12
+
13
+func Getenv(key string) (value string, found bool) {
14
+	return syscall.Getenv(key)
15
+}
16
+
17
+func Setenv(key, value string) error {
18
+	return syscall.Setenv(key, value)
19
+}
20
+
21
+func Clearenv() {
22
+	syscall.Clearenv()
23
+}
24
+
25
+func Environ() []string {
26
+	return syscall.Environ()
27
+}
28
+
29
+func Unsetenv(key string) error {
30
+	return syscall.Unsetenv(key)
31
+}

+ 50
- 0
vendor/golang.org/x/sys/plan9/errors_plan9.go View File

@@ -0,0 +1,50 @@
1
+// Copyright 2011 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+package plan9
6
+
7
+import "syscall"
8
+
9
+// Constants
10
+const (
11
+	// Invented values to support what package os expects.
12
+	O_CREAT    = 0x02000
13
+	O_APPEND   = 0x00400
14
+	O_NOCTTY   = 0x00000
15
+	O_NONBLOCK = 0x00000
16
+	O_SYNC     = 0x00000
17
+	O_ASYNC    = 0x00000
18
+
19
+	S_IFMT   = 0x1f000
20
+	S_IFIFO  = 0x1000
21
+	S_IFCHR  = 0x2000
22
+	S_IFDIR  = 0x4000
23
+	S_IFBLK  = 0x6000
24
+	S_IFREG  = 0x8000
25
+	S_IFLNK  = 0xa000
26
+	S_IFSOCK = 0xc000
27
+)
28
+
29
+// Errors
30
+var (
31
+	EINVAL       = syscall.NewError("bad arg in system call")
32
+	ENOTDIR      = syscall.NewError("not a directory")
33
+	EISDIR       = syscall.NewError("file is a directory")
34
+	ENOENT       = syscall.NewError("file does not exist")
35
+	EEXIST       = syscall.NewError("file already exists")
36
+	EMFILE       = syscall.NewError("no free file descriptors")
37
+	EIO          = syscall.NewError("i/o error")
38
+	ENAMETOOLONG = syscall.NewError("file name too long")
39
+	EINTR        = syscall.NewError("interrupted")
40
+	EPERM        = syscall.NewError("permission denied")
41
+	EBUSY        = syscall.NewError("no free devices")
42
+	ETIMEDOUT    = syscall.NewError("connection timed out")
43
+	EPLAN9       = syscall.NewError("not supported by plan 9")
44
+
45
+	// The following errors do not correspond to any
46
+	// Plan 9 system messages. Invented to support
47
+	// what package os and others expect.
48
+	EACCES       = syscall.NewError("access permission denied")
49
+	EAFNOSUPPORT = syscall.NewError("address family not supported by protocol")
50
+)

+ 150
- 0
vendor/golang.org/x/sys/plan9/mkall.sh View File

@@ -0,0 +1,150 @@
1
+#!/usr/bin/env bash
2
+# Copyright 2009 The Go Authors. All rights reserved.
3
+# Use of this source code is governed by a BSD-style
4
+# license that can be found in the LICENSE file.
5
+
6
+# The plan9 package provides access to the raw system call
7
+# interface of the underlying operating system.  Porting Go to
8
+# a new architecture/operating system combination requires
9
+# some manual effort, though there are tools that automate
10
+# much of the process.  The auto-generated files have names
11
+# beginning with z.
12
+#
13
+# This script runs or (given -n) prints suggested commands to generate z files
14
+# for the current system.  Running those commands is not automatic.
15
+# This script is documentation more than anything else.
16
+#
17
+# * asm_${GOOS}_${GOARCH}.s
18
+#
19
+# This hand-written assembly file implements system call dispatch.
20
+# There are three entry points:
21
+#
22
+# 	func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
23
+# 	func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
24
+# 	func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
25
+#
26
+# The first and second are the standard ones; they differ only in
27
+# how many arguments can be passed to the kernel.
28
+# The third is for low-level use by the ForkExec wrapper;
29
+# unlike the first two, it does not call into the scheduler to
30
+# let it know that a system call is running.
31
+#
32
+# * syscall_${GOOS}.go
33
+#
34
+# This hand-written Go file implements system calls that need
35
+# special handling and lists "//sys" comments giving prototypes
36
+# for ones that can be auto-generated.  Mksyscall reads those
37
+# comments to generate the stubs.
38
+#
39
+# * syscall_${GOOS}_${GOARCH}.go
40
+#
41
+# Same as syscall_${GOOS}.go except that it contains code specific
42
+# to ${GOOS} on one particular architecture.
43
+#
44
+# * types_${GOOS}.c
45
+#
46
+# This hand-written C file includes standard C headers and then
47
+# creates typedef or enum names beginning with a dollar sign
48
+# (use of $ in variable names is a gcc extension).  The hardest
49
+# part about preparing this file is figuring out which headers to
50
+# include and which symbols need to be #defined to get the
51
+# actual data structures that pass through to the kernel system calls.
52
+# Some C libraries present alternate versions for binary compatibility
53
+# and translate them on the way in and out of system calls, but
54
+# there is almost always a #define that can get the real ones.
55
+# See types_darwin.c and types_linux.c for examples.
56
+#
57
+# * zerror_${GOOS}_${GOARCH}.go
58
+#
59
+# This machine-generated file defines the system's error numbers,
60
+# error strings, and signal numbers.  The generator is "mkerrors.sh".
61
+# Usually no arguments are needed, but mkerrors.sh will pass its
62
+# arguments on to godefs.
63
+#
64
+# * zsyscall_${GOOS}_${GOARCH}.go
65
+#
66
+# Generated by mksyscall.pl; see syscall_${GOOS}.go above.
67
+#
68
+# * zsysnum_${GOOS}_${GOARCH}.go
69
+#
70
+# Generated by mksysnum_${GOOS}.
71
+#
72
+# * ztypes_${GOOS}_${GOARCH}.go
73
+#
74
+# Generated by godefs; see types_${GOOS}.c above.
75
+
76
+GOOSARCH="${GOOS}_${GOARCH}"
77
+
78
+# defaults
79
+mksyscall="go run mksyscall.go"
80
+mkerrors="./mkerrors.sh"
81
+zerrors="zerrors_$GOOSARCH.go"
82
+mksysctl=""
83
+zsysctl="zsysctl_$GOOSARCH.go"
84
+mksysnum=
85
+mktypes=
86
+run="sh"
87
+
88
+case "$1" in
89
+-syscalls)
90
+	for i in zsyscall*go
91
+	do
92
+		sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
93
+		rm _$i
94
+	done
95
+	exit 0
96
+	;;
97
+-n)
98
+	run="cat"
99
+	shift
100
+esac
101
+
102
+case "$#" in
103
+0)
104
+	;;
105
+*)
106
+	echo 'usage: mkall.sh [-n]' 1>&2
107
+	exit 2
108
+esac
109
+
110
+case "$GOOSARCH" in
111
+_* | *_ | _)
112
+	echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
113
+	exit 1
114
+	;;
115
+plan9_386)
116
+	mkerrors=
117
+	mksyscall="go run mksyscall.go -l32 -plan9 -tags plan9,386"
118
+	mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h"
119
+	mktypes="XXX"
120
+	;;
121
+plan9_amd64)
122
+	mkerrors=
123
+	mksyscall="go run mksyscall.go -l32 -plan9 -tags plan9,amd64"
124
+	mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h"
125
+	mktypes="XXX"
126
+	;;
127
+plan9_arm)
128
+	mkerrors=
129
+	mksyscall="go run mksyscall.go -l32 -plan9 -tags plan9,arm"
130
+	mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h"
131
+	mktypes="XXX"
132
+	;;
133
+*)
134
+	echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
135
+	exit 1
136
+	;;
137
+esac
138
+
139
+(
140
+	if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
141
+	case "$GOOS" in
142
+	plan9)
143
+		syscall_goos="syscall_$GOOS.go"
144
+		if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos |gofmt >zsyscall_$GOOSARCH.go"; fi
145
+		;;
146
+	esac
147
+	if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
148
+	if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
149
+	if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go |gofmt >ztypes_$GOOSARCH.go"; fi
150
+) | $run

+ 246
- 0
vendor/golang.org/x/sys/plan9/mkerrors.sh View File

@@ -0,0 +1,246 @@
1
+#!/usr/bin/env bash
2
+# Copyright 2009 The Go Authors. All rights reserved.
3
+# Use of this source code is governed by a BSD-style
4
+# license that can be found in the LICENSE file.
5
+
6
+# Generate Go code listing errors and other #defined constant
7
+# values (ENAMETOOLONG etc.), by asking the preprocessor
8
+# about the definitions.
9
+
10
+unset LANG
11
+export LC_ALL=C
12
+export LC_CTYPE=C
13
+
14
+CC=${CC:-gcc}
15
+
16
+uname=$(uname)
17
+
18
+includes='
19
+#include <sys/types.h>
20
+#include <sys/file.h>
21
+#include <fcntl.h>
22
+#include <dirent.h>
23
+#include <sys/socket.h>
24
+#include <netinet/in.h>
25
+#include <netinet/ip.h>
26
+#include <netinet/ip6.h>
27
+#include <netinet/tcp.h>
28
+#include <errno.h>
29
+#include <sys/signal.h>
30
+#include <signal.h>
31
+#include <sys/resource.h>
32
+'
33
+
34
+ccflags="$@"
35
+
36
+# Write go tool cgo -godefs input.
37
+(
38
+	echo package plan9
39
+	echo
40
+	echo '/*'
41
+	indirect="includes_$(uname)"
42
+	echo "${!indirect} $includes"
43
+	echo '*/'
44
+	echo 'import "C"'
45
+	echo
46
+	echo 'const ('
47
+
48
+	# The gcc command line prints all the #defines
49
+	# it encounters while processing the input
50
+	echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags |
51
+	awk '
52
+		$1 != "#define" || $2 ~ /\(/ || $3 == "" {next}
53
+
54
+		$2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next}  # 386 registers
55
+		$2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}
56
+		$2 ~ /^(SCM_SRCRT)$/ {next}
57
+		$2 ~ /^(MAP_FAILED)$/ {next}
58
+
59
+		$2 !~ /^ETH_/ &&
60
+		$2 !~ /^EPROC_/ &&
61
+		$2 !~ /^EQUIV_/ &&
62
+		$2 !~ /^EXPR_/ &&
63
+		$2 ~ /^E[A-Z0-9_]+$/ ||
64
+		$2 ~ /^B[0-9_]+$/ ||
65
+		$2 ~ /^V[A-Z0-9]+$/ ||
66
+		$2 ~ /^CS[A-Z0-9]/ ||
67
+		$2 ~ /^I(SIG|CANON|CRNL|EXTEN|MAXBEL|STRIP|UTF8)$/ ||
68
+		$2 ~ /^IGN/ ||
69
+		$2 ~ /^IX(ON|ANY|OFF)$/ ||
70
+		$2 ~ /^IN(LCR|PCK)$/ ||
71
+		$2 ~ /(^FLU?SH)|(FLU?SH$)/ ||
72
+		$2 ~ /^C(LOCAL|READ)$/ ||
73
+		$2 == "BRKINT" ||
74
+		$2 == "HUPCL" ||
75
+		$2 == "PENDIN" ||
76
+		$2 == "TOSTOP" ||
77
+		$2 ~ /^PAR/ ||
78
+		$2 ~ /^SIG[^_]/ ||
79
+		$2 ~ /^O[CNPFP][A-Z]+[^_][A-Z]+$/ ||
80
+		$2 ~ /^IN_/ ||
81
+		$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
82
+		$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
83
+		$2 == "ICMPV6_FILTER" ||
84
+		$2 == "SOMAXCONN" ||
85
+		$2 == "NAME_MAX" ||
86
+		$2 == "IFNAMSIZ" ||
87
+		$2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
88
+		$2 ~ /^SYSCTL_VERS/ ||
89
+		$2 ~ /^(MS|MNT)_/ ||
90
+		$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
91
+		$2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ ||
92
+		$2 ~ /^LINUX_REBOOT_CMD_/ ||
93
+		$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
94
+		$2 !~ "NLA_TYPE_MASK" &&
95
+		$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
96
+		$2 ~ /^SIOC/ ||
97
+		$2 ~ /^TIOC/ ||
98
+		$2 !~ "RTF_BITS" &&
99
+		$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
100
+		$2 ~ /^BIOC/ ||
101
+		$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
102
+		$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ ||
103
+		$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
104
+		$2 ~ /^CLONE_[A-Z_]+/ ||
105
+		$2 !~ /^(BPF_TIMEVAL)$/ &&
106
+		$2 ~ /^(BPF|DLT)_/ ||
107
+		$2 !~ "WMESGLEN" &&
108
+		$2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)}
109
+		$2 ~ /^__WCOREFLAG$/ {next}
110
+		$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
111
+
112
+		{next}
113
+	' | sort
114
+
115
+	echo ')'
116
+) >_const.go
117
+
118
+# Pull out the error names for later.
119
+errors=$(
120
+	echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
121
+	awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' |
122
+	sort
123
+)
124
+
125
+# Pull out the signal names for later.
126
+signals=$(
127
+	echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
128
+	awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
129
+	egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
130
+	sort
131
+)
132
+
133
+# Again, writing regexps to a file.
134
+echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
135
+	awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' |
136
+	sort >_error.grep
137
+echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
138
+	awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
139
+	egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
140
+	sort >_signal.grep
141
+
142
+echo '// mkerrors.sh' "$@"
143
+echo '// Code generated by the command above; DO NOT EDIT.'
144
+echo
145
+go tool cgo -godefs -- "$@" _const.go >_error.out
146
+cat _error.out | grep -vf _error.grep | grep -vf _signal.grep
147
+echo
148
+echo '// Errors'
149
+echo 'const ('
150
+cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= Errno(\1)/'
151
+echo ')'
152
+
153
+echo
154
+echo '// Signals'
155
+echo 'const ('
156
+cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= Signal(\1)/'
157
+echo ')'
158
+
159
+# Run C program to print error and syscall strings.
160
+(
161
+	echo -E "
162
+#include <stdio.h>
163
+#include <stdlib.h>
164
+#include <errno.h>
165
+#include <ctype.h>
166
+#include <string.h>
167
+#include <signal.h>
168
+
169
+#define nelem(x) (sizeof(x)/sizeof((x)[0]))
170
+
171
+enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below
172
+
173
+int errors[] = {
174
+"
175
+	for i in $errors
176
+	do
177
+		echo -E '	'$i,
178
+	done
179
+
180
+	echo -E "
181
+};
182
+
183
+int signals[] = {
184
+"
185
+	for i in $signals
186
+	do
187
+		echo -E '	'$i,
188
+	done
189
+
190
+	# Use -E because on some systems bash builtin interprets \n itself.
191
+	echo -E '
192
+};
193
+
194
+static int
195
+intcmp(const void *a, const void *b)
196
+{
197
+	return *(int*)a - *(int*)b;
198
+}
199
+
200
+int
201
+main(void)
202
+{
203
+	int i, j, e;
204
+	char buf[1024], *p;
205
+
206
+	printf("\n\n// Error table\n");
207
+	printf("var errors = [...]string {\n");
208
+	qsort(errors, nelem(errors), sizeof errors[0], intcmp);
209
+	for(i=0; i<nelem(errors); i++) {
210
+		e = errors[i];
211
+		if(i > 0 && errors[i-1] == e)
212
+			continue;
213
+		strcpy(buf, strerror(e));
214
+		// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
215
+		if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
216
+			buf[0] += a - A;
217
+		printf("\t%d: \"%s\",\n", e, buf);
218
+	}
219
+	printf("}\n\n");
220
+	
221
+	printf("\n\n// Signal table\n");
222
+	printf("var signals = [...]string {\n");
223
+	qsort(signals, nelem(signals), sizeof signals[0], intcmp);
224
+	for(i=0; i<nelem(signals); i++) {
225
+		e = signals[i];
226
+		if(i > 0 && signals[i-1] == e)
227
+			continue;
228
+		strcpy(buf, strsignal(e));
229
+		// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
230
+		if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
231
+			buf[0] += a - A;
232
+		// cut trailing : number.
233
+		p = strrchr(buf, ":"[0]);
234
+		if(p)
235
+			*p = '\0';
236
+		printf("\t%d: \"%s\",\n", e, buf);
237
+	}
238
+	printf("}\n\n");
239
+
240
+	return 0;
241
+}
242
+
243
+'
244
+) >_errors.c
245
+
246
+$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out

+ 23
- 0
vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh View File

@@ -0,0 +1,23 @@
1
+#!/bin/sh
2
+# Copyright 2009 The Go Authors. All rights reserved.
3
+# Use of this source code is governed by a BSD-style
4
+# license that can be found in the LICENSE file.
5
+
6
+COMMAND="mksysnum_plan9.sh $@"
7
+
8
+cat <<EOF
9
+// $COMMAND
10
+// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
11
+
12
+package plan9
13
+
14
+const(
15
+EOF
16
+
17
+SP='[ 	]' # space or tab
18
+sed "s/^#define${SP}\\([A-Z0-9_][A-Z0-9_]*\\)${SP}${SP}*\\([0-9][0-9]*\\)/SYS_\\1=\\2/g" \
19
+	< $1 | grep -v SYS__
20
+
21
+cat <<EOF
22
+)
23
+EOF

+ 21
- 0
vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go View File

@@ -0,0 +1,21 @@
1
+// Copyright 2015 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+// +build go1.5
6
+
7
+package plan9
8
+
9
+import "syscall"
10
+
11
+func fixwd() {
12
+	syscall.Fixwd()
13
+}
14
+
15
+func Getwd() (wd string, err error) {
16
+	return syscall.Getwd()
17
+}
18
+
19
+func Chdir(path string) error {
20
+	return syscall.Chdir(path)
21
+}

+ 23
- 0
vendor/golang.org/x/sys/plan9/pwd_plan9.go View File

@@ -0,0 +1,23 @@
1
+// Copyright 2015 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+// +build !go1.5
6
+
7
+package plan9
8
+
9
+func fixwd() {
10
+}
11
+
12
+func Getwd() (wd string, err error) {
13
+	fd, err := open(".", O_RDONLY)
14
+	if err != nil {
15
+		return "", err
16
+	}
17
+	defer Close(fd)
18
+	return Fd2path(fd)
19
+}
20
+
21
+func Chdir(path string) error {
22
+	return chdir(path)
23
+}

+ 30
- 0
vendor/golang.org/x/sys/plan9/race.go View File

@@ -0,0 +1,30 @@
1
+// Copyright 2012 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+// +build plan9,race
6
+
7
+package plan9
8
+
9
+import (
10
+	"runtime"
11
+	"unsafe"
12
+)
13
+
14
+const raceenabled = true
15
+
16
+func raceAcquire(addr unsafe.Pointer) {
17
+	runtime.RaceAcquire(addr)
18
+}
19
+
20
+func raceReleaseMerge(addr unsafe.Pointer) {
21
+	runtime.RaceReleaseMerge(addr)
22
+}
23
+
24
+func raceReadRange(addr unsafe.Pointer, len int) {
25
+	runtime.RaceReadRange(addr, len)
26
+}
27
+
28
+func raceWriteRange(addr unsafe.Pointer, len int) {
29
+	runtime.RaceWriteRange(addr, len)
30
+}

+ 25
- 0
vendor/golang.org/x/sys/plan9/race0.go View File

@@ -0,0 +1,25 @@
1
+// Copyright 2012 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+// +build plan9,!race
6
+
7
+package plan9
8
+
9
+import (
10
+	"unsafe"
11
+)
12
+
13
+const raceenabled = false
14
+
15
+func raceAcquire(addr unsafe.Pointer) {
16
+}
17
+
18
+func raceReleaseMerge(addr unsafe.Pointer) {
19
+}
20
+
21
+func raceReadRange(addr unsafe.Pointer, len int) {
22
+}
23
+
24
+func raceWriteRange(addr unsafe.Pointer, len int) {
25
+}

+ 22
- 0
vendor/golang.org/x/sys/plan9/str.go View File

@@ -0,0 +1,22 @@
1
+// Copyright 2009 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+// +build plan9
6
+
7
+package plan9
8
+
9
+func itoa(val int) string { // do it here rather than with fmt to avoid dependency
10
+	if val < 0 {
11
+		return "-" + itoa(-val)
12
+	}
13
+	var buf [32]byte // big enough for int64
14
+	i := len(buf) - 1
15
+	for val >= 10 {
16
+		buf[i] = byte(val%10 + '0')
17
+		i--
18
+		val /= 10
19
+	}
20
+	buf[i] = byte(val + '0')
21
+	return string(buf[i:])
22
+}

+ 116
- 0
vendor/golang.org/x/sys/plan9/syscall.go View File

@@ -0,0 +1,116 @@
1
+// Copyright 2009 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+// +build plan9
6
+
7
+// Package plan9 contains an interface to the low-level operating system
8
+// primitives. OS details vary depending on the underlying system, and
9
+// by default, godoc will display the OS-specific documentation for the current
10
+// system. If you want godoc to display documentation for another
11
+// system, set $GOOS and $GOARCH to the desired system. For example, if
12
+// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
13
+// to freebsd and $GOARCH to arm.
14
+//
15
+// The primary use of this package is inside other packages that provide a more
16
+// portable interface to the system, such as "os", "time" and "net".  Use
17
+// those packages rather than this one if you can.
18
+//
19
+// For details of the functions and data types in this package consult
20
+// the manuals for the appropriate operating system.
21
+//
22
+// These calls return err == nil to indicate success; otherwise
23
+// err represents an operating system error describing the failure and
24
+// holds a value of type syscall.ErrorString.
25
+package plan9 // import "golang.org/x/sys/plan9"
26
+
27
+import (
28
+	"bytes"
29
+	"strings"
30
+	"unsafe"
31
+
32
+	"golang.org/x/sys/internal/unsafeheader"
33
+)
34
+
35
+// ByteSliceFromString returns a NUL-terminated slice of bytes
36
+// containing the text of s. If s contains a NUL byte at any
37
+// location, it returns (nil, EINVAL).
38
+func ByteSliceFromString(s string) ([]byte, error) {
39
+	if strings.IndexByte(s, 0) != -1 {
40
+		return nil, EINVAL
41
+	}
42
+	a := make([]byte, len(s)+1)
43
+	copy(a, s)
44
+	return a, nil
45
+}
46
+
47
+// BytePtrFromString returns a pointer to a NUL-terminated array of
48
+// bytes containing the text of s. If s contains a NUL byte at any
49
+// location, it returns (nil, EINVAL).
50
+func BytePtrFromString(s string) (*byte, error) {
51
+	a, err := ByteSliceFromString(s)
52
+	if err != nil {
53
+		return nil, err
54
+	}
55
+	return &a[0], nil
56
+}
57
+
58
+// ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any
59
+// bytes after the NUL removed.
60
+func ByteSliceToString(s []byte) string {
61
+	if i := bytes.IndexByte(s, 0); i != -1 {
62
+		s = s[:i]
63
+	}
64
+	return string(s)
65
+}
66
+
67
+// BytePtrToString takes a pointer to a sequence of text and returns the corresponding string.
68
+// If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated
69
+// at a zero byte; if the zero byte is not present, the program may crash.
70
+func BytePtrToString(p *byte) string {
71
+	if p == nil {
72
+		return ""
73
+	}
74
+	if *p == 0 {
75
+		return ""
76
+	}
77
+
78
+	// Find NUL terminator.
79
+	n := 0
80
+	for ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ {
81
+		ptr = unsafe.Pointer(uintptr(ptr) + 1)
82
+	}
83
+
84
+	var s []byte
85
+	h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
86
+	h.Data = unsafe.Pointer(p)
87
+	h.Len = n
88
+	h.Cap = n
89
+
90
+	return string(s)
91
+}
92
+
93
+// Single-word zero for use when we need a valid pointer to 0 bytes.
94
+// See mksyscall.pl.
95
+var _zero uintptr
96
+
97
+func (ts *Timespec) Unix() (sec int64, nsec int64) {
98
+	return int64(ts.Sec), int64(ts.Nsec)
99
+}
100
+
101
+func (tv *Timeval) Unix() (sec int64, nsec int64) {
102
+	return int64(tv.Sec), int64(tv.Usec) * 1000
103
+}
104
+
105
+func (ts *Timespec) Nano() int64 {
106
+	return int64(ts.Sec)*1e9 + int64(ts.Nsec)
107
+}
108
+
109
+func (tv *Timeval) Nano() int64 {
110
+	return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
111
+}
112
+
113
+// use is a no-op, but the compiler cannot see that it is.
114
+// Calling use(p) ensures that p is kept live until that point.
115
+//go:noescape
116
+func use(p unsafe.Pointer)

+ 349
- 0
vendor/golang.org/x/sys/plan9/syscall_plan9.go View File

@@ -0,0 +1,349 @@
1
+// Copyright 2011 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+// Plan 9 system calls.
6
+// This file is compiled as ordinary Go code,
7
+// but it is also input to mksyscall,
8
+// which parses the //sys lines and generates system call stubs.
9
+// Note that sometimes we use a lowercase //sys name and
10
+// wrap it in our own nicer implementation.
11
+
12
+package plan9
13
+
14
+import (
15
+	"bytes"
16
+	"syscall"
17
+	"unsafe"
18
+)
19
+
20
+// A Note is a string describing a process note.
21
+// It implements the os.Signal interface.
22
+type Note string
23
+
24
+func (n Note) Signal() {}
25
+
26
+func (n Note) String() string {
27
+	return string(n)
28
+}
29
+
30
+var (
31
+	Stdin  = 0
32
+	Stdout = 1
33
+	Stderr = 2
34
+)
35
+
36
+// For testing: clients can set this flag to force
37
+// creation of IPv6 sockets to return EAFNOSUPPORT.
38
+var SocketDisableIPv6 bool
39
+
40
+func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.ErrorString)
41
+func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.ErrorString)
42
+func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
43
+func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
44
+
45
+func atoi(b []byte) (n uint) {
46
+	n = 0
47
+	for i := 0; i < len(b); i++ {
48
+		n = n*10 + uint(b[i]-'0')
49
+	}
50
+	return
51
+}
52
+
53
+func cstring(s []byte) string {
54
+	i := bytes.IndexByte(s, 0)
55
+	if i == -1 {
56
+		i = len(s)
57
+	}
58
+	return string(s[:i])
59
+}
60
+
61
+func errstr() string {
62
+	var buf [ERRMAX]byte
63
+
64
+	RawSyscall(SYS_ERRSTR, uintptr(unsafe.Pointer(&buf[0])), uintptr(len(buf)), 0)
65
+
66
+	buf[len(buf)-1] = 0
67
+	return cstring(buf[:])
68
+}
69
+
70
+// Implemented in assembly to import from runtime.
71
+func exit(code int)
72
+
73
+func Exit(code int) { exit(code) }
74
+
75
+func readnum(path string) (uint, error) {
76
+	var b [12]byte
77
+
78
+	fd, e := Open(path, O_RDONLY)
79
+	if e != nil {
80
+		return 0, e
81
+	}
82
+	defer Close(fd)
83
+
84
+	n, e := Pread(fd, b[:], 0)
85
+
86
+	if e != nil {
87
+		return 0, e
88
+	}
89
+
90
+	m := 0
91
+	for ; m < n && b[m] == ' '; m++ {
92
+	}
93
+
94
+	return atoi(b[m : n-1]), nil
95
+}
96
+
97
+func Getpid() (pid int) {
98
+	n, _ := readnum("#c/pid")
99
+	return int(n)
100
+}
101
+
102
+func Getppid() (ppid int) {
103
+	n, _ := readnum("#c/ppid")
104
+	return int(n)
105
+}
106
+
107
+func Read(fd int, p []byte) (n int, err error) {
108
+	return Pread(fd, p, -1)
109
+}
110
+
111
+func Write(fd int, p []byte) (n int, err error) {
112
+	return Pwrite(fd, p, -1)
113
+}
114
+
115
+var ioSync int64
116
+
117
+//sys	fd2path(fd int, buf []byte) (err error)
118
+func Fd2path(fd int) (path string, err error) {
119
+	var buf [512]byte
120
+
121
+	e := fd2path(fd, buf[:])
122
+	if e != nil {
123
+		return "", e
124
+	}
125
+	return cstring(buf[:]), nil
126
+}
127
+
128
+//sys	pipe(p *[2]int32) (err error)
129
+func Pipe(p []int) (err error) {
130
+	if len(p) != 2 {
131
+		return syscall.ErrorString("bad arg in system call")
132
+	}
133
+	var pp [2]int32
134
+	err = pipe(&pp)
135
+	p[0] = int(pp[0])
136
+	p[1] = int(pp[1])
137
+	return
138
+}
139
+
140
+// Underlying system call writes to newoffset via pointer.
141
+// Implemented in assembly to avoid allocation.
142
+func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string)
143
+
144
+func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
145
+	newoffset, e := seek(0, fd, offset, whence)
146
+
147
+	if newoffset == -1 {
148
+		err = syscall.ErrorString(e)
149
+	}
150
+	return
151
+}
152
+
153
+func Mkdir(path string, mode uint32) (err error) {
154
+	fd, err := Create(path, O_RDONLY, DMDIR|mode)
155
+
156
+	if fd != -1 {
157
+		Close(fd)
158
+	}
159
+
160
+	return
161
+}
162
+
163
+type Waitmsg struct {
164
+	Pid  int
165
+	Time [3]uint32
166
+	Msg  string
167
+}
168
+
169
+func (w Waitmsg) Exited() bool   { return true }
170
+func (w Waitmsg) Signaled() bool { return false }
171
+
172
+func (w Waitmsg) ExitStatus() int {
173
+	if len(w.Msg) == 0 {
174
+		// a normal exit returns no message
175
+		return 0
176
+	}
177
+	return 1
178
+}
179
+
180
+//sys	await(s []byte) (n int, err error)
181
+func Await(w *Waitmsg) (err error) {
182
+	var buf [512]byte
183
+	var f [5][]byte
184
+
185
+	n, err := await(buf[:])
186
+
187
+	if err != nil || w == nil {
188
+		return
189
+	}
190
+
191
+	nf := 0
192
+	p := 0
193
+	for i := 0; i < n && nf < len(f)-1; i++ {
194
+		if buf[i] == ' ' {
195
+			f[nf] = buf[p:i]
196
+			p = i + 1
197
+			nf++
198
+		}
199
+	}
200
+	f[nf] = buf[p:]
201
+	nf++
202
+
203
+	if nf != len(f) {
204
+		return syscall.ErrorString("invalid wait message")
205
+	}
206
+	w.Pid = int(atoi(f[0]))
207
+	w.Time[0] = uint32(atoi(f[1]))
208
+	w.Time[1] = uint32(atoi(f[2]))
209
+	w.Time[2] = uint32(atoi(f[3]))
210
+	w.Msg = cstring(f[4])
211
+	if w.Msg == "''" {
212
+		// await() returns '' for no error
213
+		w.Msg = ""
214
+	}
215
+	return
216
+}
217
+
218
+func Unmount(name, old string) (err error) {
219
+	fixwd()
220
+	oldp, err := BytePtrFromString(old)
221
+	if err != nil {
222
+		return err
223
+	}
224
+	oldptr := uintptr(unsafe.Pointer(oldp))
225
+
226
+	var r0 uintptr
227
+	var e syscall.ErrorString
228
+
229
+	// bind(2) man page: If name is zero, everything bound or mounted upon old is unbound or unmounted.
230
+	if name == "" {
231
+		r0, _, e = Syscall(SYS_UNMOUNT, _zero, oldptr, 0)
232
+	} else {
233
+		namep, err := BytePtrFromString(name)
234
+		if err != nil {
235
+			return err
236
+		}
237
+		r0, _, e = Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(namep)), oldptr, 0)
238
+	}
239
+
240
+	if int32(r0) == -1 {
241
+		err = e
242
+	}
243
+	return
244
+}
245
+
246
+func Fchdir(fd int) (err error) {
247
+	path, err := Fd2path(fd)
248
+
249
+	if err != nil {
250
+		return
251
+	}
252
+
253
+	return Chdir(path)
254
+}
255
+
256
+type Timespec struct {
257
+	Sec  int32
258
+	Nsec int32
259
+}
260
+
261
+type Timeval struct {
262
+	Sec  int32
263
+	Usec int32
264
+}
265
+
266
+func NsecToTimeval(nsec int64) (tv Timeval) {
267
+	nsec += 999 // round up to microsecond
268
+	tv.Usec = int32(nsec % 1e9 / 1e3)
269
+	tv.Sec = int32(nsec / 1e9)
270
+	return
271
+}
272
+
273
+func nsec() int64 {
274
+	var scratch int64
275
+
276
+	r0, _, _ := Syscall(SYS_NSEC, uintptr(unsafe.Pointer(&scratch)), 0, 0)
277
+	// TODO(aram): remove hack after I fix _nsec in the pc64 kernel.
278
+	if r0 == 0 {
279
+		return scratch
280
+	}
281
+	return int64(r0)
282
+}
283
+
284
+func Gettimeofday(tv *Timeval) error {
285
+	nsec := nsec()
286
+	*tv = NsecToTimeval(nsec)
287
+	return nil
288
+}
289
+
290
+func Getpagesize() int { return 0x1000 }
291
+
292
+func Getegid() (egid int) { return -1 }
293
+func Geteuid() (euid int) { return -1 }
294
+func Getgid() (gid int)   { return -1 }
295
+func Getuid() (uid int)   { return -1 }
296
+
297
+func Getgroups() (gids []int, err error) {
298
+	return make([]int, 0), nil
299
+}
300
+
301
+//sys	open(path string, mode int) (fd int, err error)
302
+func Open(path string, mode int) (fd int, err error) {
303
+	fixwd()
304
+	return open(path, mode)
305
+}
306
+
307
+//sys	create(path string, mode int, perm uint32) (fd int, err error)
308
+func Create(path string, mode int, perm uint32) (fd int, err error) {
309
+	fixwd()
310
+	return create(path, mode, perm)
311
+}
312
+
313
+//sys	remove(path string) (err error)
314
+func Remove(path string) error {
315
+	fixwd()
316
+	return remove(path)
317
+}
318
+
319
+//sys	stat(path string, edir []byte) (n int, err error)
320
+func Stat(path string, edir []byte) (n int, err error) {
321
+	fixwd()
322
+	return stat(path, edir)
323
+}
324
+
325
+//sys	bind(name string, old string, flag int) (err error)
326
+func Bind(name string, old string, flag int) (err error) {
327
+	fixwd()
328
+	return bind(name, old, flag)
329
+}
330
+
331
+//sys	mount(fd int, afd int, old string, flag int, aname string) (err error)
332
+func Mount(fd int, afd int, old string, flag int, aname string) (err error) {
333
+	fixwd()
334
+	return mount(fd, afd, old, flag, aname)
335
+}
336
+
337
+//sys	wstat(path string, edir []byte) (err error)
338
+func Wstat(path string, edir []byte) (err error) {
339
+	fixwd()
340
+	return wstat(path, edir)
341
+}
342
+
343
+//sys	chdir(path string) (err error)
344
+//sys	Dup(oldfd int, newfd int) (fd int, err error)
345
+//sys	Pread(fd int, p []byte, offset int64) (n int, err error)
346
+//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error)
347
+//sys	Close(fd int) (err error)
348
+//sys	Fstat(fd int, edir []byte) (n int, err error)
349
+//sys	Fwstat(fd int, edir []byte) (err error)

+ 284
- 0
vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go View File

@@ -0,0 +1,284 @@
1
+// go run mksyscall.go -l32 -plan9 -tags plan9,386 syscall_plan9.go
2
+// Code generated by the command above; see README.md. DO NOT EDIT.
3
+
4
+// +build plan9,386
5
+
6
+package plan9
7
+
8
+import "unsafe"
9
+
10
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11
+
12
+func fd2path(fd int, buf []byte) (err error) {
13
+	var _p0 unsafe.Pointer
14
+	if len(buf) > 0 {
15
+		_p0 = unsafe.Pointer(&buf[0])
16
+	} else {
17
+		_p0 = unsafe.Pointer(&_zero)
18
+	}
19
+	r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
20
+	if int32(r0) == -1 {
21
+		err = e1
22
+	}
23
+	return
24
+}
25
+
26
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
27
+
28
+func pipe(p *[2]int32) (err error) {
29
+	r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
30
+	if int32(r0) == -1 {
31
+		err = e1
32
+	}
33
+	return
34
+}
35
+
36
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
37
+
38
+func await(s []byte) (n int, err error) {
39
+	var _p0 unsafe.Pointer
40
+	if len(s) > 0 {
41
+		_p0 = unsafe.Pointer(&s[0])
42
+	} else {
43
+		_p0 = unsafe.Pointer(&_zero)
44
+	}
45
+	r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)
46
+	n = int(r0)
47
+	if int32(r0) == -1 {
48
+		err = e1
49
+	}
50
+	return
51
+}
52
+
53
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
54
+
55
+func open(path string, mode int) (fd int, err error) {
56
+	var _p0 *byte
57
+	_p0, err = BytePtrFromString(path)
58
+	if err != nil {
59
+		return
60
+	}
61
+	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
62
+	fd = int(r0)
63
+	if int32(r0) == -1 {
64
+		err = e1
65
+	}
66
+	return
67
+}
68
+
69
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
70
+
71
+func create(path string, mode int, perm uint32) (fd int, err error) {
72
+	var _p0 *byte
73
+	_p0, err = BytePtrFromString(path)
74
+	if err != nil {
75
+		return
76
+	}
77
+	r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
78
+	fd = int(r0)
79
+	if int32(r0) == -1 {
80
+		err = e1
81
+	}
82
+	return
83
+}
84
+
85
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
86
+
87
+func remove(path string) (err error) {
88
+	var _p0 *byte
89
+	_p0, err = BytePtrFromString(path)
90
+	if err != nil {
91
+		return
92
+	}
93
+	r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)
94
+	if int32(r0) == -1 {
95
+		err = e1
96
+	}
97
+	return
98
+}
99
+
100
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
101
+
102
+func stat(path string, edir []byte) (n int, err error) {
103
+	var _p0 *byte
104
+	_p0, err = BytePtrFromString(path)
105
+	if err != nil {
106
+		return
107
+	}
108
+	var _p1 unsafe.Pointer
109
+	if len(edir) > 0 {
110
+		_p1 = unsafe.Pointer(&edir[0])
111
+	} else {
112
+		_p1 = unsafe.Pointer(&_zero)
113
+	}
114
+	r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
115
+	n = int(r0)
116
+	if int32(r0) == -1 {
117
+		err = e1
118
+	}
119
+	return
120
+}
121
+
122
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
123
+
124
+func bind(name string, old string, flag int) (err error) {
125
+	var _p0 *byte
126
+	_p0, err = BytePtrFromString(name)
127
+	if err != nil {
128
+		return
129
+	}
130
+	var _p1 *byte
131
+	_p1, err = BytePtrFromString(old)
132
+	if err != nil {
133
+		return
134
+	}
135
+	r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
136
+	if int32(r0) == -1 {
137
+		err = e1
138
+	}
139
+	return
140
+}
141
+
142
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
143
+
144
+func mount(fd int, afd int, old string, flag int, aname string) (err error) {
145
+	var _p0 *byte
146
+	_p0, err = BytePtrFromString(old)
147
+	if err != nil {
148
+		return
149
+	}
150
+	var _p1 *byte
151
+	_p1, err = BytePtrFromString(aname)
152
+	if err != nil {
153
+		return
154
+	}
155
+	r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)
156
+	if int32(r0) == -1 {
157
+		err = e1
158
+	}
159
+	return
160
+}
161
+
162
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
163
+
164
+func wstat(path string, edir []byte) (err error) {
165
+	var _p0 *byte
166
+	_p0, err = BytePtrFromString(path)
167
+	if err != nil {
168
+		return
169
+	}
170
+	var _p1 unsafe.Pointer
171
+	if len(edir) > 0 {
172
+		_p1 = unsafe.Pointer(&edir[0])
173
+	} else {
174
+		_p1 = unsafe.Pointer(&_zero)
175
+	}
176
+	r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
177
+	if int32(r0) == -1 {
178
+		err = e1
179
+	}
180
+	return
181
+}
182
+
183
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
184
+
185
+func chdir(path string) (err error) {
186
+	var _p0 *byte
187
+	_p0, err = BytePtrFromString(path)
188
+	if err != nil {
189
+		return
190
+	}
191
+	r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
192
+	if int32(r0) == -1 {
193
+		err = e1
194
+	}
195
+	return
196
+}
197
+
198
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
199
+
200
+func Dup(oldfd int, newfd int) (fd int, err error) {
201
+	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)
202
+	fd = int(r0)
203
+	if int32(r0) == -1 {
204
+		err = e1
205
+	}
206
+	return
207
+}
208
+
209
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
210
+
211
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
212
+	var _p0 unsafe.Pointer
213
+	if len(p) > 0 {
214
+		_p0 = unsafe.Pointer(&p[0])
215
+	} else {
216
+		_p0 = unsafe.Pointer(&_zero)
217
+	}
218
+	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
219
+	n = int(r0)
220
+	if int32(r0) == -1 {
221
+		err = e1
222
+	}
223
+	return
224
+}
225
+
226
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
227
+
228
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
229
+	var _p0 unsafe.Pointer
230
+	if len(p) > 0 {
231
+		_p0 = unsafe.Pointer(&p[0])
232
+	} else {
233
+		_p0 = unsafe.Pointer(&_zero)
234
+	}
235
+	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
236
+	n = int(r0)
237
+	if int32(r0) == -1 {
238
+		err = e1
239
+	}
240
+	return
241
+}
242
+
243
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
244
+
245
+func Close(fd int) (err error) {
246
+	r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
247
+	if int32(r0) == -1 {
248
+		err = e1
249
+	}
250
+	return
251
+}
252
+
253
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
254
+
255
+func Fstat(fd int, edir []byte) (n int, err error) {
256
+	var _p0 unsafe.Pointer
257
+	if len(edir) > 0 {
258
+		_p0 = unsafe.Pointer(&edir[0])
259
+	} else {
260
+		_p0 = unsafe.Pointer(&_zero)
261
+	}
262
+	r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
263
+	n = int(r0)
264
+	if int32(r0) == -1 {
265
+		err = e1
266
+	}
267
+	return
268
+}
269
+
270
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
271
+
272
+func Fwstat(fd int, edir []byte) (err error) {
273
+	var _p0 unsafe.Pointer
274
+	if len(edir) > 0 {
275
+		_p0 = unsafe.Pointer(&edir[0])
276
+	} else {
277
+		_p0 = unsafe.Pointer(&_zero)
278
+	}
279
+	r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
280
+	if int32(r0) == -1 {
281
+		err = e1
282
+	}
283
+	return
284
+}

+ 284
- 0
vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go View File

@@ -0,0 +1,284 @@
1
+// go run mksyscall.go -l32 -plan9 -tags plan9,amd64 syscall_plan9.go
2
+// Code generated by the command above; see README.md. DO NOT EDIT.
3
+
4
+// +build plan9,amd64
5
+
6
+package plan9
7
+
8
+import "unsafe"
9
+
10
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11
+
12
+func fd2path(fd int, buf []byte) (err error) {
13
+	var _p0 unsafe.Pointer
14
+	if len(buf) > 0 {
15
+		_p0 = unsafe.Pointer(&buf[0])
16
+	} else {
17
+		_p0 = unsafe.Pointer(&_zero)
18
+	}
19
+	r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
20
+	if int32(r0) == -1 {
21
+		err = e1
22
+	}
23
+	return
24
+}
25
+
26
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
27
+
28
+func pipe(p *[2]int32) (err error) {
29
+	r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
30
+	if int32(r0) == -1 {
31
+		err = e1
32
+	}
33
+	return
34
+}
35
+
36
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
37
+
38
+func await(s []byte) (n int, err error) {
39
+	var _p0 unsafe.Pointer
40
+	if len(s) > 0 {
41
+		_p0 = unsafe.Pointer(&s[0])
42
+	} else {
43
+		_p0 = unsafe.Pointer(&_zero)
44
+	}
45
+	r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)
46
+	n = int(r0)
47
+	if int32(r0) == -1 {
48
+		err = e1
49
+	}
50
+	return
51
+}
52
+
53
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
54
+
55
+func open(path string, mode int) (fd int, err error) {
56
+	var _p0 *byte
57
+	_p0, err = BytePtrFromString(path)
58
+	if err != nil {
59
+		return
60
+	}
61
+	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
62
+	fd = int(r0)
63
+	if int32(r0) == -1 {
64
+		err = e1
65
+	}
66
+	return
67
+}
68
+
69
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
70
+
71
+func create(path string, mode int, perm uint32) (fd int, err error) {
72
+	var _p0 *byte
73
+	_p0, err = BytePtrFromString(path)
74
+	if err != nil {
75
+		return
76
+	}
77
+	r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
78
+	fd = int(r0)
79
+	if int32(r0) == -1 {
80
+		err = e1
81
+	}
82
+	return
83
+}
84
+
85
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
86
+
87
+func remove(path string) (err error) {
88
+	var _p0 *byte
89
+	_p0, err = BytePtrFromString(path)
90
+	if err != nil {
91
+		return
92
+	}
93
+	r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)
94
+	if int32(r0) == -1 {
95
+		err = e1
96
+	}
97
+	return
98
+}
99
+
100
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
101
+
102
+func stat(path string, edir []byte) (n int, err error) {
103
+	var _p0 *byte
104
+	_p0, err = BytePtrFromString(path)
105
+	if err != nil {
106
+		return
107
+	}
108
+	var _p1 unsafe.Pointer
109
+	if len(edir) > 0 {
110
+		_p1 = unsafe.Pointer(&edir[0])
111
+	} else {
112
+		_p1 = unsafe.Pointer(&_zero)
113
+	}
114
+	r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
115
+	n = int(r0)
116
+	if int32(r0) == -1 {
117
+		err = e1
118
+	}
119
+	return
120
+}
121
+
122
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
123
+
124
+func bind(name string, old string, flag int) (err error) {
125
+	var _p0 *byte
126
+	_p0, err = BytePtrFromString(name)
127
+	if err != nil {
128
+		return
129
+	}
130
+	var _p1 *byte
131
+	_p1, err = BytePtrFromString(old)
132
+	if err != nil {
133
+		return
134
+	}
135
+	r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
136
+	if int32(r0) == -1 {
137
+		err = e1
138
+	}
139
+	return
140
+}
141
+
142
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
143
+
144
+func mount(fd int, afd int, old string, flag int, aname string) (err error) {
145
+	var _p0 *byte
146
+	_p0, err = BytePtrFromString(old)
147
+	if err != nil {
148
+		return
149
+	}
150
+	var _p1 *byte
151
+	_p1, err = BytePtrFromString(aname)
152
+	if err != nil {
153
+		return
154
+	}
155
+	r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)
156
+	if int32(r0) == -1 {
157
+		err = e1
158
+	}
159
+	return
160
+}
161
+
162
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
163
+
164
+func wstat(path string, edir []byte) (err error) {
165
+	var _p0 *byte
166
+	_p0, err = BytePtrFromString(path)
167
+	if err != nil {
168
+		return
169
+	}
170
+	var _p1 unsafe.Pointer
171
+	if len(edir) > 0 {
172
+		_p1 = unsafe.Pointer(&edir[0])
173
+	} else {
174
+		_p1 = unsafe.Pointer(&_zero)
175
+	}
176
+	r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
177
+	if int32(r0) == -1 {
178
+		err = e1
179
+	}
180
+	return
181
+}
182
+
183
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
184
+
185
+func chdir(path string) (err error) {
186
+	var _p0 *byte
187
+	_p0, err = BytePtrFromString(path)
188
+	if err != nil {
189
+		return
190
+	}
191
+	r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
192
+	if int32(r0) == -1 {
193
+		err = e1
194
+	}
195
+	return
196
+}
197
+
198
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
199
+
200
+func Dup(oldfd int, newfd int) (fd int, err error) {
201
+	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)
202
+	fd = int(r0)
203
+	if int32(r0) == -1 {
204
+		err = e1
205
+	}
206
+	return
207
+}
208
+
209
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
210
+
211
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
212
+	var _p0 unsafe.Pointer
213
+	if len(p) > 0 {
214
+		_p0 = unsafe.Pointer(&p[0])
215
+	} else {
216
+		_p0 = unsafe.Pointer(&_zero)
217
+	}
218
+	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
219
+	n = int(r0)
220
+	if int32(r0) == -1 {
221
+		err = e1
222
+	}
223
+	return
224
+}
225
+
226
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
227
+
228
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
229
+	var _p0 unsafe.Pointer
230
+	if len(p) > 0 {
231
+		_p0 = unsafe.Pointer(&p[0])
232
+	} else {
233
+		_p0 = unsafe.Pointer(&_zero)
234
+	}
235
+	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
236
+	n = int(r0)
237
+	if int32(r0) == -1 {
238
+		err = e1
239
+	}
240
+	return
241
+}
242
+
243
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
244
+
245
+func Close(fd int) (err error) {
246
+	r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
247
+	if int32(r0) == -1 {
248
+		err = e1
249
+	}
250
+	return
251
+}
252
+
253
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
254
+
255
+func Fstat(fd int, edir []byte) (n int, err error) {
256
+	var _p0 unsafe.Pointer
257
+	if len(edir) > 0 {
258
+		_p0 = unsafe.Pointer(&edir[0])
259
+	} else {
260
+		_p0 = unsafe.Pointer(&_zero)
261
+	}
262
+	r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
263
+	n = int(r0)
264
+	if int32(r0) == -1 {
265
+		err = e1
266
+	}
267
+	return
268
+}
269
+
270
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
271
+
272
+func Fwstat(fd int, edir []byte) (err error) {
273
+	var _p0 unsafe.Pointer
274
+	if len(edir) > 0 {
275
+		_p0 = unsafe.Pointer(&edir[0])
276
+	} else {
277
+		_p0 = unsafe.Pointer(&_zero)
278
+	}
279
+	r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
280
+	if int32(r0) == -1 {
281
+		err = e1
282
+	}
283
+	return
284
+}

+ 284
- 0
vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go View File

@@ -0,0 +1,284 @@
1
+// go run mksyscall.go -l32 -plan9 -tags plan9,arm syscall_plan9.go
2
+// Code generated by the command above; see README.md. DO NOT EDIT.
3
+
4
+// +build plan9,arm
5
+
6
+package plan9
7
+
8
+import "unsafe"
9
+
10
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
11
+
12
+func fd2path(fd int, buf []byte) (err error) {
13
+	var _p0 unsafe.Pointer
14
+	if len(buf) > 0 {
15
+		_p0 = unsafe.Pointer(&buf[0])
16
+	} else {
17
+		_p0 = unsafe.Pointer(&_zero)
18
+	}
19
+	r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
20
+	if int32(r0) == -1 {
21
+		err = e1
22
+	}
23
+	return
24
+}
25
+
26
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
27
+
28
+func pipe(p *[2]int32) (err error) {
29
+	r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
30
+	if int32(r0) == -1 {
31
+		err = e1
32
+	}
33
+	return
34
+}
35
+
36
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
37
+
38
+func await(s []byte) (n int, err error) {
39
+	var _p0 unsafe.Pointer
40
+	if len(s) > 0 {
41
+		_p0 = unsafe.Pointer(&s[0])
42
+	} else {
43
+		_p0 = unsafe.Pointer(&_zero)
44
+	}
45
+	r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0)
46
+	n = int(r0)
47
+	if int32(r0) == -1 {
48
+		err = e1
49
+	}
50
+	return
51
+}
52
+
53
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
54
+
55
+func open(path string, mode int) (fd int, err error) {
56
+	var _p0 *byte
57
+	_p0, err = BytePtrFromString(path)
58
+	if err != nil {
59
+		return
60
+	}
61
+	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
62
+	fd = int(r0)
63
+	if int32(r0) == -1 {
64
+		err = e1
65
+	}
66
+	return
67
+}
68
+
69
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
70
+
71
+func create(path string, mode int, perm uint32) (fd int, err error) {
72
+	var _p0 *byte
73
+	_p0, err = BytePtrFromString(path)
74
+	if err != nil {
75
+		return
76
+	}
77
+	r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
78
+	fd = int(r0)
79
+	if int32(r0) == -1 {
80
+		err = e1
81
+	}
82
+	return
83
+}
84
+
85
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
86
+
87
+func remove(path string) (err error) {
88
+	var _p0 *byte
89
+	_p0, err = BytePtrFromString(path)
90
+	if err != nil {
91
+		return
92
+	}
93
+	r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)
94
+	if int32(r0) == -1 {
95
+		err = e1
96
+	}
97
+	return
98
+}
99
+
100
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
101
+
102
+func stat(path string, edir []byte) (n int, err error) {
103
+	var _p0 *byte
104
+	_p0, err = BytePtrFromString(path)
105
+	if err != nil {
106
+		return
107
+	}
108
+	var _p1 unsafe.Pointer
109
+	if len(edir) > 0 {
110
+		_p1 = unsafe.Pointer(&edir[0])
111
+	} else {
112
+		_p1 = unsafe.Pointer(&_zero)
113
+	}
114
+	r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
115
+	n = int(r0)
116
+	if int32(r0) == -1 {
117
+		err = e1
118
+	}
119
+	return
120
+}
121
+
122
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
123
+
124
+func bind(name string, old string, flag int) (err error) {
125
+	var _p0 *byte
126
+	_p0, err = BytePtrFromString(name)
127
+	if err != nil {
128
+		return
129
+	}
130
+	var _p1 *byte
131
+	_p1, err = BytePtrFromString(old)
132
+	if err != nil {
133
+		return
134
+	}
135
+	r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag))
136
+	if int32(r0) == -1 {
137
+		err = e1
138
+	}
139
+	return
140
+}
141
+
142
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
143
+
144
+func mount(fd int, afd int, old string, flag int, aname string) (err error) {
145
+	var _p0 *byte
146
+	_p0, err = BytePtrFromString(old)
147
+	if err != nil {
148
+		return
149
+	}
150
+	var _p1 *byte
151
+	_p1, err = BytePtrFromString(aname)
152
+	if err != nil {
153
+		return
154
+	}
155
+	r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0)
156
+	if int32(r0) == -1 {
157
+		err = e1
158
+	}
159
+	return
160
+}
161
+
162
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
163
+
164
+func wstat(path string, edir []byte) (err error) {
165
+	var _p0 *byte
166
+	_p0, err = BytePtrFromString(path)
167
+	if err != nil {
168
+		return
169
+	}
170
+	var _p1 unsafe.Pointer
171
+	if len(edir) > 0 {
172
+		_p1 = unsafe.Pointer(&edir[0])
173
+	} else {
174
+		_p1 = unsafe.Pointer(&_zero)
175
+	}
176
+	r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir)))
177
+	if int32(r0) == -1 {
178
+		err = e1
179
+	}
180
+	return
181
+}
182
+
183
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
184
+
185
+func chdir(path string) (err error) {
186
+	var _p0 *byte
187
+	_p0, err = BytePtrFromString(path)
188
+	if err != nil {
189
+		return
190
+	}
191
+	r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
192
+	if int32(r0) == -1 {
193
+		err = e1
194
+	}
195
+	return
196
+}
197
+
198
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
199
+
200
+func Dup(oldfd int, newfd int) (fd int, err error) {
201
+	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0)
202
+	fd = int(r0)
203
+	if int32(r0) == -1 {
204
+		err = e1
205
+	}
206
+	return
207
+}
208
+
209
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
210
+
211
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
212
+	var _p0 unsafe.Pointer
213
+	if len(p) > 0 {
214
+		_p0 = unsafe.Pointer(&p[0])
215
+	} else {
216
+		_p0 = unsafe.Pointer(&_zero)
217
+	}
218
+	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
219
+	n = int(r0)
220
+	if int32(r0) == -1 {
221
+		err = e1
222
+	}
223
+	return
224
+}
225
+
226
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
227
+
228
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
229
+	var _p0 unsafe.Pointer
230
+	if len(p) > 0 {
231
+		_p0 = unsafe.Pointer(&p[0])
232
+	} else {
233
+		_p0 = unsafe.Pointer(&_zero)
234
+	}
235
+	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
236
+	n = int(r0)
237
+	if int32(r0) == -1 {
238
+		err = e1
239
+	}
240
+	return
241
+}
242
+
243
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
244
+
245
+func Close(fd int) (err error) {
246
+	r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
247
+	if int32(r0) == -1 {
248
+		err = e1
249
+	}
250
+	return
251
+}
252
+
253
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
254
+
255
+func Fstat(fd int, edir []byte) (n int, err error) {
256
+	var _p0 unsafe.Pointer
257
+	if len(edir) > 0 {
258
+		_p0 = unsafe.Pointer(&edir[0])
259
+	} else {
260
+		_p0 = unsafe.Pointer(&_zero)
261
+	}
262
+	r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
263
+	n = int(r0)
264
+	if int32(r0) == -1 {
265
+		err = e1
266
+	}
267
+	return
268
+}
269
+
270
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
271
+
272
+func Fwstat(fd int, edir []byte) (err error) {
273
+	var _p0 unsafe.Pointer
274
+	if len(edir) > 0 {
275
+		_p0 = unsafe.Pointer(&edir[0])
276
+	} else {
277
+		_p0 = unsafe.Pointer(&_zero)
278
+	}
279
+	r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir)))
280
+	if int32(r0) == -1 {
281
+		err = e1
282
+	}
283
+	return
284
+}

+ 49
- 0
vendor/golang.org/x/sys/plan9/zsysnum_plan9.go View File

@@ -0,0 +1,49 @@
1
+// mksysnum_plan9.sh /opt/plan9/sys/src/libc/9syscall/sys.h
2
+// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
3
+
4
+package plan9
5
+
6
+const (
7
+	SYS_SYSR1       = 0
8
+	SYS_BIND        = 2
9
+	SYS_CHDIR       = 3
10
+	SYS_CLOSE       = 4
11
+	SYS_DUP         = 5
12
+	SYS_ALARM       = 6
13
+	SYS_EXEC        = 7
14
+	SYS_EXITS       = 8
15
+	SYS_FAUTH       = 10
16
+	SYS_SEGBRK      = 12
17
+	SYS_OPEN        = 14
18
+	SYS_OSEEK       = 16
19
+	SYS_SLEEP       = 17
20
+	SYS_RFORK       = 19
21
+	SYS_PIPE        = 21
22
+	SYS_CREATE      = 22
23
+	SYS_FD2PATH     = 23
24
+	SYS_BRK_        = 24
25
+	SYS_REMOVE      = 25
26
+	SYS_NOTIFY      = 28
27
+	SYS_NOTED       = 29
28
+	SYS_SEGATTACH   = 30
29
+	SYS_SEGDETACH   = 31
30
+	SYS_SEGFREE     = 32
31
+	SYS_SEGFLUSH    = 33
32
+	SYS_RENDEZVOUS  = 34
33
+	SYS_UNMOUNT     = 35
34
+	SYS_SEMACQUIRE  = 37
35
+	SYS_SEMRELEASE  = 38
36
+	SYS_SEEK        = 39
37
+	SYS_FVERSION    = 40
38
+	SYS_ERRSTR      = 41
39
+	SYS_STAT        = 42
40
+	SYS_FSTAT       = 43
41
+	SYS_WSTAT       = 44
42
+	SYS_FWSTAT      = 45
43
+	SYS_MOUNT       = 46
44
+	SYS_AWAIT       = 47
45
+	SYS_PREAD       = 50
46
+	SYS_PWRITE      = 51
47
+	SYS_TSEMACQUIRE = 52
48
+	SYS_NSEC        = 53
49
+)

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_aix_ppc64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_darwin_386.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_darwin_amd64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_darwin_arm.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 // +build arm,darwin
7 7
 
8 8
 #include "textflag.h"

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_darwin_arm64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 // +build arm64,darwin
7 7
 
8 8
 #include "textflag.h"

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_freebsd_386.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_freebsd_arm.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_linux_386.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_linux_amd64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_linux_arm.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_linux_arm64.s View File

@@ -4,7 +4,7 @@
4 4
 
5 5
 // +build linux
6 6
 // +build arm64
7
-// +build !gccgo
7
+// +build gc
8 8
 
9 9
 #include "textflag.h"
10 10
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_linux_mips64x.s View File

@@ -4,7 +4,7 @@
4 4
 
5 5
 // +build linux
6 6
 // +build mips64 mips64le
7
-// +build !gccgo
7
+// +build gc
8 8
 
9 9
 #include "textflag.h"
10 10
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_linux_mipsx.s View File

@@ -4,7 +4,7 @@
4 4
 
5 5
 // +build linux
6 6
 // +build mips mipsle
7
-// +build !gccgo
7
+// +build gc
8 8
 
9 9
 #include "textflag.h"
10 10
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s View File

@@ -4,7 +4,7 @@
4 4
 
5 5
 // +build linux
6 6
 // +build ppc64 ppc64le
7
-// +build !gccgo
7
+// +build gc
8 8
 
9 9
 #include "textflag.h"
10 10
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_linux_riscv64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build riscv64,!gccgo
5
+// +build riscv64,gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_linux_s390x.s View File

@@ -4,7 +4,7 @@
4 4
 
5 5
 // +build s390x
6 6
 // +build linux
7
-// +build !gccgo
7
+// +build gc
8 8
 
9 9
 #include "textflag.h"
10 10
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_netbsd_386.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_netbsd_arm.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_openbsd_386.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_openbsd_arm.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/asm_solaris_amd64.s View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 #include "textflag.h"
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/endian_big.go View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 //
5
-// +build ppc64 s390x mips mips64
5
+// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64
6 6
 
7 7
 package unix
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/endian_little.go View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 //
5
-// +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le riscv64
5
+// +build 386 amd64 amd64p32 alpha arm arm64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
6 6
 
7 7
 package unix
8 8
 

+ 2
- 0
vendor/golang.org/x/sys/unix/mkerrors.sh View File

@@ -225,6 +225,7 @@ struct ltchars {
225 225
 #include <linux/kexec.h>
226 226
 #include <linux/keyctl.h>
227 227
 #include <linux/loop.h>
228
+#include <linux/lwtunnel.h>
228 229
 #include <linux/magic.h>
229 230
 #include <linux/memfd.h>
230 231
 #include <linux/module.h>
@@ -561,6 +562,7 @@ ccflags="$@"
561 562
 		$2 ~ /^CRYPTO_/ ||
562 563
 		$2 ~ /^TIPC_/ ||
563 564
 		$2 ~ /^DEVLINK_/ ||
565
+		$2 ~ /^LWTUNNEL_IP/ ||
564 566
 		$2 !~ "WMESGLEN" &&
565 567
 		$2 ~ /^W[A-Z0-9]+$/ ||
566 568
 		$2 ~/^PPPIOC/ ||

+ 13
- 0
vendor/golang.org/x/sys/unix/syscall_dragonfly.go View File

@@ -105,6 +105,19 @@ func Pipe(p []int) (err error) {
105 105
 	return
106 106
 }
107 107
 
108
+//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
109
+
110
+func Pipe2(p []int, flags int) error {
111
+	if len(p) != 2 {
112
+		return EINVAL
113
+	}
114
+	var pp [2]_C_int
115
+	err := pipe2(&pp, flags)
116
+	p[0] = int(pp[0])
117
+	p[1] = int(pp[1])
118
+	return err
119
+}
120
+
108 121
 //sys	extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
109 122
 func Pread(fd int, p []byte, offset int64) (n int, err error) {
110 123
 	return extpread(fd, p, 0, offset)

+ 1
- 1
vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go View File

@@ -3,7 +3,7 @@
3 3
 // license that can be found in the LICENSE file.
4 4
 
5 5
 // +build amd64,linux
6
-// +build !gccgo
6
+// +build gc
7 7
 
8 8
 package unix
9 9
 

+ 1
- 1
vendor/golang.org/x/sys/unix/syscall_linux_gc.go View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build linux,!gccgo
5
+// +build linux,gc
6 6
 
7 7
 package unix
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build linux,!gccgo,386
5
+// +build linux,gc,386
6 6
 
7 7
 package unix
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go View File

@@ -2,7 +2,7 @@
2 2
 // Use of this source code is governed by a BSD-style
3 3
 // license that can be found in the LICENSE file.
4 4
 
5
-// +build arm,!gccgo,linux
5
+// +build arm,gc,linux
6 6
 
7 7
 package unix
8 8
 

+ 1
- 1
vendor/golang.org/x/sys/unix/syscall_unix_gc.go View File

@@ -3,7 +3,7 @@
3 3
 // license that can be found in the LICENSE file.
4 4
 
5 5
 // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6
-// +build !gccgo,!ppc64le,!ppc64
6
+// +build gc,!ppc64le,!ppc64
7 7
 
8 8
 package unix
9 9
 

+ 1
- 1
vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go View File

@@ -4,7 +4,7 @@
4 4
 
5 5
 // +build linux
6 6
 // +build ppc64le ppc64
7
-// +build !gccgo
7
+// +build gc
8 8
 
9 9
 package unix
10 10
 

+ 6
- 0
vendor/golang.org/x/sys/unix/zerrors_linux.go View File

@@ -1217,6 +1217,12 @@ const (
1217 1217
 	LOOP_SET_STATUS_SETTABLE_FLAGS              = 0xc
1218 1218
 	LO_KEY_SIZE                                 = 0x20
1219 1219
 	LO_NAME_SIZE                                = 0x40
1220
+	LWTUNNEL_IP6_MAX                            = 0x8
1221
+	LWTUNNEL_IP_MAX                             = 0x8
1222
+	LWTUNNEL_IP_OPTS_MAX                        = 0x3
1223
+	LWTUNNEL_IP_OPT_ERSPAN_MAX                  = 0x4
1224
+	LWTUNNEL_IP_OPT_GENEVE_MAX                  = 0x3
1225
+	LWTUNNEL_IP_OPT_VXLAN_MAX                   = 0x1
1220 1226
 	MADV_COLD                                   = 0x14
1221 1227
 	MADV_DODUMP                                 = 0x11
1222 1228
 	MADV_DOFORK                                 = 0xb

+ 1
- 1
vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go View File

@@ -2,7 +2,7 @@
2 2
 // Code generated by the command above; see README.md. DO NOT EDIT.
3 3
 
4 4
 // +build aix,ppc64
5
-// +build !gccgo
5
+// +build gc
6 6
 
7 7
 package unix
8 8
 

+ 10
- 0
vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go View File

@@ -362,6 +362,16 @@ func pipe() (r int, w int, err error) {
362 362
 
363 363
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
364 364
 
365
+func pipe2(p *[2]_C_int, flags int) (err error) {
366
+	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
367
+	if e1 != 0 {
368
+		err = errnoErr(e1)
369
+	}
370
+	return
371
+}
372
+
373
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
374
+
365 375
 func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
366 376
 	var _p0 unsafe.Pointer
367 377
 	if len(p) > 0 {

+ 18
- 0
vendor/golang.org/x/sys/unix/ztypes_linux.go View File

@@ -2981,3 +2981,21 @@ type PPSKTime struct {
2981 2981
 	Nsec  int32
2982 2982
 	Flags uint32
2983 2983
 }
2984
+
2985
+const (
2986
+	LWTUNNEL_ENCAP_NONE       = 0x0
2987
+	LWTUNNEL_ENCAP_MPLS       = 0x1
2988
+	LWTUNNEL_ENCAP_IP         = 0x2
2989
+	LWTUNNEL_ENCAP_ILA        = 0x3
2990
+	LWTUNNEL_ENCAP_IP6        = 0x4
2991
+	LWTUNNEL_ENCAP_SEG6       = 0x5
2992
+	LWTUNNEL_ENCAP_BPF        = 0x6
2993
+	LWTUNNEL_ENCAP_SEG6_LOCAL = 0x7
2994
+	LWTUNNEL_ENCAP_RPL        = 0x8
2995
+	LWTUNNEL_ENCAP_MAX        = 0x8
2996
+
2997
+	MPLS_IPTUNNEL_UNSPEC = 0x0
2998
+	MPLS_IPTUNNEL_DST    = 0x1
2999
+	MPLS_IPTUNNEL_TTL    = 0x2
3000
+	MPLS_IPTUNNEL_MAX    = 0x2
3001
+)

+ 2
- 0
vendor/golang.org/x/sys/windows/dll_windows.go View File

@@ -32,6 +32,8 @@ type DLLError struct {
32 32
 
33 33
 func (e *DLLError) Error() string { return e.Msg }
34 34
 
35
+func (e *DLLError) Unwrap() error { return e.Err }
36
+
35 37
 // A DLL implements access to a single DLL.
36 38
 type DLL struct {
37 39
 	Name   string

+ 2
- 1
vendor/golang.org/x/sys/windows/security_windows.go View File

@@ -1103,9 +1103,10 @@ type OBJECTS_AND_NAME struct {
1103 1103
 }
1104 1104
 
1105 1105
 //sys	getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetSecurityInfo
1106
-//sys	SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) = advapi32.SetSecurityInfo
1106
+//sys	SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) = advapi32.SetSecurityInfo
1107 1107
 //sys	getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetNamedSecurityInfoW
1108 1108
 //sys	SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) = advapi32.SetNamedSecurityInfoW
1109
+//sys	SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) = advapi32.SetKernelObjectSecurity
1109 1110
 
1110 1111
 //sys	buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) = advapi32.BuildSecurityDescriptorW
1111 1112
 //sys	initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) = advapi32.InitializeSecurityDescriptor

+ 100
- 0
vendor/golang.org/x/sys/windows/setupapierrors_windows.go View File

@@ -0,0 +1,100 @@
1
+// Copyright 2020 The Go Authors. All rights reserved.
2
+// Use of this source code is governed by a BSD-style
3
+// license that can be found in the LICENSE file.
4
+
5
+package windows
6
+
7
+import "syscall"
8
+
9
+const (
10
+	ERROR_EXPECTED_SECTION_NAME                  syscall.Errno = 0x20000000 | 0xC0000000 | 0
11
+	ERROR_BAD_SECTION_NAME_LINE                  syscall.Errno = 0x20000000 | 0xC0000000 | 1
12
+	ERROR_SECTION_NAME_TOO_LONG                  syscall.Errno = 0x20000000 | 0xC0000000 | 2
13
+	ERROR_GENERAL_SYNTAX                         syscall.Errno = 0x20000000 | 0xC0000000 | 3
14
+	ERROR_WRONG_INF_STYLE                        syscall.Errno = 0x20000000 | 0xC0000000 | 0x100
15
+	ERROR_SECTION_NOT_FOUND                      syscall.Errno = 0x20000000 | 0xC0000000 | 0x101
16
+	ERROR_LINE_NOT_FOUND                         syscall.Errno = 0x20000000 | 0xC0000000 | 0x102
17
+	ERROR_NO_BACKUP                              syscall.Errno = 0x20000000 | 0xC0000000 | 0x103
18
+	ERROR_NO_ASSOCIATED_CLASS                    syscall.Errno = 0x20000000 | 0xC0000000 | 0x200
19
+	ERROR_CLASS_MISMATCH                         syscall.Errno = 0x20000000 | 0xC0000000 | 0x201
20
+	ERROR_DUPLICATE_FOUND                        syscall.Errno = 0x20000000 | 0xC0000000 | 0x202
21
+	ERROR_NO_DRIVER_SELECTED                     syscall.Errno = 0x20000000 | 0xC0000000 | 0x203
22
+	ERROR_KEY_DOES_NOT_EXIST                     syscall.Errno = 0x20000000 | 0xC0000000 | 0x204
23
+	ERROR_INVALID_DEVINST_NAME                   syscall.Errno = 0x20000000 | 0xC0000000 | 0x205
24
+	ERROR_INVALID_CLASS                          syscall.Errno = 0x20000000 | 0xC0000000 | 0x206
25
+	ERROR_DEVINST_ALREADY_EXISTS                 syscall.Errno = 0x20000000 | 0xC0000000 | 0x207
26
+	ERROR_DEVINFO_NOT_REGISTERED                 syscall.Errno = 0x20000000 | 0xC0000000 | 0x208
27
+	ERROR_INVALID_REG_PROPERTY                   syscall.Errno = 0x20000000 | 0xC0000000 | 0x209
28
+	ERROR_NO_INF                                 syscall.Errno = 0x20000000 | 0xC0000000 | 0x20A
29
+	ERROR_NO_SUCH_DEVINST                        syscall.Errno = 0x20000000 | 0xC0000000 | 0x20B
30
+	ERROR_CANT_LOAD_CLASS_ICON                   syscall.Errno = 0x20000000 | 0xC0000000 | 0x20C
31
+	ERROR_INVALID_CLASS_INSTALLER                syscall.Errno = 0x20000000 | 0xC0000000 | 0x20D
32
+	ERROR_DI_DO_DEFAULT                          syscall.Errno = 0x20000000 | 0xC0000000 | 0x20E
33
+	ERROR_DI_NOFILECOPY                          syscall.Errno = 0x20000000 | 0xC0000000 | 0x20F
34
+	ERROR_INVALID_HWPROFILE                      syscall.Errno = 0x20000000 | 0xC0000000 | 0x210
35
+	ERROR_NO_DEVICE_SELECTED                     syscall.Errno = 0x20000000 | 0xC0000000 | 0x211
36
+	ERROR_DEVINFO_LIST_LOCKED                    syscall.Errno = 0x20000000 | 0xC0000000 | 0x212
37
+	ERROR_DEVINFO_DATA_LOCKED                    syscall.Errno = 0x20000000 | 0xC0000000 | 0x213
38
+	ERROR_DI_BAD_PATH                            syscall.Errno = 0x20000000 | 0xC0000000 | 0x214
39
+	ERROR_NO_CLASSINSTALL_PARAMS                 syscall.Errno = 0x20000000 | 0xC0000000 | 0x215
40
+	ERROR_FILEQUEUE_LOCKED                       syscall.Errno = 0x20000000 | 0xC0000000 | 0x216
41
+	ERROR_BAD_SERVICE_INSTALLSECT                syscall.Errno = 0x20000000 | 0xC0000000 | 0x217
42
+	ERROR_NO_CLASS_DRIVER_LIST                   syscall.Errno = 0x20000000 | 0xC0000000 | 0x218
43
+	ERROR_NO_ASSOCIATED_SERVICE                  syscall.Errno = 0x20000000 | 0xC0000000 | 0x219
44
+	ERROR_NO_DEFAULT_DEVICE_INTERFACE            syscall.Errno = 0x20000000 | 0xC0000000 | 0x21A
45
+	ERROR_DEVICE_INTERFACE_ACTIVE                syscall.Errno = 0x20000000 | 0xC0000000 | 0x21B
46
+	ERROR_DEVICE_INTERFACE_REMOVED               syscall.Errno = 0x20000000 | 0xC0000000 | 0x21C
47
+	ERROR_BAD_INTERFACE_INSTALLSECT              syscall.Errno = 0x20000000 | 0xC0000000 | 0x21D
48
+	ERROR_NO_SUCH_INTERFACE_CLASS                syscall.Errno = 0x20000000 | 0xC0000000 | 0x21E
49
+	ERROR_INVALID_REFERENCE_STRING               syscall.Errno = 0x20000000 | 0xC0000000 | 0x21F
50
+	ERROR_INVALID_MACHINENAME                    syscall.Errno = 0x20000000 | 0xC0000000 | 0x220
51
+	ERROR_REMOTE_COMM_FAILURE                    syscall.Errno = 0x20000000 | 0xC0000000 | 0x221
52
+	ERROR_MACHINE_UNAVAILABLE                    syscall.Errno = 0x20000000 | 0xC0000000 | 0x222
53
+	ERROR_NO_CONFIGMGR_SERVICES                  syscall.Errno = 0x20000000 | 0xC0000000 | 0x223
54
+	ERROR_INVALID_PROPPAGE_PROVIDER              syscall.Errno = 0x20000000 | 0xC0000000 | 0x224
55
+	ERROR_NO_SUCH_DEVICE_INTERFACE               syscall.Errno = 0x20000000 | 0xC0000000 | 0x225
56
+	ERROR_DI_POSTPROCESSING_REQUIRED             syscall.Errno = 0x20000000 | 0xC0000000 | 0x226
57
+	ERROR_INVALID_COINSTALLER                    syscall.Errno = 0x20000000 | 0xC0000000 | 0x227
58
+	ERROR_NO_COMPAT_DRIVERS                      syscall.Errno = 0x20000000 | 0xC0000000 | 0x228
59
+	ERROR_NO_DEVICE_ICON                         syscall.Errno = 0x20000000 | 0xC0000000 | 0x229
60
+	ERROR_INVALID_INF_LOGCONFIG                  syscall.Errno = 0x20000000 | 0xC0000000 | 0x22A
61
+	ERROR_DI_DONT_INSTALL                        syscall.Errno = 0x20000000 | 0xC0000000 | 0x22B
62
+	ERROR_INVALID_FILTER_DRIVER                  syscall.Errno = 0x20000000 | 0xC0000000 | 0x22C
63
+	ERROR_NON_WINDOWS_NT_DRIVER                  syscall.Errno = 0x20000000 | 0xC0000000 | 0x22D
64
+	ERROR_NON_WINDOWS_DRIVER                     syscall.Errno = 0x20000000 | 0xC0000000 | 0x22E
65
+	ERROR_NO_CATALOG_FOR_OEM_INF                 syscall.Errno = 0x20000000 | 0xC0000000 | 0x22F
66
+	ERROR_DEVINSTALL_QUEUE_NONNATIVE             syscall.Errno = 0x20000000 | 0xC0000000 | 0x230
67
+	ERROR_NOT_DISABLEABLE                        syscall.Errno = 0x20000000 | 0xC0000000 | 0x231
68
+	ERROR_CANT_REMOVE_DEVINST                    syscall.Errno = 0x20000000 | 0xC0000000 | 0x232
69
+	ERROR_INVALID_TARGET                         syscall.Errno = 0x20000000 | 0xC0000000 | 0x233
70
+	ERROR_DRIVER_NONNATIVE                       syscall.Errno = 0x20000000 | 0xC0000000 | 0x234
71
+	ERROR_IN_WOW64                               syscall.Errno = 0x20000000 | 0xC0000000 | 0x235
72
+	ERROR_SET_SYSTEM_RESTORE_POINT               syscall.Errno = 0x20000000 | 0xC0000000 | 0x236
73
+	ERROR_SCE_DISABLED                           syscall.Errno = 0x20000000 | 0xC0000000 | 0x238
74
+	ERROR_UNKNOWN_EXCEPTION                      syscall.Errno = 0x20000000 | 0xC0000000 | 0x239
75
+	ERROR_PNP_REGISTRY_ERROR                     syscall.Errno = 0x20000000 | 0xC0000000 | 0x23A
76
+	ERROR_REMOTE_REQUEST_UNSUPPORTED             syscall.Errno = 0x20000000 | 0xC0000000 | 0x23B
77
+	ERROR_NOT_AN_INSTALLED_OEM_INF               syscall.Errno = 0x20000000 | 0xC0000000 | 0x23C
78
+	ERROR_INF_IN_USE_BY_DEVICES                  syscall.Errno = 0x20000000 | 0xC0000000 | 0x23D
79
+	ERROR_DI_FUNCTION_OBSOLETE                   syscall.Errno = 0x20000000 | 0xC0000000 | 0x23E
80
+	ERROR_NO_AUTHENTICODE_CATALOG                syscall.Errno = 0x20000000 | 0xC0000000 | 0x23F
81
+	ERROR_AUTHENTICODE_DISALLOWED                syscall.Errno = 0x20000000 | 0xC0000000 | 0x240
82
+	ERROR_AUTHENTICODE_TRUSTED_PUBLISHER         syscall.Errno = 0x20000000 | 0xC0000000 | 0x241
83
+	ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED     syscall.Errno = 0x20000000 | 0xC0000000 | 0x242
84
+	ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED     syscall.Errno = 0x20000000 | 0xC0000000 | 0x243
85
+	ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH         syscall.Errno = 0x20000000 | 0xC0000000 | 0x244
86
+	ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE         syscall.Errno = 0x20000000 | 0xC0000000 | 0x245
87
+	ERROR_DEVICE_INSTALLER_NOT_READY             syscall.Errno = 0x20000000 | 0xC0000000 | 0x246
88
+	ERROR_DRIVER_STORE_ADD_FAILED                syscall.Errno = 0x20000000 | 0xC0000000 | 0x247
89
+	ERROR_DEVICE_INSTALL_BLOCKED                 syscall.Errno = 0x20000000 | 0xC0000000 | 0x248
90
+	ERROR_DRIVER_INSTALL_BLOCKED                 syscall.Errno = 0x20000000 | 0xC0000000 | 0x249
91
+	ERROR_WRONG_INF_TYPE                         syscall.Errno = 0x20000000 | 0xC0000000 | 0x24A
92
+	ERROR_FILE_HASH_NOT_IN_CATALOG               syscall.Errno = 0x20000000 | 0xC0000000 | 0x24B
93
+	ERROR_DRIVER_STORE_DELETE_FAILED             syscall.Errno = 0x20000000 | 0xC0000000 | 0x24C
94
+	ERROR_UNRECOVERABLE_STACK_OVERFLOW           syscall.Errno = 0x20000000 | 0xC0000000 | 0x300
95
+	EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW syscall.Errno = ERROR_UNRECOVERABLE_STACK_OVERFLOW
96
+	ERROR_NO_DEFAULT_INTERFACE_DEVICE            syscall.Errno = ERROR_NO_DEFAULT_DEVICE_INTERFACE
97
+	ERROR_INTERFACE_DEVICE_ACTIVE                syscall.Errno = ERROR_DEVICE_INTERFACE_ACTIVE
98
+	ERROR_INTERFACE_DEVICE_REMOVED               syscall.Errno = ERROR_DEVICE_INTERFACE_REMOVED
99
+	ERROR_NO_SUCH_INTERFACE_DEVICE               syscall.Errno = ERROR_NO_SUCH_DEVICE_INTERFACE
100
+)

+ 8
- 2
vendor/golang.org/x/sys/windows/syscall_windows.go View File

@@ -174,6 +174,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
174 174
 //sys	FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW
175 175
 //sys	ExitProcess(exitcode uint32)
176 176
 //sys	IsWow64Process(handle Handle, isWow64 *bool) (err error) = IsWow64Process
177
+//sys	IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint16) (err error) = IsWow64Process2?
177 178
 //sys	CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW
178 179
 //sys	ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
179 180
 //sys	WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
@@ -187,6 +188,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
187 188
 //sys	FindClose(handle Handle) (err error)
188 189
 //sys	GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error)
189 190
 //sys	GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error)
191
+//sys	SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error)
190 192
 //sys	GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) = GetCurrentDirectoryW
191 193
 //sys	SetCurrentDirectory(path *uint16) (err error) = SetCurrentDirectoryW
192 194
 //sys	CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) = CreateDirectoryW
@@ -243,6 +245,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
243 245
 //sys	GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) = kernel32.GetFullPathNameW
244 246
 //sys	GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) = kernel32.GetLongPathNameW
245 247
 //sys	GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) = kernel32.GetShortPathNameW
248
+//sys	GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) = kernel32.GetFinalPathNameByHandleW
246 249
 //sys	CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) = kernel32.CreateFileMappingW
247 250
 //sys	MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error)
248 251
 //sys	UnmapViewOfFile(addr uintptr) (err error)
@@ -275,7 +278,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
275 278
 //sys	GetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode
276 279
 //sys	SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode
277 280
 //sys	GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo
278
-//sys	SetConsoleCursorPosition(console Handle, position Coord) (err error) = kernel32.SetConsoleCursorPosition
281
+//sys	setConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition
279 282
 //sys	WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
280 283
 //sys	ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
281 284
 //sys	CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
@@ -351,7 +354,6 @@ func NewCallbackCDecl(fn interface{}) uintptr {
351 354
 //sys	getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetThreadPreferredUILanguages
352 355
 //sys	getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetUserPreferredUILanguages
353 356
 //sys	getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetSystemPreferredUILanguages
354
-//sys   GetFinalPathNameByHandleW(file syscall.Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) = kernel32.GetFinalPathNameByHandleW
355 357
 
356 358
 // Process Status API (PSAPI)
357 359
 //sys	EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
@@ -1480,3 +1482,7 @@ func getUILanguages(flags uint32, f func(flags uint32, numLanguages *uint32, buf
1480 1482
 		return languages, nil
1481 1483
 	}
1482 1484
 }
1485
+
1486
+func SetConsoleCursorPosition(console Handle, position Coord) error {
1487
+	return setConsoleCursorPosition(console, *((*uint32)(unsafe.Pointer(&position))))
1488
+}

+ 29
- 0
vendor/golang.org/x/sys/windows/types_windows.go View File

@@ -1772,3 +1772,32 @@ const (
1772 1772
 	MUI_LANGUAGE_INSTALLED = 0x20
1773 1773
 	MUI_LANGUAGE_LICENSED  = 0x40
1774 1774
 )
1775
+
1776
+// FILE_INFO_BY_HANDLE_CLASS constants for SetFileInformationByHandle/GetFileInformationByHandleEx
1777
+const (
1778
+	FileBasicInfo                  = 0
1779
+	FileStandardInfo               = 1
1780
+	FileNameInfo                   = 2
1781
+	FileRenameInfo                 = 3
1782
+	FileDispositionInfo            = 4
1783
+	FileAllocationInfo             = 5
1784
+	FileEndOfFileInfo              = 6
1785
+	FileStreamInfo                 = 7
1786
+	FileCompressionInfo            = 8
1787
+	FileAttributeTagInfo           = 9
1788
+	FileIdBothDirectoryInfo        = 10
1789
+	FileIdBothDirectoryRestartInfo = 11
1790
+	FileIoPriorityHintInfo         = 12
1791
+	FileRemoteProtocolInfo         = 13
1792
+	FileFullDirectoryInfo          = 14
1793
+	FileFullDirectoryRestartInfo   = 15
1794
+	FileStorageInfo                = 16
1795
+	FileAlignmentInfo              = 17
1796
+	FileIdInfo                     = 18
1797
+	FileIdExtdDirectoryInfo        = 19
1798
+	FileIdExtdDirectoryRestartInfo = 20
1799
+	FileDispositionInfoEx          = 21
1800
+	FileRenameInfoEx               = 22
1801
+	FileCaseSensitiveInfo          = 23
1802
+	FileNormalizedNameInfo         = 24
1803
+)

+ 39
- 5
vendor/golang.org/x/sys/windows/zsyscall_windows.go View File

@@ -122,6 +122,7 @@ var (
122 122
 	procReportEventW                                         = modadvapi32.NewProc("ReportEventW")
123 123
 	procRevertToSelf                                         = modadvapi32.NewProc("RevertToSelf")
124 124
 	procSetEntriesInAclW                                     = modadvapi32.NewProc("SetEntriesInAclW")
125
+	procSetKernelObjectSecurity                              = modadvapi32.NewProc("SetKernelObjectSecurity")
125 126
 	procSetNamedSecurityInfoW                                = modadvapi32.NewProc("SetNamedSecurityInfoW")
126 127
 	procSetSecurityDescriptorControl                         = modadvapi32.NewProc("SetSecurityDescriptorControl")
127 128
 	procSetSecurityDescriptorDacl                            = modadvapi32.NewProc("SetSecurityDescriptorDacl")
@@ -248,6 +249,7 @@ var (
248 249
 	procGetVolumePathNamesForVolumeNameW                     = modkernel32.NewProc("GetVolumePathNamesForVolumeNameW")
249 250
 	procGetWindowsDirectoryW                                 = modkernel32.NewProc("GetWindowsDirectoryW")
250 251
 	procIsWow64Process                                       = modkernel32.NewProc("IsWow64Process")
252
+	procIsWow64Process2                                      = modkernel32.NewProc("IsWow64Process2")
251 253
 	procLoadLibraryExW                                       = modkernel32.NewProc("LoadLibraryExW")
252 254
 	procLoadLibraryW                                         = modkernel32.NewProc("LoadLibraryW")
253 255
 	procLocalFree                                            = modkernel32.NewProc("LocalFree")
@@ -283,6 +285,7 @@ var (
283 285
 	procSetEvent                                             = modkernel32.NewProc("SetEvent")
284 286
 	procSetFileAttributesW                                   = modkernel32.NewProc("SetFileAttributesW")
285 287
 	procSetFileCompletionNotificationModes                   = modkernel32.NewProc("SetFileCompletionNotificationModes")
288
+	procSetFileInformationByHandle                           = modkernel32.NewProc("SetFileInformationByHandle")
286 289
 	procSetFilePointer                                       = modkernel32.NewProc("SetFilePointer")
287 290
 	procSetFileTime                                          = modkernel32.NewProc("SetFileTime")
288 291
 	procSetHandleInformation                                 = modkernel32.NewProc("SetHandleInformation")
@@ -970,6 +973,14 @@ func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCE
970 973
 	return
971 974
 }
972 975
 
976
+func SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) {
977
+	r1, _, e1 := syscall.Syscall(procSetKernelObjectSecurity.Addr(), 3, uintptr(handle), uintptr(securityInformation), uintptr(unsafe.Pointer(securityDescriptor)))
978
+	if r1 == 0 {
979
+		err = errnoErr(e1)
980
+	}
981
+	return
982
+}
983
+
973 984
 func SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
974 985
 	var _p0 *uint16
975 986
 	_p0, ret = syscall.UTF16PtrFromString(objectName)
@@ -1056,8 +1067,11 @@ func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *
1056 1067
 	return
1057 1068
 }
1058 1069
 
1059
-func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) {
1060
-	syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
1070
+func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
1071
+	r0, _, _ := syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
1072
+	if r0 != 0 {
1073
+		ret = syscall.Errno(r0)
1074
+	}
1061 1075
 	return
1062 1076
 }
1063 1077
 
@@ -1727,7 +1741,7 @@ func GetFileType(filehandle Handle) (n uint32, err error) {
1727 1741
 	return
1728 1742
 }
1729 1743
 
1730
-func GetFinalPathNameByHandleW(file syscall.Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) {
1744
+func GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) {
1731 1745
 	r0, _, e1 := syscall.Syscall6(procGetFinalPathNameByHandleW.Addr(), 4, uintptr(file), uintptr(unsafe.Pointer(filePath)), uintptr(filePathSize), uintptr(flags), 0, 0)
1732 1746
 	n = uint32(r0)
1733 1747
 	if n == 0 {
@@ -2055,6 +2069,18 @@ func IsWow64Process(handle Handle, isWow64 *bool) (err error) {
2055 2069
 	return
2056 2070
 }
2057 2071
 
2072
+func IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint16) (err error) {
2073
+	err = procIsWow64Process2.Find()
2074
+	if err != nil {
2075
+		return
2076
+	}
2077
+	r1, _, e1 := syscall.Syscall(procIsWow64Process2.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(processMachine)), uintptr(unsafe.Pointer(nativeMachine)))
2078
+	if r1 == 0 {
2079
+		err = errnoErr(e1)
2080
+	}
2081
+	return
2082
+}
2083
+
2058 2084
 func LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) {
2059 2085
 	var _p0 *uint16
2060 2086
 	_p0, err = syscall.UTF16PtrFromString(libname)
@@ -2316,8 +2342,8 @@ func ResumeThread(thread Handle) (ret uint32, err error) {
2316 2342
 	return
2317 2343
 }
2318 2344
 
2319
-func SetConsoleCursorPosition(console Handle, position Coord) (err error) {
2320
-	r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(*((*uint32)(unsafe.Pointer(&position)))), 0)
2345
+func setConsoleCursorPosition(console Handle, position uint32) (err error) {
2346
+	r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0)
2321 2347
 	if r1 == 0 {
2322 2348
 		err = errnoErr(e1)
2323 2349
 	}
@@ -2386,6 +2412,14 @@ func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error)
2386 2412
 	return
2387 2413
 }
2388 2414
 
2415
+func SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error) {
2416
+	r1, _, e1 := syscall.Syscall6(procSetFileInformationByHandle.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), 0, 0)
2417
+	if r1 == 0 {
2418
+		err = errnoErr(e1)
2419
+	}
2420
+	return
2421
+}
2422
+
2389 2423
 func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) {
2390 2424
 	r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0)
2391 2425
 	newlowoffset = uint32(r0)

+ 3
- 0
vendor/golang.org/x/term/AUTHORS View File

@@ -0,0 +1,3 @@
1
+# This source code refers to The Go Authors for copyright purposes.
2
+# The master list of authors is in the main Go distribution,
3
+# visible at http://tip.golang.org/AUTHORS.

+ 26
- 0
vendor/golang.org/x/term/CONTRIBUTING.md View File

@@ -0,0 +1,26 @@
1
+# Contributing to Go
2
+
3
+Go is an open source project.
4
+
5
+It is the work of hundreds of contributors. We appreciate your help!
6
+
7
+## Filing issues
8
+
9
+When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
10
+
11
+1.  What version of Go are you using (`go version`)?
12
+2.  What operating system and processor architecture are you using?
13
+3.  What did you do?
14
+4.  What did you expect to see?
15
+5.  What did you see instead?
16
+
17
+General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
18
+The gophers there will answer or ask you to file an issue if you've tripped over a bug.
19
+
20
+## Contributing code
21
+
22
+Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
23
+before sending patches.
24
+
25
+Unless otherwise noted, the Go source files are distributed under
26
+the BSD-style license found in the LICENSE file.

+ 3
- 0
vendor/golang.org/x/term/CONTRIBUTORS View File

@@ -0,0 +1,3 @@
1
+# This source code was written by the Go contributors.
2
+# The master list of contributors is in the main Go distribution,
3
+# visible at http://tip.golang.org/CONTRIBUTORS.

+ 27
- 0
vendor/golang.org/x/term/LICENSE View File

@@ -0,0 +1,27 @@
1
+Copyright (c) 2009 The Go Authors. All rights reserved.
2
+
3
+Redistribution and use in source and binary forms, with or without
4
+modification, are permitted provided that the following conditions are
5
+met:
6
+
7
+   * Redistributions of source code must retain the above copyright
8
+notice, this list of conditions and the following disclaimer.
9
+   * Redistributions in binary form must reproduce the above
10
+copyright notice, this list of conditions and the following disclaimer
11
+in the documentation and/or other materials provided with the
12
+distribution.
13
+   * Neither the name of Google Inc. nor the names of its
14
+contributors may be used to endorse or promote products derived from
15
+this software without specific prior written permission.
16
+
17
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 22
- 0
vendor/golang.org/x/term/PATENTS View File

@@ -0,0 +1,22 @@
1
+Additional IP Rights Grant (Patents)
2
+
3
+"This implementation" means the copyrightable works distributed by
4
+Google as part of the Go project.
5
+
6
+Google hereby grants to You a perpetual, worldwide, non-exclusive,
7
+no-charge, royalty-free, irrevocable (except as stated in this section)
8
+patent license to make, have made, use, offer to sell, sell, import,
9
+transfer and otherwise run, modify and propagate the contents of this
10
+implementation of Go, where such license applies only to those patent
11
+claims, both currently owned or controlled by Google and acquired in
12
+the future, licensable by Google that are necessarily infringed by this
13
+implementation of Go.  This grant does not include claims that would be
14
+infringed only as a consequence of further modification of this
15
+implementation.  If you or your agent or exclusive licensee institute or
16
+order or agree to the institution of patent litigation against any
17
+entity (including a cross-claim or counterclaim in a lawsuit) alleging
18
+that this implementation of Go or any code incorporated within this
19
+implementation of Go constitutes direct or contributory patent
20
+infringement, or inducement of patent infringement, then any patent
21
+rights granted to you under this License for this implementation of Go
22
+shall terminate as of the date such litigation is filed.

+ 17
- 0
vendor/golang.org/x/term/README.md View File

@@ -0,0 +1,17 @@
1
+# Go terminal/console support
2
+
3
+This repository provides Go terminal and console support packages.
4
+
5
+## Download/Install
6
+
7
+The easiest way to install is to run `go get -u golang.org/x/term`. You can
8
+also manually git clone the repository to `$GOPATH/src/golang.org/x/term`.
9
+
10
+## Report Issues / Send Patches
11
+
12
+This repository uses Gerrit for code changes. To learn how to submit changes to
13
+this repository, see https://golang.org/doc/contribute.html.
14
+
15
+The main issue tracker for the term repository is located at
16
+https://github.com/golang/go/issues. Prefix your issue with "x/term:" in the
17
+subject line, so it is easy to find.

+ 5
- 0
vendor/golang.org/x/term/go.mod View File

@@ -0,0 +1,5 @@
1
+module golang.org/x/term
2
+
3
+go 1.11
4
+
5
+require golang.org/x/sys v0.0.0-20201119102817-f84b799fce68

+ 0
- 0
vendor/golang.org/x/term/go.sum View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save