Procházet zdrojové kódy

Merge pull request #1621 from slingamn/deps

upgrade dependencies for 2.7 window
tags/v2.7.0-rc1
Shivaram Lingamneni před 3 roky
rodič
revize
d2278faf75
Žádný účet není propojen s e-mailovou adresou tvůrce revize
100 změnil soubory, kde provedl 2878 přidání a 1233 odebrání
  1. 4
    5
      go.mod
  2. 14
    0
      go.sum
  3. 0
    129
      vendor/github.com/go-sql-driver/mysql/.travis.yml
  4. 12
    0
      vendor/github.com/go-sql-driver/mysql/AUTHORS
  5. 26
    0
      vendor/github.com/go-sql-driver/mysql/CHANGELOG.md
  6. 31
    12
      vendor/github.com/go-sql-driver/mysql/README.md
  7. 8
    5
      vendor/github.com/go-sql-driver/mysql/auth.go
  8. 1
    1
      vendor/github.com/go-sql-driver/mysql/collations.go
  9. 42
    43
      vendor/github.com/go-sql-driver/mysql/connection.go
  10. 1
    1
      vendor/github.com/go-sql-driver/mysql/dsn.go
  11. 1
    1
      vendor/github.com/go-sql-driver/mysql/fields.go
  12. 24
    0
      vendor/github.com/go-sql-driver/mysql/fuzz.go
  13. 2
    2
      vendor/github.com/go-sql-driver/mysql/infile.go
  14. 2
    2
      vendor/github.com/go-sql-driver/mysql/nulltime.go
  15. 9
    0
      vendor/github.com/go-sql-driver/mysql/nulltime_go113.go
  16. 5
    0
      vendor/github.com/go-sql-driver/mysql/nulltime_legacy.go
  17. 15
    8
      vendor/github.com/go-sql-driver/mysql/packets.go
  18. 23
    7
      vendor/github.com/go-sql-driver/mysql/statement.go
  19. 181
    14
      vendor/github.com/go-sql-driver/mysql/utils.go
  20. 2
    1
      vendor/golang.org/x/crypto/sha3/hashes_generic.go
  21. 2
    1
      vendor/golang.org/x/crypto/sha3/keccakf.go
  22. 2
    1
      vendor/golang.org/x/crypto/sha3/keccakf_amd64.go
  23. 1
    1
      vendor/golang.org/x/crypto/sha3/keccakf_amd64.s
  24. 1
    0
      vendor/golang.org/x/crypto/sha3/register.go
  25. 2
    1
      vendor/golang.org/x/crypto/sha3/sha3_s390x.go
  26. 1
    1
      vendor/golang.org/x/crypto/sha3/sha3_s390x.s
  27. 2
    1
      vendor/golang.org/x/crypto/sha3/shake_generic.go
  28. 2
    1
      vendor/golang.org/x/crypto/sha3/xor.go
  29. 2
    1
      vendor/golang.org/x/crypto/sha3/xor_unaligned.go
  30. 38
    949
      vendor/golang.org/x/crypto/ssh/terminal/terminal.go
  31. 1
    1
      vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
  32. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_arm64.s
  33. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
  34. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
  35. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
  36. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_s390x.s
  37. 1
    1
      vendor/golang.org/x/sys/cpu/cpu_x86.s
  38. 1
    1
      vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
  39. 8
    0
      vendor/golang.org/x/sys/plan9/asm.s
  40. 30
    0
      vendor/golang.org/x/sys/plan9/asm_plan9_386.s
  41. 30
    0
      vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s
  42. 25
    0
      vendor/golang.org/x/sys/plan9/asm_plan9_arm.s
  43. 70
    0
      vendor/golang.org/x/sys/plan9/const_plan9.go
  44. 212
    0
      vendor/golang.org/x/sys/plan9/dir_plan9.go
  45. 31
    0
      vendor/golang.org/x/sys/plan9/env_plan9.go
  46. 50
    0
      vendor/golang.org/x/sys/plan9/errors_plan9.go
  47. 150
    0
      vendor/golang.org/x/sys/plan9/mkall.sh
  48. 246
    0
      vendor/golang.org/x/sys/plan9/mkerrors.sh
  49. 23
    0
      vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh
  50. 21
    0
      vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
  51. 23
    0
      vendor/golang.org/x/sys/plan9/pwd_plan9.go
  52. 30
    0
      vendor/golang.org/x/sys/plan9/race.go
  53. 25
    0
      vendor/golang.org/x/sys/plan9/race0.go
  54. 22
    0
      vendor/golang.org/x/sys/plan9/str.go
  55. 116
    0
      vendor/golang.org/x/sys/plan9/syscall.go
  56. 349
    0
      vendor/golang.org/x/sys/plan9/syscall_plan9.go
  57. 284
    0
      vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
  58. 284
    0
      vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
  59. 284
    0
      vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
  60. 49
    0
      vendor/golang.org/x/sys/plan9/zsysnum_plan9.go
  61. 1
    1
      vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
  62. 1
    1
      vendor/golang.org/x/sys/unix/asm_darwin_386.s
  63. 1
    1
      vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
  64. 1
    1
      vendor/golang.org/x/sys/unix/asm_darwin_arm.s
  65. 1
    1
      vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
  66. 1
    1
      vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
  67. 1
    1
      vendor/golang.org/x/sys/unix/asm_freebsd_386.s
  68. 1
    1
      vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
  69. 1
    1
      vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
  70. 1
    1
      vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
  71. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_386.s
  72. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_amd64.s
  73. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_arm.s
  74. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_arm64.s
  75. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
  76. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
  77. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
  78. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
  79. 1
    1
      vendor/golang.org/x/sys/unix/asm_linux_s390x.s
  80. 1
    1
      vendor/golang.org/x/sys/unix/asm_netbsd_386.s
  81. 1
    1
      vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
  82. 1
    1
      vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
  83. 1
    1
      vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
  84. 1
    1
      vendor/golang.org/x/sys/unix/asm_openbsd_386.s
  85. 1
    1
      vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
  86. 1
    1
      vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
  87. 1
    1
      vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s
  88. 1
    1
      vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s
  89. 1
    1
      vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
  90. 1
    1
      vendor/golang.org/x/sys/unix/endian_big.go
  91. 1
    1
      vendor/golang.org/x/sys/unix/endian_little.go
  92. 2
    0
      vendor/golang.org/x/sys/unix/mkerrors.sh
  93. 13
    0
      vendor/golang.org/x/sys/unix/syscall_dragonfly.go
  94. 1
    1
      vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
  95. 1
    1
      vendor/golang.org/x/sys/unix/syscall_linux_gc.go
  96. 1
    1
      vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
  97. 1
    1
      vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go
  98. 1
    1
      vendor/golang.org/x/sys/unix/syscall_unix_gc.go
  99. 1
    1
      vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
  100. 0
    0
      vendor/golang.org/x/sys/unix/zerrors_linux.go

+ 4
- 5
go.mod Zobrazit soubor

@@ -7,7 +7,7 @@ require (
7 7
 	github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962
8 8
 	github.com/dgrijalva/jwt-go v3.2.0+incompatible
9 9
 	github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
10
-	github.com/go-sql-driver/mysql v1.5.0
10
+	github.com/go-sql-driver/mysql v1.6.0
11 11
 	github.com/go-test/deep v1.0.6 // indirect
12 12
 	github.com/gorilla/websocket v1.4.2
13 13
 	github.com/goshuirc/irc-go v0.0.0-20210318074529-bdc2c2cd2fef
@@ -19,10 +19,9 @@ 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
24
-	golang.org/x/text v0.3.4
25
-	gopkg.in/yaml.v2 v2.3.0
22
+	golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc
23
+	golang.org/x/text v0.3.6
24
+	gopkg.in/yaml.v2 v2.4.0
26 25
 )
27 26
 
28 27
 replace github.com/gorilla/websocket => github.com/oragono/websocket v1.4.2-oragono1

+ 14
- 0
go.sum Zobrazit soubor

@@ -13,6 +13,8 @@ github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV
13 13
 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
14 14
 github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
15 15
 github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
16
+github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
17
+github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
16 18
 github.com/go-test/deep v1.0.6 h1:UHSEyLZUwX9Qoi99vVwvewiMC8mM2bf7XEM2nqvzEn8=
17 19
 github.com/go-test/deep v1.0.6/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=
18 20
 github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
@@ -103,9 +105,12 @@ github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208/go.mod h1:BzWtXXrXz
103 105
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
104 106
 golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=
105 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=
106 110
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
107 111
 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
108 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=
109 114
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
110 115
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
111 116
 golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -115,11 +120,18 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwg
115 120
 golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
116 121
 golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf h1:kt3wY1Lu5MJAnKTfoMR52Cu4gwvna4VTzNOiT8tY73s=
117 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=
118 127
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
119 128
 golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
120 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=
121 131
 golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
122 132
 golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
133
+golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
134
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
123 135
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
124 136
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
125 137
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -133,3 +145,5 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
133 145
 gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
134 146
 gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
135 147
 gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
148
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
149
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

+ 0
- 129
vendor/github.com/go-sql-driver/mysql/.travis.yml Zobrazit soubor

@@ -1,129 +0,0 @@
1
-sudo: false
2
-language: go
3
-go:
4
-  - 1.10.x
5
-  - 1.11.x
6
-  - 1.12.x
7
-  - 1.13.x
8
-  - master
9
-
10
-before_install:
11
-  - go get golang.org/x/tools/cmd/cover
12
-  - go get github.com/mattn/goveralls
13
-
14
-before_script:
15
-  - echo -e "[server]\ninnodb_log_file_size=256MB\ninnodb_buffer_pool_size=512MB\nmax_allowed_packet=16MB" | sudo tee -a /etc/mysql/my.cnf
16
-  - sudo service mysql restart
17
-  - .travis/wait_mysql.sh
18
-  - mysql -e 'create database gotest;'
19
-
20
-matrix:
21
-  include:
22
-    - env: DB=MYSQL8
23
-      sudo: required
24
-      dist: trusty
25
-      go: 1.10.x
26
-      services:
27
-        - docker
28
-      before_install:
29
-        - go get golang.org/x/tools/cmd/cover
30
-        - go get github.com/mattn/goveralls
31
-        - docker pull mysql:8.0
32
-        - docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=verysecret
33
-          mysql:8.0 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB --local-infile=1
34
-        - cp .travis/docker.cnf ~/.my.cnf
35
-        - .travis/wait_mysql.sh
36
-      before_script:
37
-        - export MYSQL_TEST_USER=gotest
38
-        - export MYSQL_TEST_PASS=secret
39
-        - export MYSQL_TEST_ADDR=127.0.0.1:3307
40
-        - export MYSQL_TEST_CONCURRENT=1
41
-
42
-    - env: DB=MYSQL57
43
-      sudo: required
44
-      dist: trusty
45
-      go: 1.10.x
46
-      services:
47
-        - docker
48
-      before_install:
49
-        - go get golang.org/x/tools/cmd/cover
50
-        - go get github.com/mattn/goveralls
51
-        - docker pull mysql:5.7
52
-        - docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=verysecret
53
-          mysql:5.7 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB --local-infile=1
54
-        - cp .travis/docker.cnf ~/.my.cnf
55
-        - .travis/wait_mysql.sh
56
-      before_script:
57
-        - export MYSQL_TEST_USER=gotest
58
-        - export MYSQL_TEST_PASS=secret
59
-        - export MYSQL_TEST_ADDR=127.0.0.1:3307
60
-        - export MYSQL_TEST_CONCURRENT=1
61
-
62
-    - env: DB=MARIA55
63
-      sudo: required
64
-      dist: trusty
65
-      go: 1.10.x
66
-      services:
67
-        - docker
68
-      before_install:
69
-        - go get golang.org/x/tools/cmd/cover
70
-        - go get github.com/mattn/goveralls
71
-        - docker pull mariadb:5.5
72
-        - docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=verysecret
73
-          mariadb:5.5 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB --local-infile=1
74
-        - cp .travis/docker.cnf ~/.my.cnf
75
-        - .travis/wait_mysql.sh
76
-      before_script:
77
-        - export MYSQL_TEST_USER=gotest
78
-        - export MYSQL_TEST_PASS=secret
79
-        - export MYSQL_TEST_ADDR=127.0.0.1:3307
80
-        - export MYSQL_TEST_CONCURRENT=1
81
-
82
-    - env: DB=MARIA10_1
83
-      sudo: required
84
-      dist: trusty
85
-      go: 1.10.x
86
-      services:
87
-        - docker
88
-      before_install:
89
-        - go get golang.org/x/tools/cmd/cover
90
-        - go get github.com/mattn/goveralls
91
-        - docker pull mariadb:10.1
92
-        - docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=verysecret
93
-          mariadb:10.1 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB --local-infile=1
94
-        - cp .travis/docker.cnf ~/.my.cnf
95
-        - .travis/wait_mysql.sh
96
-      before_script:
97
-        - export MYSQL_TEST_USER=gotest
98
-        - export MYSQL_TEST_PASS=secret
99
-        - export MYSQL_TEST_ADDR=127.0.0.1:3307
100
-        - export MYSQL_TEST_CONCURRENT=1
101
-
102
-    - os: osx
103
-      osx_image: xcode10.1
104
-      addons:
105
-        homebrew:
106
-          packages:
107
-            - mysql
108
-          update: true
109
-      go: 1.12.x
110
-      before_install:
111
-        - go get golang.org/x/tools/cmd/cover
112
-        - go get github.com/mattn/goveralls
113
-      before_script:
114
-        - echo -e "[server]\ninnodb_log_file_size=256MB\ninnodb_buffer_pool_size=512MB\nmax_allowed_packet=16MB\nlocal_infile=1" >> /usr/local/etc/my.cnf
115
-        - mysql.server start
116
-        - mysql -uroot -e 'CREATE USER gotest IDENTIFIED BY "secret"'
117
-        - mysql -uroot -e 'GRANT ALL ON *.* TO gotest'
118
-        - mysql -uroot -e 'create database gotest;'
119
-        - export MYSQL_TEST_USER=gotest
120
-        - export MYSQL_TEST_PASS=secret
121
-        - export MYSQL_TEST_ADDR=127.0.0.1:3306
122
-        - export MYSQL_TEST_CONCURRENT=1
123
-
124
-script:
125
-  - go test -v -covermode=count -coverprofile=coverage.out
126
-  - go vet ./...
127
-  - .travis/gofmt.sh
128
-after_script:
129
-  - $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci

+ 12
- 0
vendor/github.com/go-sql-driver/mysql/AUTHORS Zobrazit soubor

@@ -13,11 +13,15 @@
13 13
 
14 14
 Aaron Hopkins <go-sql-driver at die.net>
15 15
 Achille Roussel <achille.roussel at gmail.com>
16
+Alex Snast <alexsn at fb.com>
16 17
 Alexey Palazhchenko <alexey.palazhchenko at gmail.com>
17 18
 Andrew Reid <andrew.reid at tixtrack.com>
19
+Animesh Ray <mail.rayanimesh at gmail.com>
18 20
 Arne Hormann <arnehormann at gmail.com>
21
+Ariel Mashraki <ariel at mashraki.co.il>
19 22
 Asta Xie <xiemengjun at gmail.com>
20 23
 Bulat Gaifullin <gaifullinbf at gmail.com>
24
+Caine Jette <jette at alum.mit.edu>
21 25
 Carlos Nieto <jose.carlos at menteslibres.net>
22 26
 Chris Moos <chris at tech9computers.com>
23 27
 Craig Wilson <craiggwilson at gmail.com>
@@ -52,6 +56,7 @@ Julien Schmidt <go-sql-driver at julienschmidt.com>
52 56
 Justin Li <jli at j-li.net>
53 57
 Justin Nuß <nuss.justin at gmail.com>
54 58
 Kamil Dziedzic <kamil at klecza.pl>
59
+Kei Kamikawa <x00.x7f.x86 at gmail.com>
55 60
 Kevin Malachowski <kevin at chowski.com>
56 61
 Kieron Woodhouse <kieron.woodhouse at infosum.com>
57 62
 Lennart Rudolph <lrudolph at hmc.edu>
@@ -74,20 +79,26 @@ Reed Allman <rdallman10 at gmail.com>
74 79
 Richard Wilkes <wilkes at me.com>
75 80
 Robert Russell <robert at rrbrussell.com>
76 81
 Runrioter Wung <runrioter at gmail.com>
82
+Sho Iizuka <sho.i518 at gmail.com>
83
+Sho Ikeda <suicaicoca at gmail.com>
77 84
 Shuode Li <elemount at qq.com>
78 85
 Simon J Mudd <sjmudd at pobox.com>
79 86
 Soroush Pour <me at soroushjp.com>
80 87
 Stan Putrya <root.vagner at gmail.com>
81 88
 Stanley Gunawan <gunawan.stanley at gmail.com>
82 89
 Steven Hartland <steven.hartland at multiplay.co.uk>
90
+Tan Jinhua <312841925 at qq.com>
83 91
 Thomas Wodarek <wodarekwebpage at gmail.com>
84 92
 Tim Ruffles <timruffles at gmail.com>
85 93
 Tom Jenkinson <tom at tjenkinson.me>
86 94
 Vladimir Kovpak <cn007b at gmail.com>
95
+Vladyslav Zhelezniak <zhvladi at gmail.com>
87 96
 Xiangyu Hu <xiangyu.hu at outlook.com>
88 97
 Xiaobing Jiang <s7v7nislands at gmail.com>
89 98
 Xiuming Chen <cc at cxm.cc>
99
+Xuehong Chan <chanxuehong at gmail.com>
90 100
 Zhenye Xie <xiezhenye at gmail.com>
101
+Zhixin Wen <john.wenzhixin at gmail.com>
91 102
 
92 103
 # Organizations
93 104
 
@@ -103,3 +114,4 @@ Multiplay Ltd.
103 114
 Percona LLC
104 115
 Pivotal Inc.
105 116
 Stripe Inc.
117
+Zendesk Inc.

+ 26
- 0
vendor/github.com/go-sql-driver/mysql/CHANGELOG.md Zobrazit soubor

@@ -1,3 +1,29 @@
1
+## Version 1.6 (2021-04-01)
2
+
3
+Changes:
4
+
5
+  - Migrate the CI service from travis-ci to GitHub Actions (#1176, #1183, #1190)
6
+  - `NullTime` is deprecated (#960, #1144)
7
+  - Reduce allocations when building SET command (#1111)
8
+  - Performance improvement for time formatting (#1118)
9
+  - Performance improvement for time parsing (#1098, #1113)
10
+
11
+New Features:
12
+
13
+  - Implement `driver.Validator` interface (#1106, #1174)
14
+  - Support returning `uint64` from `Valuer` in `ConvertValue` (#1143)
15
+  - Add `json.RawMessage` for converter and prepared statement (#1059)
16
+  - Interpolate `json.RawMessage` as `string` (#1058)
17
+  - Implements `CheckNamedValue` (#1090)
18
+
19
+Bugfixes:
20
+
21
+  - Stop rounding times (#1121, #1172)
22
+  - Put zero filler into the SSL handshake packet (#1066)
23
+  - Fix checking cancelled connections back into the connection pool (#1095)
24
+  - Fix remove last 0 byte for mysql_old_password when password is empty (#1133)
25
+
26
+
1 27
 ## Version 1.5 (2020-01-07)
2 28
 
3 29
 Changes:

+ 31
- 12
vendor/github.com/go-sql-driver/mysql/README.md Zobrazit soubor

@@ -35,7 +35,7 @@ A MySQL-Driver for Go's [database/sql](https://golang.org/pkg/database/sql/) pac
35 35
   * Supports queries larger than 16MB
36 36
   * Full [`sql.RawBytes`](https://golang.org/pkg/database/sql/#RawBytes) support.
37 37
   * Intelligent `LONG DATA` handling in prepared statements
38
-  * Secure `LOAD DATA LOCAL INFILE` support with file Whitelisting and `io.Reader` support
38
+  * Secure `LOAD DATA LOCAL INFILE` support with file allowlisting and `io.Reader` support
39 39
   * Optional `time.Time` parsing
40 40
   * Optional placeholder interpolation
41 41
 
@@ -56,15 +56,37 @@ Make sure [Git is installed](https://git-scm.com/downloads) on your machine and
56 56
 _Go MySQL Driver_ is an implementation of Go's `database/sql/driver` interface. You only need to import the driver and can use the full [`database/sql`](https://golang.org/pkg/database/sql/) API then.
57 57
 
58 58
 Use `mysql` as `driverName` and a valid [DSN](#dsn-data-source-name)  as `dataSourceName`:
59
+
59 60
 ```go
60
-import "database/sql"
61
-import _ "github.com/go-sql-driver/mysql"
61
+import (
62
+	"database/sql"
63
+	"time"
64
+
65
+	_ "github.com/go-sql-driver/mysql"
66
+)
67
+
68
+// ...
62 69
 
63 70
 db, err := sql.Open("mysql", "user:password@/dbname")
71
+if err != nil {
72
+	panic(err)
73
+}
74
+// See "Important settings" section.
75
+db.SetConnMaxLifetime(time.Minute * 3)
76
+db.SetMaxOpenConns(10)
77
+db.SetMaxIdleConns(10)
64 78
 ```
65 79
 
66 80
 [Examples are available in our Wiki](https://github.com/go-sql-driver/mysql/wiki/Examples "Go-MySQL-Driver Examples").
67 81
 
82
+### Important settings
83
+
84
+`db.SetConnMaxLifetime()` is required to ensure connections are closed by the driver safely before connection is closed by MySQL server, OS, or other middlewares. Since some middlewares close idle connections by 5 minutes, we recommend timeout shorter than 5 minutes. This setting helps load balancing and changing system variables too.
85
+
86
+`db.SetMaxOpenConns()` is highly recommended to limit the number of connection used by the application. There is no recommended limit number because it depends on application and MySQL server.
87
+
88
+`db.SetMaxIdleConns()` is recommended to be set same to (or greater than) `db.SetMaxOpenConns()`. When it is smaller than `SetMaxOpenConns()`, connections can be opened and closed very frequently than you expect. Idle connections can be closed by the `db.SetConnMaxLifetime()`. If you want to close idle connections more rapidly, you can use `db.SetConnMaxIdleTime()` since Go 1.15.
89
+
68 90
 
69 91
 ### DSN (Data Source Name)
70 92
 
@@ -122,7 +144,7 @@ Valid Values:   true, false
122 144
 Default:        false
123 145
 ```
124 146
 
125
-`allowAllFiles=true` disables the file Whitelist for `LOAD DATA LOCAL INFILE` and allows *all* files.
147
+`allowAllFiles=true` disables the file allowlist for `LOAD DATA LOCAL INFILE` and allows *all* files.
126 148
 [*Might be insecure!*](http://dev.mysql.com/doc/refman/5.7/en/load-data-local.html)
127 149
 
128 150
 ##### `allowCleartextPasswords`
@@ -133,7 +155,7 @@ Valid Values:   true, false
133 155
 Default:        false
134 156
 ```
135 157
 
136
-`allowCleartextPasswords=true` allows using the [cleartext client side plugin](http://dev.mysql.com/doc/en/cleartext-authentication-plugin.html) if required by an account, such as one defined with the [PAM authentication plugin](http://dev.mysql.com/doc/en/pam-authentication-plugin.html). Sending passwords in clear text may be a security problem in some configurations. To avoid problems if there is any possibility that the password would be intercepted, clients should connect to MySQL Server using a method that protects the password. Possibilities include [TLS / SSL](#tls), IPsec, or a private network.
158
+`allowCleartextPasswords=true` allows using the [cleartext client side plugin](https://dev.mysql.com/doc/en/cleartext-pluggable-authentication.html) if required by an account, such as one defined with the [PAM authentication plugin](http://dev.mysql.com/doc/en/pam-authentication-plugin.html). Sending passwords in clear text may be a security problem in some configurations. To avoid problems if there is any possibility that the password would be intercepted, clients should connect to MySQL Server using a method that protects the password. Possibilities include [TLS / SSL](#tls), IPsec, or a private network.
137 159
 
138 160
 ##### `allowNativePasswords`
139 161
 
@@ -230,7 +252,7 @@ Default:        false
230 252
 
231 253
 If `interpolateParams` is true, placeholders (`?`) in calls to `db.Query()` and `db.Exec()` are interpolated into a single query string with given parameters. This reduces the number of roundtrips, since the driver has to prepare a statement, execute it with given parameters and close the statement again with `interpolateParams=false`.
232 254
 
233
-*This can not be used together with the multibyte encodings BIG5, CP932, GB2312, GBK or SJIS. These are blacklisted as they may [introduce a SQL injection vulnerability](http://stackoverflow.com/a/12118602/3430118)!*
255
+*This can not be used together with the multibyte encodings BIG5, CP932, GB2312, GBK or SJIS. These are rejected as they may [introduce a SQL injection vulnerability](http://stackoverflow.com/a/12118602/3430118)!*
234 256
 
235 257
 ##### `loc`
236 258
 
@@ -376,7 +398,7 @@ Rules:
376 398
 Examples:
377 399
   * `autocommit=1`: `SET autocommit=1`
378 400
   * [`time_zone=%27Europe%2FParis%27`](https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html): `SET time_zone='Europe/Paris'`
379
-  * [`tx_isolation=%27REPEATABLE-READ%27`](https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_tx_isolation): `SET tx_isolation='REPEATABLE-READ'`
401
+  * [`transaction_isolation=%27REPEATABLE-READ%27`](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_transaction_isolation): `SET transaction_isolation='REPEATABLE-READ'`
380 402
 
381 403
 
382 404
 #### Examples
@@ -445,7 +467,7 @@ For this feature you need direct access to the package. Therefore you must chang
445 467
 import "github.com/go-sql-driver/mysql"
446 468
 ```
447 469
 
448
-Files must be whitelisted by registering them with `mysql.RegisterLocalFile(filepath)` (recommended) or the Whitelist check must be deactivated by using the DSN parameter `allowAllFiles=true` ([*Might be insecure!*](http://dev.mysql.com/doc/refman/5.7/en/load-data-local.html)).
470
+Files must be explicitly allowed by registering them with `mysql.RegisterLocalFile(filepath)` (recommended) or the allowlist check must be deactivated by using the DSN parameter `allowAllFiles=true` ([*Might be insecure!*](http://dev.mysql.com/doc/refman/5.7/en/load-data-local.html)).
449 471
 
450 472
 To use a `io.Reader` a handler function must be registered with `mysql.RegisterReaderHandler(name, handler)` which returns a `io.Reader` or `io.ReadCloser`. The Reader is available with the filepath `Reader::<name>` then. Choose different names for different handlers and `DeregisterReaderHandler` when you don't need it anymore.
451 473
 
@@ -459,8 +481,6 @@ However, many want to scan MySQL `DATE` and `DATETIME` values into `time.Time` v
459 481
 
460 482
 **Caution:** As of Go 1.1, this makes `time.Time` the only variable type you can scan `DATE` and `DATETIME` values into. This breaks for example [`sql.RawBytes` support](https://github.com/go-sql-driver/mysql/wiki/Examples#rawbytes).
461 483
 
462
-Alternatively you can use the [`NullTime`](https://godoc.org/github.com/go-sql-driver/mysql#NullTime) type as the scan destination, which works with both `time.Time` and `string` / `[]byte`.
463
-
464 484
 
465 485
 ### Unicode support
466 486
 Since version 1.5 Go-MySQL-Driver automatically uses the collation ` utf8mb4_general_ci` by default.
@@ -477,7 +497,7 @@ To run the driver tests you may need to adjust the configuration. See the [Testi
477 497
 Go-MySQL-Driver is not feature-complete yet. Your help is very appreciated.
478 498
 If you want to contribute, you can work on an [open issue](https://github.com/go-sql-driver/mysql/issues?state=open) or review a [pull request](https://github.com/go-sql-driver/mysql/pulls).
479 499
 
480
-See the [Contribution Guidelines](https://github.com/go-sql-driver/mysql/blob/master/CONTRIBUTING.md) for details.
500
+See the [Contribution Guidelines](https://github.com/go-sql-driver/mysql/blob/master/.github/CONTRIBUTING.md) for details.
481 501
 
482 502
 ---------------------------------------
483 503
 
@@ -498,4 +518,3 @@ Please read the [MPL 2.0 FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/) if you
498 518
 You can read the full terms here: [LICENSE](https://raw.github.com/go-sql-driver/mysql/master/LICENSE).
499 519
 
500 520
 ![Go Gopher and MySQL Dolphin](https://raw.github.com/wiki/go-sql-driver/mysql/go-mysql-driver_m.jpg "Golang Gopher transporting the MySQL Dolphin in a wheelbarrow")
501
-

+ 8
- 5
vendor/github.com/go-sql-driver/mysql/auth.go Zobrazit soubor

@@ -15,6 +15,7 @@ import (
15 15
 	"crypto/sha256"
16 16
 	"crypto/x509"
17 17
 	"encoding/pem"
18
+	"fmt"
18 19
 	"sync"
19 20
 )
20 21
 
@@ -136,10 +137,6 @@ func pwHash(password []byte) (result [2]uint32) {
136 137
 
137 138
 // Hash password using insecure pre 4.1 method
138 139
 func scrambleOldPassword(scramble []byte, password string) []byte {
139
-	if len(password) == 0 {
140
-		return nil
141
-	}
142
-
143 140
 	scramble = scramble[:8]
144 141
 
145 142
 	hashPw := pwHash([]byte(password))
@@ -247,6 +244,9 @@ func (mc *mysqlConn) auth(authData []byte, plugin string) ([]byte, error) {
247 244
 		if !mc.cfg.AllowOldPasswords {
248 245
 			return nil, ErrOldPassword
249 246
 		}
247
+		if len(mc.cfg.Passwd) == 0 {
248
+			return nil, nil
249
+		}
250 250
 		// Note: there are edge cases where this should work but doesn't;
251 251
 		// this is currently "wontfix":
252 252
 		// https://github.com/go-sql-driver/mysql/issues/184
@@ -372,7 +372,10 @@ func (mc *mysqlConn) handleAuthResult(oldAuthData []byte, plugin string) error {
372 372
 							return err
373 373
 						}
374 374
 
375
-						block, _ := pem.Decode(data[1:])
375
+						block, rest := pem.Decode(data[1:])
376
+						if block == nil {
377
+							return fmt.Errorf("No Pem data found, data: %s", rest)
378
+						}
376 379
 						pkix, err := x509.ParsePKIXPublicKey(block.Bytes)
377 380
 						if err != nil {
378 381
 							return err

+ 1
- 1
vendor/github.com/go-sql-driver/mysql/collations.go Zobrazit soubor

@@ -247,7 +247,7 @@ var collations = map[string]byte{
247 247
 	"utf8mb4_0900_ai_ci":       255,
248 248
 }
249 249
 
250
-// A blacklist of collations which is unsafe to interpolate parameters.
250
+// A denylist of collations which is unsafe to interpolate parameters.
251 251
 // These multibyte encodings may contains 0x5c (`\`) in their trailing bytes.
252 252
 var unsafeCollations = map[string]bool{
253 253
 	"big5_chinese_ci":        true,

+ 42
- 43
vendor/github.com/go-sql-driver/mysql/connection.go Zobrazit soubor

@@ -12,6 +12,7 @@ import (
12 12
 	"context"
13 13
 	"database/sql"
14 14
 	"database/sql/driver"
15
+	"encoding/json"
15 16
 	"io"
16 17
 	"net"
17 18
 	"strconv"
@@ -46,9 +47,10 @@ type mysqlConn struct {
46 47
 
47 48
 // Handles parameters set in DSN after the connection is established
48 49
 func (mc *mysqlConn) handleParams() (err error) {
50
+	var cmdSet strings.Builder
49 51
 	for param, val := range mc.cfg.Params {
50 52
 		switch param {
51
-		// Charset
53
+		// Charset: character_set_connection, character_set_client, character_set_results
52 54
 		case "charset":
53 55
 			charsets := strings.Split(val, ",")
54 56
 			for i := range charsets {
@@ -62,12 +64,25 @@ func (mc *mysqlConn) handleParams() (err error) {
62 64
 				return
63 65
 			}
64 66
 
65
-		// System Vars
67
+		// Other system vars accumulated in a single SET command
66 68
 		default:
67
-			err = mc.exec("SET " + param + "=" + val + "")
68
-			if err != nil {
69
-				return
69
+			if cmdSet.Len() == 0 {
70
+				// Heuristic: 29 chars for each other key=value to reduce reallocations
71
+				cmdSet.Grow(4 + len(param) + 1 + len(val) + 30*(len(mc.cfg.Params)-1))
72
+				cmdSet.WriteString("SET ")
73
+			} else {
74
+				cmdSet.WriteByte(',')
70 75
 			}
76
+			cmdSet.WriteString(param)
77
+			cmdSet.WriteByte('=')
78
+			cmdSet.WriteString(val)
79
+		}
80
+	}
81
+
82
+	if cmdSet.Len() > 0 {
83
+		err = mc.exec(cmdSet.String())
84
+		if err != nil {
85
+			return
71 86
 		}
72 87
 	}
73 88
 
@@ -230,47 +245,21 @@ func (mc *mysqlConn) interpolateParams(query string, args []driver.Value) (strin
230 245
 			if v.IsZero() {
231 246
 				buf = append(buf, "'0000-00-00'"...)
232 247
 			} else {
233
-				v := v.In(mc.cfg.Loc)
234
-				v = v.Add(time.Nanosecond * 500) // To round under microsecond
235
-				year := v.Year()
236
-				year100 := year / 100
237
-				year1 := year % 100
238
-				month := v.Month()
239
-				day := v.Day()
240
-				hour := v.Hour()
241
-				minute := v.Minute()
242
-				second := v.Second()
243
-				micro := v.Nanosecond() / 1000
244
-
245
-				buf = append(buf, []byte{
246
-					'\'',
247
-					digits10[year100], digits01[year100],
248
-					digits10[year1], digits01[year1],
249
-					'-',
250
-					digits10[month], digits01[month],
251
-					'-',
252
-					digits10[day], digits01[day],
253
-					' ',
254
-					digits10[hour], digits01[hour],
255
-					':',
256
-					digits10[minute], digits01[minute],
257
-					':',
258
-					digits10[second], digits01[second],
259
-				}...)
260
-
261
-				if micro != 0 {
262
-					micro10000 := micro / 10000
263
-					micro100 := micro / 100 % 100
264
-					micro1 := micro % 100
265
-					buf = append(buf, []byte{
266
-						'.',
267
-						digits10[micro10000], digits01[micro10000],
268
-						digits10[micro100], digits01[micro100],
269
-						digits10[micro1], digits01[micro1],
270
-					}...)
248
+				buf = append(buf, '\'')
249
+				buf, err = appendDateTime(buf, v.In(mc.cfg.Loc))
250
+				if err != nil {
251
+					return "", err
271 252
 				}
272 253
 				buf = append(buf, '\'')
273 254
 			}
255
+		case json.RawMessage:
256
+			buf = append(buf, '\'')
257
+			if mc.status&statusNoBackslashEscapes == 0 {
258
+				buf = escapeBytesBackslash(buf, v)
259
+			} else {
260
+				buf = escapeBytesQuotes(buf, v)
261
+			}
262
+			buf = append(buf, '\'')
274 263
 		case []byte:
275 264
 			if v == nil {
276 265
 				buf = append(buf, "NULL"...)
@@ -480,6 +469,10 @@ func (mc *mysqlConn) Ping(ctx context.Context) (err error) {
480 469
 
481 470
 // BeginTx implements driver.ConnBeginTx interface
482 471
 func (mc *mysqlConn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) {
472
+	if mc.closed.IsSet() {
473
+		return nil, driver.ErrBadConn
474
+	}
475
+
483 476
 	if err := mc.watchCancel(ctx); err != nil {
484 477
 		return nil, err
485 478
 	}
@@ -649,3 +642,9 @@ func (mc *mysqlConn) ResetSession(ctx context.Context) error {
649 642
 	mc.reset = true
650 643
 	return nil
651 644
 }
645
+
646
+// IsValid implements driver.Validator interface
647
+// (From Go 1.15)
648
+func (mc *mysqlConn) IsValid() bool {
649
+	return !mc.closed.IsSet()
650
+}

+ 1
- 1
vendor/github.com/go-sql-driver/mysql/dsn.go Zobrazit soubor

@@ -375,7 +375,7 @@ func parseDSNParams(cfg *Config, params string) (err error) {
375 375
 
376 376
 		// cfg params
377 377
 		switch value := param[1]; param[0] {
378
-		// Disable INFILE whitelist / enable all files
378
+		// Disable INFILE allowlist / enable all files
379 379
 		case "allowAllFiles":
380 380
 			var isBool bool
381 381
 			cfg.AllowAllFiles, isBool = readBool(value)

+ 1
- 1
vendor/github.com/go-sql-driver/mysql/fields.go Zobrazit soubor

@@ -106,7 +106,7 @@ var (
106 106
 	scanTypeInt64     = reflect.TypeOf(int64(0))
107 107
 	scanTypeNullFloat = reflect.TypeOf(sql.NullFloat64{})
108 108
 	scanTypeNullInt   = reflect.TypeOf(sql.NullInt64{})
109
-	scanTypeNullTime  = reflect.TypeOf(NullTime{})
109
+	scanTypeNullTime  = reflect.TypeOf(nullTime{})
110 110
 	scanTypeUint8     = reflect.TypeOf(uint8(0))
111 111
 	scanTypeUint16    = reflect.TypeOf(uint16(0))
112 112
 	scanTypeUint32    = reflect.TypeOf(uint32(0))

+ 24
- 0
vendor/github.com/go-sql-driver/mysql/fuzz.go Zobrazit soubor

@@ -0,0 +1,24 @@
1
+// Go MySQL Driver - A MySQL-Driver for Go's database/sql package.
2
+//
3
+// Copyright 2020 The Go-MySQL-Driver Authors. All rights reserved.
4
+//
5
+// This Source Code Form is subject to the terms of the Mozilla Public
6
+// License, v. 2.0. If a copy of the MPL was not distributed with this file,
7
+// You can obtain one at http://mozilla.org/MPL/2.0/.
8
+
9
+// +build gofuzz
10
+
11
+package mysql
12
+
13
+import (
14
+	"database/sql"
15
+)
16
+
17
+func Fuzz(data []byte) int {
18
+	db, err := sql.Open("mysql", string(data))
19
+	if err != nil {
20
+		return 0
21
+	}
22
+	db.Close()
23
+	return 1
24
+}

+ 2
- 2
vendor/github.com/go-sql-driver/mysql/infile.go Zobrazit soubor

@@ -23,7 +23,7 @@ var (
23 23
 	readerRegisterLock sync.RWMutex
24 24
 )
25 25
 
26
-// RegisterLocalFile adds the given file to the file whitelist,
26
+// RegisterLocalFile adds the given file to the file allowlist,
27 27
 // so that it can be used by "LOAD DATA LOCAL INFILE <filepath>".
28 28
 // Alternatively you can allow the use of all local files with
29 29
 // the DSN parameter 'allowAllFiles=true'
@@ -45,7 +45,7 @@ func RegisterLocalFile(filePath string) {
45 45
 	fileRegisterLock.Unlock()
46 46
 }
47 47
 
48
-// DeregisterLocalFile removes the given filepath from the whitelist.
48
+// DeregisterLocalFile removes the given filepath from the allowlist.
49 49
 func DeregisterLocalFile(filePath string) {
50 50
 	fileRegisterLock.Lock()
51 51
 	delete(fileRegister, strings.Trim(filePath, `"`))

+ 2
- 2
vendor/github.com/go-sql-driver/mysql/nulltime.go Zobrazit soubor

@@ -28,11 +28,11 @@ func (nt *NullTime) Scan(value interface{}) (err error) {
28 28
 		nt.Time, nt.Valid = v, true
29 29
 		return
30 30
 	case []byte:
31
-		nt.Time, err = parseDateTime(string(v), time.UTC)
31
+		nt.Time, err = parseDateTime(v, time.UTC)
32 32
 		nt.Valid = (err == nil)
33 33
 		return
34 34
 	case string:
35
-		nt.Time, err = parseDateTime(v, time.UTC)
35
+		nt.Time, err = parseDateTime([]byte(v), time.UTC)
36 36
 		nt.Valid = (err == nil)
37 37
 		return
38 38
 	}

+ 9
- 0
vendor/github.com/go-sql-driver/mysql/nulltime_go113.go Zobrazit soubor

@@ -28,4 +28,13 @@ import (
28 28
 //  }
29 29
 //
30 30
 // This NullTime implementation is not driver-specific
31
+//
32
+// Deprecated: NullTime doesn't honor the loc DSN parameter.
33
+// NullTime.Scan interprets a time as UTC, not the loc DSN parameter.
34
+// Use sql.NullTime instead.
31 35
 type NullTime sql.NullTime
36
+
37
+// for internal use.
38
+// the mysql package uses sql.NullTime if it is available.
39
+// if not, the package uses mysql.NullTime.
40
+type nullTime = sql.NullTime // sql.NullTime is available

+ 5
- 0
vendor/github.com/go-sql-driver/mysql/nulltime_legacy.go Zobrazit soubor

@@ -32,3 +32,8 @@ type NullTime struct {
32 32
 	Time  time.Time
33 33
 	Valid bool // Valid is true if Time is not NULL
34 34
 }
35
+
36
+// for internal use.
37
+// the mysql package uses sql.NullTime if it is available.
38
+// if not, the package uses mysql.NullTime.
39
+type nullTime = NullTime // sql.NullTime is not available

+ 15
- 8
vendor/github.com/go-sql-driver/mysql/packets.go Zobrazit soubor

@@ -13,6 +13,7 @@ import (
13 13
 	"crypto/tls"
14 14
 	"database/sql/driver"
15 15
 	"encoding/binary"
16
+	"encoding/json"
16 17
 	"errors"
17 18
 	"fmt"
18 19
 	"io"
@@ -348,6 +349,12 @@ func (mc *mysqlConn) writeHandshakeResponsePacket(authResp []byte, plugin string
348 349
 		return errors.New("unknown collation")
349 350
 	}
350 351
 
352
+	// Filler [23 bytes] (all 0x00)
353
+	pos := 13
354
+	for ; pos < 13+23; pos++ {
355
+		data[pos] = 0
356
+	}
357
+
351 358
 	// SSL Connection Request Packet
352 359
 	// http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::SSLRequest
353 360
 	if mc.cfg.tls != nil {
@@ -366,12 +373,6 @@ func (mc *mysqlConn) writeHandshakeResponsePacket(authResp []byte, plugin string
366 373
 		mc.buf.nc = tlsConn
367 374
 	}
368 375
 
369
-	// Filler [23 bytes] (all 0x00)
370
-	pos := 13
371
-	for ; pos < 13+23; pos++ {
372
-		data[pos] = 0
373
-	}
374
-
375 376
 	// User [null terminated string]
376 377
 	if len(mc.cfg.User) > 0 {
377 378
 		pos += copy(data[pos:], mc.cfg.User)
@@ -777,7 +778,7 @@ func (rows *textRows) readRow(dest []driver.Value) error {
777 778
 					case fieldTypeTimestamp, fieldTypeDateTime,
778 779
 						fieldTypeDate, fieldTypeNewDate:
779 780
 						dest[i], err = parseDateTime(
780
-							string(dest[i].([]byte)),
781
+							dest[i].([]byte),
781 782
 							mc.cfg.Loc,
782 783
 						)
783 784
 						if err == nil {
@@ -1003,6 +1004,9 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1003 1004
 				continue
1004 1005
 			}
1005 1006
 
1007
+			if v, ok := arg.(json.RawMessage); ok {
1008
+				arg = []byte(v)
1009
+			}
1006 1010
 			// cache types and values
1007 1011
 			switch v := arg.(type) {
1008 1012
 			case int64:
@@ -1112,7 +1116,10 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
1112 1116
 				if v.IsZero() {
1113 1117
 					b = append(b, "0000-00-00"...)
1114 1118
 				} else {
1115
-					b = v.In(mc.cfg.Loc).AppendFormat(b, timeFormat)
1119
+					b, err = appendDateTime(b, v.In(mc.cfg.Loc))
1120
+					if err != nil {
1121
+						return err
1122
+					}
1116 1123
 				}
1117 1124
 
1118 1125
 				paramValues = appendLengthEncodedInteger(paramValues,

+ 23
- 7
vendor/github.com/go-sql-driver/mysql/statement.go Zobrazit soubor

@@ -10,6 +10,7 @@ package mysql
10 10
 
11 11
 import (
12 12
 	"database/sql/driver"
13
+	"encoding/json"
13 14
 	"fmt"
14 15
 	"io"
15 16
 	"reflect"
@@ -43,6 +44,11 @@ func (stmt *mysqlStmt) ColumnConverter(idx int) driver.ValueConverter {
43 44
 	return converter{}
44 45
 }
45 46
 
47
+func (stmt *mysqlStmt) CheckNamedValue(nv *driver.NamedValue) (err error) {
48
+	nv.Value, err = converter{}.ConvertValue(nv.Value)
49
+	return
50
+}
51
+
46 52
 func (stmt *mysqlStmt) Exec(args []driver.Value) (driver.Result, error) {
47 53
 	if stmt.mc.closed.IsSet() {
48 54
 		errLog.Print(ErrInvalidConn)
@@ -129,6 +135,8 @@ func (stmt *mysqlStmt) query(args []driver.Value) (*binaryRows, error) {
129 135
 	return rows, err
130 136
 }
131 137
 
138
+var jsonType = reflect.TypeOf(json.RawMessage{})
139
+
132 140
 type converter struct{}
133 141
 
134 142
 // ConvertValue mirrors the reference/default converter in database/sql/driver
@@ -146,12 +154,17 @@ func (c converter) ConvertValue(v interface{}) (driver.Value, error) {
146 154
 		if err != nil {
147 155
 			return nil, err
148 156
 		}
149
-		if !driver.IsValue(sv) {
150
-			return nil, fmt.Errorf("non-Value type %T returned from Value", sv)
157
+		if driver.IsValue(sv) {
158
+			return sv, nil
151 159
 		}
152
-		return sv, nil
160
+		// A value returend from the Valuer interface can be "a type handled by
161
+		// a database driver's NamedValueChecker interface" so we should accept
162
+		// uint64 here as well.
163
+		if u, ok := sv.(uint64); ok {
164
+			return u, nil
165
+		}
166
+		return nil, fmt.Errorf("non-Value type %T returned from Value", sv)
153 167
 	}
154
-
155 168
 	rv := reflect.ValueOf(v)
156 169
 	switch rv.Kind() {
157 170
 	case reflect.Ptr:
@@ -170,11 +183,14 @@ func (c converter) ConvertValue(v interface{}) (driver.Value, error) {
170 183
 	case reflect.Bool:
171 184
 		return rv.Bool(), nil
172 185
 	case reflect.Slice:
173
-		ek := rv.Type().Elem().Kind()
174
-		if ek == reflect.Uint8 {
186
+		switch t := rv.Type(); {
187
+		case t == jsonType:
188
+			return v, nil
189
+		case t.Elem().Kind() == reflect.Uint8:
175 190
 			return rv.Bytes(), nil
191
+		default:
192
+			return nil, fmt.Errorf("unsupported type %T, a slice of %s", v, t.Elem().Kind())
176 193
 		}
177
-		return nil, fmt.Errorf("unsupported type %T, a slice of %s", v, ek)
178 194
 	case reflect.String:
179 195
 		return rv.String(), nil
180 196
 	}

+ 181
- 14
vendor/github.com/go-sql-driver/mysql/utils.go Zobrazit soubor

@@ -106,27 +106,136 @@ func readBool(input string) (value bool, valid bool) {
106 106
 *                           Time related utils                                *
107 107
 ******************************************************************************/
108 108
 
109
-func parseDateTime(str string, loc *time.Location) (t time.Time, err error) {
110
-	base := "0000-00-00 00:00:00.0000000"
111
-	switch len(str) {
109
+func parseDateTime(b []byte, loc *time.Location) (time.Time, error) {
110
+	const base = "0000-00-00 00:00:00.000000"
111
+	switch len(b) {
112 112
 	case 10, 19, 21, 22, 23, 24, 25, 26: // up to "YYYY-MM-DD HH:MM:SS.MMMMMM"
113
-		if str == base[:len(str)] {
114
-			return
113
+		if string(b) == base[:len(b)] {
114
+			return time.Time{}, nil
115 115
 		}
116
-		t, err = time.Parse(timeFormat[:len(str)], str)
116
+
117
+		year, err := parseByteYear(b)
118
+		if err != nil {
119
+			return time.Time{}, err
120
+		}
121
+		if year <= 0 {
122
+			year = 1
123
+		}
124
+
125
+		if b[4] != '-' {
126
+			return time.Time{}, fmt.Errorf("bad value for field: `%c`", b[4])
127
+		}
128
+
129
+		m, err := parseByte2Digits(b[5], b[6])
130
+		if err != nil {
131
+			return time.Time{}, err
132
+		}
133
+		if m <= 0 {
134
+			m = 1
135
+		}
136
+		month := time.Month(m)
137
+
138
+		if b[7] != '-' {
139
+			return time.Time{}, fmt.Errorf("bad value for field: `%c`", b[7])
140
+		}
141
+
142
+		day, err := parseByte2Digits(b[8], b[9])
143
+		if err != nil {
144
+			return time.Time{}, err
145
+		}
146
+		if day <= 0 {
147
+			day = 1
148
+		}
149
+		if len(b) == 10 {
150
+			return time.Date(year, month, day, 0, 0, 0, 0, loc), nil
151
+		}
152
+
153
+		if b[10] != ' ' {
154
+			return time.Time{}, fmt.Errorf("bad value for field: `%c`", b[10])
155
+		}
156
+
157
+		hour, err := parseByte2Digits(b[11], b[12])
158
+		if err != nil {
159
+			return time.Time{}, err
160
+		}
161
+		if b[13] != ':' {
162
+			return time.Time{}, fmt.Errorf("bad value for field: `%c`", b[13])
163
+		}
164
+
165
+		min, err := parseByte2Digits(b[14], b[15])
166
+		if err != nil {
167
+			return time.Time{}, err
168
+		}
169
+		if b[16] != ':' {
170
+			return time.Time{}, fmt.Errorf("bad value for field: `%c`", b[16])
171
+		}
172
+
173
+		sec, err := parseByte2Digits(b[17], b[18])
174
+		if err != nil {
175
+			return time.Time{}, err
176
+		}
177
+		if len(b) == 19 {
178
+			return time.Date(year, month, day, hour, min, sec, 0, loc), nil
179
+		}
180
+
181
+		if b[19] != '.' {
182
+			return time.Time{}, fmt.Errorf("bad value for field: `%c`", b[19])
183
+		}
184
+		nsec, err := parseByteNanoSec(b[20:])
185
+		if err != nil {
186
+			return time.Time{}, err
187
+		}
188
+		return time.Date(year, month, day, hour, min, sec, nsec, loc), nil
117 189
 	default:
118
-		err = fmt.Errorf("invalid time string: %s", str)
119
-		return
190
+		return time.Time{}, fmt.Errorf("invalid time bytes: %s", b)
120 191
 	}
192
+}
121 193
 
122
-	// Adjust location
123
-	if err == nil && loc != time.UTC {
124
-		y, mo, d := t.Date()
125
-		h, mi, s := t.Clock()
126
-		t, err = time.Date(y, mo, d, h, mi, s, t.Nanosecond(), loc), nil
194
+func parseByteYear(b []byte) (int, error) {
195
+	year, n := 0, 1000
196
+	for i := 0; i < 4; i++ {
197
+		v, err := bToi(b[i])
198
+		if err != nil {
199
+			return 0, err
200
+		}
201
+		year += v * n
202
+		n = n / 10
127 203
 	}
204
+	return year, nil
205
+}
128 206
 
129
-	return
207
+func parseByte2Digits(b1, b2 byte) (int, error) {
208
+	d1, err := bToi(b1)
209
+	if err != nil {
210
+		return 0, err
211
+	}
212
+	d2, err := bToi(b2)
213
+	if err != nil {
214
+		return 0, err
215
+	}
216
+	return d1*10 + d2, nil
217
+}
218
+
219
+func parseByteNanoSec(b []byte) (int, error) {
220
+	ns, digit := 0, 100000 // max is 6-digits
221
+	for i := 0; i < len(b); i++ {
222
+		v, err := bToi(b[i])
223
+		if err != nil {
224
+			return 0, err
225
+		}
226
+		ns += v * digit
227
+		digit /= 10
228
+	}
229
+	// nanoseconds has 10-digits. (needs to scale digits)
230
+	// 10 - 6 = 4, so we have to multiple 1000.
231
+	return ns * 1000, nil
232
+}
233
+
234
+func bToi(b byte) (int, error) {
235
+	if b < '0' || b > '9' {
236
+		return 0, errors.New("not [0-9]")
237
+	}
238
+	return int(b - '0'), nil
130 239
 }
131 240
 
132 241
 func parseBinaryDateTime(num uint64, data []byte, loc *time.Location) (driver.Value, error) {
@@ -167,6 +276,64 @@ func parseBinaryDateTime(num uint64, data []byte, loc *time.Location) (driver.Va
167 276
 	return nil, fmt.Errorf("invalid DATETIME packet length %d", num)
168 277
 }
169 278
 
279
+func appendDateTime(buf []byte, t time.Time) ([]byte, error) {
280
+	year, month, day := t.Date()
281
+	hour, min, sec := t.Clock()
282
+	nsec := t.Nanosecond()
283
+
284
+	if year < 1 || year > 9999 {
285
+		return buf, errors.New("year is not in the range [1, 9999]: " + strconv.Itoa(year)) // use errors.New instead of fmt.Errorf to avoid year escape to heap
286
+	}
287
+	year100 := year / 100
288
+	year1 := year % 100
289
+
290
+	var localBuf [len("2006-01-02T15:04:05.999999999")]byte // does not escape
291
+	localBuf[0], localBuf[1], localBuf[2], localBuf[3] = digits10[year100], digits01[year100], digits10[year1], digits01[year1]
292
+	localBuf[4] = '-'
293
+	localBuf[5], localBuf[6] = digits10[month], digits01[month]
294
+	localBuf[7] = '-'
295
+	localBuf[8], localBuf[9] = digits10[day], digits01[day]
296
+
297
+	if hour == 0 && min == 0 && sec == 0 && nsec == 0 {
298
+		return append(buf, localBuf[:10]...), nil
299
+	}
300
+
301
+	localBuf[10] = ' '
302
+	localBuf[11], localBuf[12] = digits10[hour], digits01[hour]
303
+	localBuf[13] = ':'
304
+	localBuf[14], localBuf[15] = digits10[min], digits01[min]
305
+	localBuf[16] = ':'
306
+	localBuf[17], localBuf[18] = digits10[sec], digits01[sec]
307
+
308
+	if nsec == 0 {
309
+		return append(buf, localBuf[:19]...), nil
310
+	}
311
+	nsec100000000 := nsec / 100000000
312
+	nsec1000000 := (nsec / 1000000) % 100
313
+	nsec10000 := (nsec / 10000) % 100
314
+	nsec100 := (nsec / 100) % 100
315
+	nsec1 := nsec % 100
316
+	localBuf[19] = '.'
317
+
318
+	// milli second
319
+	localBuf[20], localBuf[21], localBuf[22] =
320
+		digits01[nsec100000000], digits10[nsec1000000], digits01[nsec1000000]
321
+	// micro second
322
+	localBuf[23], localBuf[24], localBuf[25] =
323
+		digits10[nsec10000], digits01[nsec10000], digits10[nsec100]
324
+	// nano second
325
+	localBuf[26], localBuf[27], localBuf[28] =
326
+		digits01[nsec100], digits10[nsec1], digits01[nsec1]
327
+
328
+	// trim trailing zeros
329
+	n := len(localBuf)
330
+	for n > 0 && localBuf[n-1] == '0' {
331
+		n--
332
+	}
333
+
334
+	return append(buf, localBuf[:n]...), nil
335
+}
336
+
170 337
 // zeroDateTime is used in formatBinaryDateTime to avoid an allocation
171 338
 // if the DATE or DATETIME has the zero value.
172 339
 // It must never be changed.

+ 2
- 1
vendor/golang.org/x/crypto/sha3/hashes_generic.go Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 1
- 1
vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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
 

+ 0
- 0
vendor/golang.org/x/sys/unix/zerrors_linux.go Zobrazit soubor


Některé soubory nejsou zobrazny, neboť je v této revizi změněno mnoho souborů

Načítá se…
Zrušit
Uložit