Browse Source

Merge pull request #10112 from gyuho/vendor

*: use Go 1.11 module for dependency management, replace "dep"
Gyuho Lee 7 years ago
parent
commit
a3ae8df912
100 changed files with 5831 additions and 2523 deletions
  1. 0 549
      Gopkg.lock
  2. 0 3
      Gopkg.toml
  3. 1 1
      bill-of-materials.json
  4. 60 0
      go.mod
  5. 130 0
      go.sum
  6. 6 9
      scripts/updatedep.sh
  7. 0 3
      vendor/github.com/golang/protobuf/LICENSE
  8. 45 15
      vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
  9. 0 18
      vendor/github.com/golang/protobuf/proto/encode.go
  10. 60 2
      vendor/github.com/golang/protobuf/proto/lib.go
  11. 8 8
      vendor/github.com/golang/protobuf/proto/properties.go
  12. 135 49
      vendor/github.com/golang/protobuf/proto/table_marshal.go
  13. 113 29
      vendor/github.com/golang/protobuf/proto/table_unmarshal.go
  14. 2 2
      vendor/github.com/golang/protobuf/proto/text.go
  15. 3 3
      vendor/github.com/golang/protobuf/proto/text_parser.go
  16. 6 4
      vendor/github.com/golang/protobuf/ptypes/any.go
  17. 1 1
      vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
  18. 2 2
      vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go
  19. 21 11
      vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go
  20. 2 2
      vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go
  21. 0 201
      vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/LICENSE
  22. 0 27
      vendor/github.com/petar/GoLLRB/LICENSE
  23. 0 39
      vendor/github.com/petar/GoLLRB/llrb/avgvar.go
  24. 0 93
      vendor/github.com/petar/GoLLRB/llrb/iterator.go
  25. 0 46
      vendor/github.com/petar/GoLLRB/llrb/llrb-stats.go
  26. 0 456
      vendor/github.com/petar/GoLLRB/llrb/llrb.go
  27. 0 17
      vendor/github.com/petar/GoLLRB/llrb/util.go
  28. 0 201
      vendor/github.com/prometheus/client_model/ruby/LICENSE
  29. 0 202
      vendor/github.com/spf13/cobra/cobra/cmd/testdata/LICENSE.golden
  30. 9 0
      vendor/go.uber.org/zap/buffer/buffer.go
  31. 3 3
      vendor/go.uber.org/zap/config.go
  32. 1 1
      vendor/go.uber.org/zap/doc.go
  33. 2 2
      vendor/go.uber.org/zap/http_handler.go
  34. 161 0
      vendor/go.uber.org/zap/sink.go
  35. 27 24
      vendor/go.uber.org/zap/writer.go
  36. 26 4
      vendor/go.uber.org/zap/zapcore/json_encoder.go
  37. 1 1
      vendor/go.uber.org/zap/zapcore/memory_encoder.go
  38. 27 1
      vendor/golang.org/x/net/http2/client_conn_pool.go
  39. 5 3
      vendor/golang.org/x/net/http2/configure_transport.go
  40. 5 5
      vendor/golang.org/x/net/http2/flow.go
  41. 49 14
      vendor/golang.org/x/net/http2/frame.go
  42. 26 0
      vendor/golang.org/x/net/http2/go111.go
  43. 15 0
      vendor/golang.org/x/net/http2/go17.go
  44. 15 5
      vendor/golang.org/x/net/http2/headermap.go
  45. 15 5
      vendor/golang.org/x/net/http2/hpack/huffman.go
  46. 5 12
      vendor/golang.org/x/net/http2/http2.go
  47. 17 0
      vendor/golang.org/x/net/http2/not_go111.go
  48. 8 0
      vendor/golang.org/x/net/http2/not_go17.go
  49. 34 9
      vendor/golang.org/x/net/http2/server.go
  50. 175 32
      vendor/golang.org/x/net/http2/transport.go
  51. 8 0
      vendor/golang.org/x/net/trace/trace.go
  52. 14 0
      vendor/golang.org/x/sys/unix/aliases.go
  53. 1 1
      vendor/golang.org/x/sys/unix/constants.go
  54. 37 0
      vendor/golang.org/x/sys/unix/dev_aix_ppc.go
  55. 39 0
      vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
  56. 1 1
      vendor/golang.org/x/sys/unix/dirent.go
  57. 1 1
      vendor/golang.org/x/sys/unix/env_unix.go
  58. 5 1
      vendor/golang.org/x/sys/unix/fcntl.go
  59. 1 0
      vendor/golang.org/x/sys/unix/gccgo.go
  60. 1 0
      vendor/golang.org/x/sys/unix/gccgo_c.c
  61. 30 0
      vendor/golang.org/x/sys/unix/ioctl.go
  62. 66 9
      vendor/golang.org/x/sys/unix/openbsd_pledge.go
  63. 1 1
      vendor/golang.org/x/sys/unix/pagesize_unix.go
  64. 1 1
      vendor/golang.org/x/sys/unix/race0.go
  65. 1 1
      vendor/golang.org/x/sys/unix/sockcmsg_unix.go
  66. 1 1
      vendor/golang.org/x/sys/unix/str.go
  67. 1 1
      vendor/golang.org/x/sys/unix/syscall.go
  68. 562 0
      vendor/golang.org/x/sys/unix/syscall_aix.go
  69. 34 0
      vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
  70. 34 0
      vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
  71. 4 4
      vendor/golang.org/x/sys/unix/syscall_bsd.go
  72. 28 8
      vendor/golang.org/x/sys/unix/syscall_darwin.go
  73. 3 3
      vendor/golang.org/x/sys/unix/syscall_dragonfly.go
  74. 14 235
      vendor/golang.org/x/sys/unix/syscall_freebsd.go
  75. 150 24
      vendor/golang.org/x/sys/unix/syscall_linux.go
  76. 5 3
      vendor/golang.org/x/sys/unix/syscall_linux_386.go
  77. 5 0
      vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
  78. 7 3
      vendor/golang.org/x/sys/unix/syscall_linux_arm.go
  79. 38 16
      vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
  80. 4 0
      vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
  81. 9 8
      vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
  82. 13 3
      vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
  83. 212 0
      vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
  84. 4 0
      vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
  85. 2 0
      vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
  86. 14 2
      vendor/golang.org/x/sys/unix/syscall_netbsd.go
  87. 2 2
      vendor/golang.org/x/sys/unix/syscall_openbsd.go
  88. 12 7
      vendor/golang.org/x/sys/unix/syscall_solaris.go
  89. 3 3
      vendor/golang.org/x/sys/unix/syscall_unix.go
  90. 1 1
      vendor/golang.org/x/sys/unix/timestruct.go
  91. 229 0
      vendor/golang.org/x/sys/unix/types_aix.go
  92. 0 17
      vendor/golang.org/x/sys/unix/types_dragonfly.go
  93. 0 17
      vendor/golang.org/x/sys/unix/types_freebsd.go
  94. 0 17
      vendor/golang.org/x/sys/unix/types_openbsd.go
  95. 0 17
      vendor/golang.org/x/sys/unix/types_solaris.go
  96. 231 0
      vendor/golang.org/x/sys/unix/xattr_bsd.go
  97. 1360 0
      vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
  98. 1361 0
      vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
  99. 31 1
      vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
  100. 29 0
      vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go

+ 0 - 549
Gopkg.lock

@@ -1,549 +0,0 @@
-# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
-
-
-[[projects]]
-  branch = "master"
-  digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d"
-  name = "github.com/beorn7/perks"
-  packages = ["quantile"]
-  pruneopts = "UT"
-  revision = "3a771d992973f24aa725d07868b467d1ddfceafb"
-
-[[projects]]
-  digest = "1:1343a2963481a305ca4d051e84bc2abd16b601ee22ed324f8d605de1adb291b0"
-  name = "github.com/bgentry/speakeasy"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "4aabc24848ce5fd31929f7d1e4ea74d3709c14cd"
-  version = "v0.1.0"
-
-[[projects]]
-  digest = "1:0ef770954bca104ee99b3b6b7f9b240605ac03517d9f98cbc1893daa03f3c038"
-  name = "github.com/coreos/go-semver"
-  packages = ["semver"]
-  pruneopts = "UT"
-  revision = "8ab6407b697782a06568d4b7f1db25550ec2e4c6"
-  version = "v0.2.0"
-
-[[projects]]
-  digest = "1:caf7d199019565155810a525f332ad40d691095560e4bdf8acd02fffb0608f7e"
-  name = "github.com/coreos/go-systemd"
-  packages = [
-    "daemon",
-    "journal",
-    "util",
-  ]
-  pruneopts = "UT"
-  revision = "39ca1b05acc7ad1220e09f133283b8859a8b71ab"
-  version = "v17"
-
-[[projects]]
-  digest = "1:f5e7a28fc94786fd824a85ba27445eea2676ea5019c7c9ebc0c350b0895673a4"
-  name = "github.com/coreos/pkg"
-  packages = [
-    "capnslog",
-    "dlopen",
-  ]
-  pruneopts = "UT"
-  revision = "3ac0863d7acf3bc44daf49afef8919af12f704ef"
-  version = "v3"
-
-[[projects]]
-  digest = "1:76dc72490af7174349349838f2fe118996381b31ea83243812a97e5a0fd5ed55"
-  name = "github.com/dgrijalva/jwt-go"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e"
-  version = "v3.2.0"
-
-[[projects]]
-  digest = "1:ee7fe6a68ba9f21bc748293d4e1e66ad327f64a89b0f5ba2d021430babd4b8c9"
-  name = "github.com/dustin/go-humanize"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "bb3d318650d48840a39aa21a027c6630e198e626"
-
-[[projects]]
-  digest = "1:2cd7915ab26ede7d95b8749e6b1f933f1c6d5398030684e6505940a10f31cfda"
-  name = "github.com/ghodss/yaml"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7"
-  version = "v1.0.0"
-
-[[projects]]
-  digest = "1:8f13f978d35181fada0ea713c14a224f2b329fa91c13438b2811331ecd8b16e1"
-  name = "github.com/gogo/protobuf"
-  packages = [
-    "gogoproto",
-    "proto",
-    "protoc-gen-gogo/descriptor",
-  ]
-  pruneopts = "UT"
-  revision = "1adfc126b41513cc696b209667c8656ea7aac67c"
-  version = "v1.0.0"
-
-[[projects]]
-  digest = "1:7672c206322f45b33fac1ae2cb899263533ce0adcc6481d207725560208ec84e"
-  name = "github.com/golang/groupcache"
-  packages = ["lru"]
-  pruneopts = "UT"
-  revision = "02826c3e79038b59d737d3b1c0a1d937f71a4433"
-
-[[projects]]
-  digest = "1:69d5e4ea47a10826ceeacc88f99b1f3e509b07690cee667d70e13b5dd505bdcc"
-  name = "github.com/golang/protobuf"
-  packages = [
-    "jsonpb",
-    "proto",
-    "ptypes",
-    "ptypes/any",
-    "ptypes/duration",
-    "ptypes/struct",
-    "ptypes/timestamp",
-  ]
-  pruneopts = "UT"
-  revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265"
-  version = "v1.1.0"
-
-[[projects]]
-  digest = "1:9887333bbef17574b1db5f9893ea137ac44107235d624408a3ac9e0b98fbb2cb"
-  name = "github.com/google/btree"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "e89373fe6b4a7413d7acd6da1725b83ef713e6e4"
-
-[[projects]]
-  digest = "1:269d9336f94f48817bc0958dae75c285cb0d107cbfe3e1bc6b69d9105d427748"
-  name = "github.com/gorilla/websocket"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "4201258b820c74ac8e6922fc9e6b52f71fe46f8d"
-
-[[projects]]
-  digest = "1:d4fb49314d7f792a14c72f094f8fcb9ecfdf7a4c3e2186efb1f3d3a88806a844"
-  name = "github.com/grpc-ecosystem/go-grpc-middleware"
-  packages = [
-    ".",
-    "util/backoffutils",
-  ]
-  pruneopts = "UT"
-  revision = "c250d6563d4d4c20252cd865923440e829844f4e"
-  version = "v1.0.0"
-
-[[projects]]
-  digest = "1:9b7a07ac7577787a8ecc1334cb9f34df1c76ed82a917d556c5713d3ab84fbc43"
-  name = "github.com/grpc-ecosystem/go-grpc-prometheus"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "c225b8c3b01faf2899099b768856a9e916e5087b"
-  version = "v1.2.0"
-
-[[projects]]
-  digest = "1:6a06217fc753e65aea71446b777393009ef6797dadc0086c4f75bd16590be04d"
-  name = "github.com/grpc-ecosystem/grpc-gateway"
-  packages = [
-    "runtime",
-    "runtime/internal",
-    "utilities",
-  ]
-  pruneopts = "UT"
-  revision = "92583770e3f01b09a0d3e9bdf64321d8bebd48f2"
-  version = "v1.4.1"
-
-[[projects]]
-  digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be"
-  name = "github.com/inconshreveable/mousetrap"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
-  version = "v1.0"
-
-[[projects]]
-  digest = "1:75ab90ae3f5d876167e60f493beadfe66f0ed861a710f283fb06c86437a09538"
-  name = "github.com/jonboulle/clockwork"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "2eee05ed794112d45db504eb05aa693efd2b8b09"
-  version = "v0.1.0"
-
-[[projects]]
-  digest = "1:075fe2b22b9fcec90cecd98546c2096d73a3ab9458261f5647512fba3e0420eb"
-  name = "github.com/kr/pty"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "2c10821df3c3cf905230d078702dfbe9404c9b23"
-  version = "v1.0.0"
-
-[[projects]]
-  digest = "1:e2d1d410fb367567c2b53ed9e2d719d3c1f0891397bb2fa49afd747cfbf1e8e4"
-  name = "github.com/mattn/go-runewidth"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "9e777a8366cce605130a531d2cd6363d07ad7317"
-  version = "v0.0.2"
-
-[[projects]]
-  digest = "1:5985ef4caf91ece5d54817c11ea25f182697534f8ae6521eadcd628c142ac4b6"
-  name = "github.com/matttproud/golang_protobuf_extensions"
-  packages = ["pbutil"]
-  pruneopts = "UT"
-  revision = "3247c84500bff8d9fb6d579d800f20b3e091582c"
-  version = "v1.0.0"
-
-[[projects]]
-  digest = "1:51c406be3d166964b459a34db5faaafe8b4cc28e123e644f5274db97e558c791"
-  name = "github.com/olekukonko/tablewriter"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "a0225b3f23b5ce0cbec6d7a66a968f8a59eca9c4"
-
-[[projects]]
-  branch = "master"
-  digest = "1:3bf17a6e6eaa6ad24152148a631d18662f7212e21637c2699bff3369b7f00fa2"
-  name = "github.com/petar/GoLLRB"
-  packages = ["llrb"]
-  pruneopts = "UT"
-  revision = "53be0d36a84c2a886ca057d34b6aa4468df9ccb4"
-
-[[projects]]
-  digest = "1:d14a5f4bfecf017cb780bdde1b6483e5deb87e12c332544d2c430eda58734bcb"
-  name = "github.com/prometheus/client_golang"
-  packages = [
-    "prometheus",
-    "prometheus/promhttp",
-  ]
-  pruneopts = "UT"
-  revision = "c5b7fccd204277076155f10851dad72b76a49317"
-  version = "v0.8.0"
-
-[[projects]]
-  digest = "1:32d10bdfa8f09ecf13598324dba86ab891f11db3c538b6a34d1c3b5b99d7c36b"
-  name = "github.com/prometheus/client_model"
-  packages = ["go"]
-  pruneopts = "UT"
-  revision = "6f3806018612930941127f2a7c6c453ba2c527d2"
-
-[[projects]]
-  branch = "master"
-  digest = "1:e469cd65badf7694aeb44874518606d93c1d59e7735d3754ad442782437d3cc3"
-  name = "github.com/prometheus/common"
-  packages = [
-    "expfmt",
-    "internal/bitbucket.org/ww/goautoneg",
-    "model",
-  ]
-  pruneopts = "UT"
-  revision = "7600349dcfe1abd18d72d3a1770870d9800a7801"
-
-[[projects]]
-  branch = "master"
-  digest = "1:5b52592ee5c75444338e0949f8e80fca7d616c1bcc209b9336a1861b526400fb"
-  name = "github.com/prometheus/procfs"
-  packages = [
-    ".",
-    "internal/util",
-    "nfs",
-    "xfs",
-  ]
-  pruneopts = "UT"
-  revision = "7d6f385de8bea29190f15ba9931442a0eaef9af7"
-
-[[projects]]
-  digest = "1:9e9193aa51197513b3abcb108970d831fbcf40ef96aa845c4f03276e1fa316d2"
-  name = "github.com/sirupsen/logrus"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "c155da19408a8799da419ed3eeb0cb5db0ad5dbc"
-  version = "v1.0.5"
-
-[[projects]]
-  digest = "1:30e06e6d62a1d694e3cdbff29d8a9a96022e05a487d0c6eaf0ef898965ef28fb"
-  name = "github.com/soheilhy/cmux"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "e09e9389d85d8492d313d73d1469c029e710623f"
-  version = "v0.1.4"
-
-[[projects]]
-  digest = "1:645cabccbb4fa8aab25a956cbcbdf6a6845ca736b2c64e197ca7cbb9d210b939"
-  name = "github.com/spf13/cobra"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385"
-  version = "v0.0.3"
-
-[[projects]]
-  digest = "1:9424f440bba8f7508b69414634aef3b2b3a877e522d8a4624692412805407bb7"
-  name = "github.com/spf13/pflag"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "583c0c0531f06d5278b7d917446061adc344b5cd"
-  version = "v1.0.1"
-
-[[projects]]
-  digest = "1:28aee88434fcefe93f513c55f793bc36362b88c0ae40e63033899fb78ddfd402"
-  name = "github.com/tmc/grpc-websocket-proxy"
-  packages = ["wsproxy"]
-  pruneopts = "UT"
-  revision = "89b8d40f7ca833297db804fcb3be53a76d01c238"
-
-[[projects]]
-  digest = "1:03aa6e485e528acb119fb32901cf99582c380225fc7d5a02758e08b180cb56c3"
-  name = "github.com/ugorji/go"
-  packages = ["codec"]
-  pruneopts = "UT"
-  revision = "b4c50a2b199d93b13dc15e78929cfb23bfdf21ab"
-  version = "v1.1.1"
-
-[[projects]]
-  digest = "1:46ed28d956228a4113be4e08ba8fae6d78b154bbf78cb7c2108ab157faaac8dc"
-  name = "github.com/urfave/cli"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "1efa31f08b9333f1bd4882d61f9d668a70cd902e"
-  version = "v1.18.0"
-
-[[projects]]
-  digest = "1:6dff6d02950c110d7d61da0c200eaff9da9f312101291b2d8c07235954eaa19d"
-  name = "github.com/xiang90/probing"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "07dd2e8dfe18522e9c447ba95f2fe95262f63bb2"
-  version = "0.0.1"
-
-[[projects]]
-  digest = "1:c28625428387b63dd7154eb857f51e700465cfbf7c06f619e71f2da33cefe47e"
-  name = "go.etcd.io/bbolt"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "acbc2c426a444a65e0cbfdcbb3573857bf18b465"
-  version = "v1.3.1-etcd.7"
-
-[[projects]]
-  digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d"
-  name = "go.uber.org/atomic"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289"
-  version = "v1.3.2"
-
-[[projects]]
-  digest = "1:60bf2a5e347af463c42ed31a493d817f8a72f102543060ed992754e689805d1a"
-  name = "go.uber.org/multierr"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "3c4937480c32f4c13a875a1829af76c98ca3d40a"
-  version = "v1.1.0"
-
-[[projects]]
-  digest = "1:9580b1b079114140ade8cec957685344d14f00119e0241f6b369633cb346eeb3"
-  name = "go.uber.org/zap"
-  packages = [
-    ".",
-    "buffer",
-    "internal/bufferpool",
-    "internal/color",
-    "internal/exit",
-    "zapcore",
-  ]
-  pruneopts = "UT"
-  revision = "eeedf312bc6c57391d84767a4cd413f02a917974"
-  version = "v1.8.0"
-
-[[projects]]
-  branch = "master"
-  digest = "1:001a4e7a40e50ff2ef32e2556bca50c4f77daa457db3ac6afc8bea9bb2122cfb"
-  name = "golang.org/x/crypto"
-  packages = [
-    "bcrypt",
-    "blowfish",
-    "ssh/terminal",
-  ]
-  pruneopts = "UT"
-  revision = "8ac0e0d97ce45cd83d1d7243c060cb8461dda5e9"
-
-[[projects]]
-  branch = "master"
-  digest = "1:fc34fe79cf436681e18fdfad303dbe6a9caa69e8058006e8819ba9660f8e5fb5"
-  name = "golang.org/x/net"
-  packages = [
-    "context",
-    "http/httpguts",
-    "http2",
-    "http2/hpack",
-    "idna",
-    "internal/timeseries",
-    "trace",
-  ]
-  pruneopts = "UT"
-  revision = "db08ff08e8622530d9ed3a0e8ac279f6d4c02196"
-
-[[projects]]
-  branch = "master"
-  digest = "1:7e6d7e1a44eeefc8cd35d6445042f246702656a6597987db850c30a11f2d65d5"
-  name = "golang.org/x/sys"
-  packages = [
-    "unix",
-    "windows",
-  ]
-  pruneopts = "UT"
-  revision = "56ede360ec1c541828fb88741b3f1049406d28f5"
-
-[[projects]]
-  digest = "1:a2ab62866c75542dd18d2b069fec854577a20211d7c0ea6ae746072a1dccdd18"
-  name = "golang.org/x/text"
-  packages = [
-    "collate",
-    "collate/build",
-    "internal/colltab",
-    "internal/gen",
-    "internal/tag",
-    "internal/triegen",
-    "internal/ucd",
-    "language",
-    "secure/bidirule",
-    "transform",
-    "unicode/bidi",
-    "unicode/cldr",
-    "unicode/norm",
-    "unicode/rangetable",
-  ]
-  pruneopts = "UT"
-  revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
-  version = "v0.3.0"
-
-[[projects]]
-  branch = "master"
-  digest = "1:c9e7a4b4d47c0ed205d257648b0e5b0440880cb728506e318f8ac7cd36270bc4"
-  name = "golang.org/x/time"
-  packages = ["rate"]
-  pruneopts = "UT"
-  revision = "fbb02b2291d28baffd63558aa44b4b56f178d650"
-
-[[projects]]
-  branch = "master"
-  digest = "1:601e63e7d4577f907118bec825902505291918859d223bce015539e79f1160e3"
-  name = "google.golang.org/genproto"
-  packages = ["googleapis/rpc/status"]
-  pruneopts = "UT"
-  revision = "32ee49c4dd805befd833990acba36cb75042378c"
-
-[[projects]]
-  digest = "1:047efbc3c9a51f3002b0002f92543857d372654a676fb6b01931982cd80467dd"
-  name = "google.golang.org/grpc"
-  packages = [
-    ".",
-    "balancer",
-    "balancer/base",
-    "balancer/roundrobin",
-    "codes",
-    "connectivity",
-    "credentials",
-    "encoding",
-    "encoding/proto",
-    "grpclog",
-    "health",
-    "health/grpc_health_v1",
-    "internal",
-    "internal/backoff",
-    "internal/channelz",
-    "internal/envconfig",
-    "internal/grpcrand",
-    "internal/transport",
-    "keepalive",
-    "metadata",
-    "naming",
-    "peer",
-    "resolver",
-    "resolver/dns",
-    "resolver/passthrough",
-    "stats",
-    "status",
-    "tap",
-  ]
-  pruneopts = "UT"
-  revision = "32fb0ac620c32ba40a4626ddf94d90d12cce3455"
-  version = "v1.14.0"
-
-[[projects]]
-  digest = "1:d8cd4f14785b5ae65100524a29ebba8b9dfc5401020fe7504f80b438bb8e8e0d"
-  name = "gopkg.in/cheggaaa/pb.v1"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "2af8bbdea9e99e83b3ac400d8f6b6d1b8cbbf338"
-  version = "v1.0.25"
-
-[[projects]]
-  digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202"
-  name = "gopkg.in/yaml.v2"
-  packages = ["."]
-  pruneopts = "UT"
-  revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
-  version = "v2.2.1"
-
-[solve-meta]
-  analyzer-name = "dep"
-  analyzer-version = 1
-  input-imports = [
-    "github.com/bgentry/speakeasy",
-    "github.com/coreos/go-semver/semver",
-    "github.com/coreos/go-systemd/daemon",
-    "github.com/coreos/go-systemd/journal",
-    "github.com/coreos/go-systemd/util",
-    "github.com/coreos/pkg/capnslog",
-    "github.com/dgrijalva/jwt-go",
-    "github.com/dustin/go-humanize",
-    "github.com/ghodss/yaml",
-    "github.com/gogo/protobuf/gogoproto",
-    "github.com/gogo/protobuf/proto",
-    "github.com/golang/groupcache/lru",
-    "github.com/golang/protobuf/proto",
-    "github.com/google/btree",
-    "github.com/grpc-ecosystem/go-grpc-middleware",
-    "github.com/grpc-ecosystem/go-grpc-middleware/util/backoffutils",
-    "github.com/grpc-ecosystem/go-grpc-prometheus",
-    "github.com/grpc-ecosystem/grpc-gateway/runtime",
-    "github.com/grpc-ecosystem/grpc-gateway/utilities",
-    "github.com/jonboulle/clockwork",
-    "github.com/kr/pty",
-    "github.com/olekukonko/tablewriter",
-    "github.com/prometheus/client_golang/prometheus",
-    "github.com/prometheus/client_golang/prometheus/promhttp",
-    "github.com/prometheus/client_model/go",
-    "github.com/soheilhy/cmux",
-    "github.com/spf13/cobra",
-    "github.com/spf13/pflag",
-    "github.com/tmc/grpc-websocket-proxy/wsproxy",
-    "github.com/ugorji/go/codec",
-    "github.com/urfave/cli",
-    "github.com/xiang90/probing",
-    "go.etcd.io/bbolt",
-    "go.uber.org/zap",
-    "go.uber.org/zap/zapcore",
-    "golang.org/x/crypto/bcrypt",
-    "golang.org/x/net/context",
-    "golang.org/x/net/http2",
-    "golang.org/x/net/trace",
-    "golang.org/x/time/rate",
-    "google.golang.org/grpc",
-    "google.golang.org/grpc/balancer",
-    "google.golang.org/grpc/codes",
-    "google.golang.org/grpc/connectivity",
-    "google.golang.org/grpc/credentials",
-    "google.golang.org/grpc/grpclog",
-    "google.golang.org/grpc/health",
-    "google.golang.org/grpc/health/grpc_health_v1",
-    "google.golang.org/grpc/keepalive",
-    "google.golang.org/grpc/metadata",
-    "google.golang.org/grpc/naming",
-    "google.golang.org/grpc/peer",
-    "google.golang.org/grpc/resolver",
-    "google.golang.org/grpc/resolver/dns",
-    "google.golang.org/grpc/resolver/passthrough",
-    "google.golang.org/grpc/status",
-    "gopkg.in/cheggaaa/pb.v1",
-    "gopkg.in/yaml.v2",
-  ]
-  solver-name = "gps-cdcl"
-  solver-version = 1

+ 0 - 3
Gopkg.toml

@@ -1,3 +0,0 @@
-[prune]
-  go-tests = true
-  unused-packages = true

+ 1 - 1
bill-of-materials.json

@@ -94,7 +94,7 @@
 		"licenses": [
 		"licenses": [
 			{
 			{
 				"type": "BSD 3-clause \"New\" or \"Revised\" License",
 				"type": "BSD 3-clause \"New\" or \"Revised\" License",
-				"confidence": 0.92
+				"confidence": 0.9663865546218487
 			}
 			}
 		]
 		]
 	},
 	},

+ 60 - 0
go.mod

@@ -0,0 +1,60 @@
+module go.etcd.io/etcd
+
+require (
+	github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 // indirect
+	github.com/bgentry/speakeasy v0.1.0
+	github.com/coreos/go-semver v0.2.0
+	github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7
+	github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf
+	github.com/davecgh/go-spew v1.1.1 // indirect
+	github.com/dgrijalva/jwt-go v3.2.0+incompatible
+	github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4
+	github.com/fatih/color v1.7.0 // indirect
+	github.com/ghodss/yaml v1.0.0
+	github.com/gogo/protobuf v1.0.0
+	github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
+	github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903
+	github.com/golang/protobuf v1.2.0
+	github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a
+	github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c // indirect
+	github.com/grpc-ecosystem/go-grpc-middleware v1.0.0
+	github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
+	github.com/grpc-ecosystem/grpc-gateway v1.4.1
+	github.com/inconshreveable/mousetrap v1.0.0 // indirect
+	github.com/jonboulle/clockwork v0.1.0
+	github.com/kr/pty v1.0.0
+	github.com/mattn/go-colorable v0.0.9 // indirect
+	github.com/mattn/go-isatty v0.0.4 // indirect
+	github.com/mattn/go-runewidth v0.0.2 // indirect
+	github.com/matttproud/golang_protobuf_extensions v1.0.0 // indirect
+	github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5
+	github.com/onsi/gomega v1.4.2 // indirect
+	github.com/pkg/errors v0.8.0 // indirect
+	github.com/pmezard/go-difflib v1.0.0 // indirect
+	github.com/prometheus/client_golang v0.8.0
+	github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612
+	github.com/prometheus/common v0.0.0-20180518154759-7600349dcfe1 // indirect
+	github.com/prometheus/procfs v0.0.0-20180612222113-7d6f385de8be // indirect
+	github.com/sirupsen/logrus v1.0.5 // indirect
+	github.com/soheilhy/cmux v0.1.4
+	github.com/spf13/cobra v0.0.3
+	github.com/spf13/pflag v1.0.1
+	github.com/stretchr/testify v1.2.2 // indirect
+	github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8
+	github.com/ugorji/go v1.1.1
+	github.com/urfave/cli v1.18.0
+	github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18
+	go.etcd.io/bbolt v1.3.1-etcd.7
+	go.uber.org/atomic v1.3.2 // indirect
+	go.uber.org/multierr v1.1.0 // indirect
+	go.uber.org/zap v1.9.1
+	golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4
+	golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
+	golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
+	google.golang.org/genproto v0.0.0-20180608181217-32ee49c4dd80 // indirect
+	google.golang.org/grpc v1.14.0
+	gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
+	gopkg.in/cheggaaa/pb.v1 v1.0.25
+	gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
+	gopkg.in/yaml.v2 v2.2.1
+)

+ 130 - 0
go.sum

@@ -0,0 +1,130 @@
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
+github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
+github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 h1:u9SHYsPQNyt5tgDm3YN7+9dYrpK96E5wFilTFWIDZOM=
+github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI=
+github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs=
+github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
+github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/gogo/protobuf v1.0.0 h1:2jyBKDKU/8v3v2xVR2PtiWQviFUyiaGk2rpfyFT8rTM=
+github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8=
+github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a h1:ZJu5NB1Bk5ms4vw0Xu4i+jD32SE9jQXyfnOvwhHqlT0=
+github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c h1:Lh2aW+HnU2Nbe1gqD9SOJLJxW1jBMmQOktN2acDyJk8=
+github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:BWIsLfhgKhV5g/oF34aRjniBHLTZe5DNekSjbAjIS6c=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
+github.com/grpc-ecosystem/grpc-gateway v1.4.1 h1:pX7cnDwSSmG0dR9yNjCQSSpmsJOqFdT7SzVp5Yl9uVw=
+github.com/grpc-ecosystem/grpc-gateway v1.4.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
+github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
+github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
+github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
+github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
+github.com/kr/pty v1.0.0 h1:jR04h3bskdxb8xt+5B6MoxPwDhMCe0oEgxug4Ca1YSA=
+github.com/kr/pty v1.0.0/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
+github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
+github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
+github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=
+github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+github.com/matttproud/golang_protobuf_extensions v1.0.0 h1:YNOwxxSJzSUARoD9KRZLzM9Y858MNGCOACTvCW9TSAc=
+github.com/matttproud/golang_protobuf_extensions v1.0.0/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78=
+github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
+github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/gomega v1.4.2 h1:3mYCb7aPxS/RU7TI1y4rkEn1oKmPRjNJLNEXgw7MH2I=
+github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/prometheus/client_golang v0.8.0 h1:1921Yw9Gc3iSc4VQh3PIoOqgPCZS7G/4xQNVUp8Mda8=
+github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612 h1:13pIdM2tpaDi4OVe24fgoIS7ZTqMt0QI+bwQsX5hq+g=
+github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/common v0.0.0-20180518154759-7600349dcfe1 h1:osmNoEW2SCW3L7EX0km2LYM8HKpNWRiouxjE3XHkyGc=
+github.com/prometheus/common v0.0.0-20180518154759-7600349dcfe1/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
+github.com/prometheus/procfs v0.0.0-20180612222113-7d6f385de8be h1:MoyXp/VjXUwM0GyDcdwT7Ubea2gxOSHpPaFo3qV+Y2A=
+github.com/prometheus/procfs v0.0.0-20180612222113-7d6f385de8be/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/sirupsen/logrus v1.0.5 h1:8c8b5uO0zS4X6RPl/sd1ENwSkIc0/H2PaHxE3udaE8I=
+github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
+github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
+github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
+github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
+github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
+github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4=
+github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
+github.com/ugorji/go v1.1.1 h1:gmervu+jDMvXTbcHQ0pd2wee85nEoE0BsVyEuzkfK8w=
+github.com/ugorji/go v1.1.1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
+github.com/urfave/cli v1.18.0 h1:m9MfmZWX7bwr9kUcs/Asr95j0IVXzGNNc+/5ku2m26Q=
+github.com/urfave/cli v1.18.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 h1:MPPkRncZLN9Kh4MEFmbnK4h3BD7AUmskWv2+EeZJCCs=
+github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
+go.etcd.io/bbolt v1.3.1-etcd.7 h1:M0l89sIuZ+RkW0rLbUsmxescVzLwLUs+Kvks+0jeHdM=
+go.etcd.io/bbolt v1.3.1-etcd.7/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
+go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
+go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
+go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
+go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
+go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
+golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4 h1:wviDUSmtheHRBfoY8B9U8ELl2USoXi2YFwdGdpIIkzI=
+golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM=
+golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+google.golang.org/genproto v0.0.0-20180608181217-32ee49c4dd80 h1:GL7nK1hkDKrkor0eVOYcMdIsUGErFnaC2gpBOVC+vbI=
+google.golang.org/genproto v0.0.0-20180608181217-32ee49c4dd80/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/grpc v1.14.0 h1:ArxJuB1NWfPY6r9Gp9gqwplT0Ge7nqv9msgu03lHLmo=
+google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
+gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo=
+gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/cheggaaa/pb.v1 v1.0.25 h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I=
+gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
+gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0=
+gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

+ 6 - 9
scripts/updatedep.sh

@@ -6,13 +6,10 @@ if ! [[ "$0" =~ scripts/updatedep.sh ]]; then
   exit 255
   exit 255
 fi
 fi
 
 
-go get -v -u github.com/golang/dep/cmd/dep
-
-if [[ -z "$1" ]]; then
-  echo "dep ensure on all packages"
-  dep ensure -v
-else
-  echo "dep update on" "$1"
-  # shellcheck disable=SC2086
-  dep ensure -v -update $1
+if [[ $(go version) != "go version go1.11"* ]]; then
+  echo "expect Go 1.11+, got:" "$(go version)"
+  exit 255
 fi
 fi
+
+GO111MODULE=on go mod tidy -v
+GO111MODULE=on go mod vendor -v

+ 0 - 3
vendor/github.com/golang/protobuf/LICENSE

@@ -1,7 +1,4 @@
-Go support for Protocol Buffers - Google's data interchange format
-
 Copyright 2010 The Go Authors.  All rights reserved.
 Copyright 2010 The Go Authors.  All rights reserved.
-https://github.com/golang/protobuf
 
 
 Redistribution and use in source and binary forms, with or without
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
 modification, are permitted provided that the following conditions are

+ 45 - 15
vendor/github.com/golang/protobuf/jsonpb/jsonpb.go

@@ -106,6 +106,9 @@ func defaultResolveAny(typeUrl string) (proto.Message, error) {
 // way they are marshaled to JSON. Messages that implement this should
 // way they are marshaled to JSON. Messages that implement this should
 // also implement JSONPBUnmarshaler so that the custom format can be
 // also implement JSONPBUnmarshaler so that the custom format can be
 // parsed.
 // parsed.
+//
+// The JSON marshaling must follow the proto to JSON specification:
+//	https://developers.google.com/protocol-buffers/docs/proto3#json
 type JSONPBMarshaler interface {
 type JSONPBMarshaler interface {
 	MarshalJSONPB(*Marshaler) ([]byte, error)
 	MarshalJSONPB(*Marshaler) ([]byte, error)
 }
 }
@@ -114,6 +117,9 @@ type JSONPBMarshaler interface {
 // the way they are unmarshaled from JSON. Messages that implement this
 // the way they are unmarshaled from JSON. Messages that implement this
 // should also implement JSONPBMarshaler so that the custom format can be
 // should also implement JSONPBMarshaler so that the custom format can be
 // produced.
 // produced.
+//
+// The JSON unmarshaling must follow the JSON to proto specification:
+//	https://developers.google.com/protocol-buffers/docs/proto3#json
 type JSONPBUnmarshaler interface {
 type JSONPBUnmarshaler interface {
 	UnmarshalJSONPB(*Unmarshaler, []byte) error
 	UnmarshalJSONPB(*Unmarshaler, []byte) error
 }
 }
@@ -565,6 +571,7 @@ func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v refle
 				out.write(m.Indent)
 				out.write(m.Indent)
 			}
 			}
 
 
+			// TODO handle map key prop properly
 			b, err := json.Marshal(k.Interface())
 			b, err := json.Marshal(k.Interface())
 			if err != nil {
 			if err != nil {
 				return err
 				return err
@@ -586,7 +593,11 @@ func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v refle
 				out.write(` `)
 				out.write(` `)
 			}
 			}
 
 
-			if err := m.marshalValue(out, prop, v.MapIndex(k), indent+m.Indent); err != nil {
+			vprop := prop
+			if prop != nil && prop.MapValProp != nil {
+				vprop = prop.MapValProp
+			}
+			if err := m.marshalValue(out, vprop, v.MapIndex(k), indent+m.Indent); err != nil {
 				return err
 				return err
 			}
 			}
 		}
 		}
@@ -778,7 +789,7 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe
 
 
 			return nil
 			return nil
 		case "Duration":
 		case "Duration":
-			unq, err := strconv.Unquote(string(inputValue))
+			unq, err := unquote(string(inputValue))
 			if err != nil {
 			if err != nil {
 				return err
 				return err
 			}
 			}
@@ -795,7 +806,7 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe
 			target.Field(1).SetInt(ns)
 			target.Field(1).SetInt(ns)
 			return nil
 			return nil
 		case "Timestamp":
 		case "Timestamp":
-			unq, err := strconv.Unquote(string(inputValue))
+			unq, err := unquote(string(inputValue))
 			if err != nil {
 			if err != nil {
 				return err
 				return err
 			}
 			}
@@ -842,7 +853,7 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe
 				target.Field(0).Set(reflect.ValueOf(&stpb.Value_NullValue{}))
 				target.Field(0).Set(reflect.ValueOf(&stpb.Value_NullValue{}))
 			} else if v, err := strconv.ParseFloat(ivStr, 0); err == nil {
 			} else if v, err := strconv.ParseFloat(ivStr, 0); err == nil {
 				target.Field(0).Set(reflect.ValueOf(&stpb.Value_NumberValue{v}))
 				target.Field(0).Set(reflect.ValueOf(&stpb.Value_NumberValue{v}))
-			} else if v, err := strconv.Unquote(ivStr); err == nil {
+			} else if v, err := unquote(ivStr); err == nil {
 				target.Field(0).Set(reflect.ValueOf(&stpb.Value_StringValue{v}))
 				target.Field(0).Set(reflect.ValueOf(&stpb.Value_StringValue{v}))
 			} else if v, err := strconv.ParseBool(ivStr); err == nil {
 			} else if v, err := strconv.ParseBool(ivStr); err == nil {
 				target.Field(0).Set(reflect.ValueOf(&stpb.Value_BoolValue{v}))
 				target.Field(0).Set(reflect.ValueOf(&stpb.Value_BoolValue{v}))
@@ -878,6 +889,9 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe
 			target.Set(reflect.New(targetType.Elem()))
 			target.Set(reflect.New(targetType.Elem()))
 			target = target.Elem()
 			target = target.Elem()
 		}
 		}
+		if targetType.Kind() != reflect.Int32 {
+			return fmt.Errorf("invalid target %q for enum %s", targetType.Kind(), prop.Enum)
+		}
 		target.SetInt(int64(n))
 		target.SetInt(int64(n))
 		return nil
 		return nil
 	}
 	}
@@ -1007,16 +1021,22 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe
 					k = reflect.ValueOf(ks)
 					k = reflect.ValueOf(ks)
 				} else {
 				} else {
 					k = reflect.New(targetType.Key()).Elem()
 					k = reflect.New(targetType.Key()).Elem()
-					// TODO: pass the correct Properties if needed.
-					if err := u.unmarshalValue(k, json.RawMessage(ks), nil); err != nil {
+					var kprop *proto.Properties
+					if prop != nil && prop.MapKeyProp != nil {
+						kprop = prop.MapKeyProp
+					}
+					if err := u.unmarshalValue(k, json.RawMessage(ks), kprop); err != nil {
 						return err
 						return err
 					}
 					}
 				}
 				}
 
 
 				// Unmarshal map value.
 				// Unmarshal map value.
 				v := reflect.New(targetType.Elem()).Elem()
 				v := reflect.New(targetType.Elem()).Elem()
-				// TODO: pass the correct Properties if needed.
-				if err := u.unmarshalValue(v, raw, nil); err != nil {
+				var vprop *proto.Properties
+				if prop != nil && prop.MapValProp != nil {
+					vprop = prop.MapValProp
+				}
+				if err := u.unmarshalValue(v, raw, vprop); err != nil {
 					return err
 					return err
 				}
 				}
 				target.SetMapIndex(k, v)
 				target.SetMapIndex(k, v)
@@ -1025,13 +1045,6 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe
 		return nil
 		return nil
 	}
 	}
 
 
-	// 64-bit integers can be encoded as strings. In this case we drop
-	// the quotes and proceed as normal.
-	isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64
-	if isNum && strings.HasPrefix(string(inputValue), `"`) {
-		inputValue = inputValue[1 : len(inputValue)-1]
-	}
-
 	// Non-finite numbers can be encoded as strings.
 	// Non-finite numbers can be encoded as strings.
 	isFloat := targetType.Kind() == reflect.Float32 || targetType.Kind() == reflect.Float64
 	isFloat := targetType.Kind() == reflect.Float32 || targetType.Kind() == reflect.Float64
 	if isFloat {
 	if isFloat {
@@ -1041,10 +1054,25 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe
 		}
 		}
 	}
 	}
 
 
+	// integers & floats can be encoded as strings. In this case we drop
+	// the quotes and proceed as normal.
+	isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64 ||
+		targetType.Kind() == reflect.Int32 || targetType.Kind() == reflect.Uint32 ||
+		targetType.Kind() == reflect.Float32 || targetType.Kind() == reflect.Float64
+	if isNum && strings.HasPrefix(string(inputValue), `"`) {
+		inputValue = inputValue[1 : len(inputValue)-1]
+	}
+
 	// Use the encoding/json for parsing other value types.
 	// Use the encoding/json for parsing other value types.
 	return json.Unmarshal(inputValue, target.Addr().Interface())
 	return json.Unmarshal(inputValue, target.Addr().Interface())
 }
 }
 
 
+func unquote(s string) (string, error) {
+	var ret string
+	err := json.Unmarshal([]byte(s), &ret)
+	return ret, err
+}
+
 // jsonProperties returns parsed proto.Properties for the field and corrects JSONName attribute.
 // jsonProperties returns parsed proto.Properties for the field and corrects JSONName attribute.
 func jsonProperties(f reflect.StructField, origName bool) *proto.Properties {
 func jsonProperties(f reflect.StructField, origName bool) *proto.Properties {
 	var prop proto.Properties
 	var prop proto.Properties
@@ -1094,6 +1122,8 @@ func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
 func (s mapKeys) Less(i, j int) bool {
 func (s mapKeys) Less(i, j int) bool {
 	if k := s[i].Kind(); k == s[j].Kind() {
 	if k := s[i].Kind(); k == s[j].Kind() {
 		switch k {
 		switch k {
+		case reflect.String:
+			return s[i].String() < s[j].String()
 		case reflect.Int32, reflect.Int64:
 		case reflect.Int32, reflect.Int64:
 			return s[i].Int() < s[j].Int()
 			return s[i].Int() < s[j].Int()
 		case reflect.Uint32, reflect.Uint64:
 		case reflect.Uint32, reflect.Uint64:

+ 0 - 18
vendor/github.com/golang/protobuf/proto/encode.go

@@ -37,27 +37,9 @@ package proto
 
 
 import (
 import (
 	"errors"
 	"errors"
-	"fmt"
 	"reflect"
 	"reflect"
 )
 )
 
 
-// RequiredNotSetError is the error returned if Marshal is called with
-// a protocol buffer struct whose required fields have not
-// all been initialized. It is also the error returned if Unmarshal is
-// called with an encoded protocol buffer that does not include all the
-// required fields.
-//
-// When printed, RequiredNotSetError reports the first unset required field in a
-// message. If the field cannot be precisely determined, it is reported as
-// "{Unknown}".
-type RequiredNotSetError struct {
-	field string
-}
-
-func (e *RequiredNotSetError) Error() string {
-	return fmt.Sprintf("proto: required field %q not set", e.field)
-}
-
 var (
 var (
 	// errRepeatedHasNil is the error returned if Marshal is called with
 	// errRepeatedHasNil is the error returned if Marshal is called with
 	// a struct with a repeated field containing a nil element.
 	// a struct with a repeated field containing a nil element.

+ 60 - 2
vendor/github.com/golang/protobuf/proto/lib.go

@@ -265,7 +265,6 @@ package proto
 
 
 import (
 import (
 	"encoding/json"
 	"encoding/json"
-	"errors"
 	"fmt"
 	"fmt"
 	"log"
 	"log"
 	"reflect"
 	"reflect"
@@ -274,7 +273,66 @@ import (
 	"sync"
 	"sync"
 )
 )
 
 
-var errInvalidUTF8 = errors.New("proto: invalid UTF-8 string")
+// RequiredNotSetError is an error type returned by either Marshal or Unmarshal.
+// Marshal reports this when a required field is not initialized.
+// Unmarshal reports this when a required field is missing from the wire data.
+type RequiredNotSetError struct{ field string }
+
+func (e *RequiredNotSetError) Error() string {
+	if e.field == "" {
+		return fmt.Sprintf("proto: required field not set")
+	}
+	return fmt.Sprintf("proto: required field %q not set", e.field)
+}
+func (e *RequiredNotSetError) RequiredNotSet() bool {
+	return true
+}
+
+type invalidUTF8Error struct{ field string }
+
+func (e *invalidUTF8Error) Error() string {
+	if e.field == "" {
+		return "proto: invalid UTF-8 detected"
+	}
+	return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field)
+}
+func (e *invalidUTF8Error) InvalidUTF8() bool {
+	return true
+}
+
+// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8.
+// This error should not be exposed to the external API as such errors should
+// be recreated with the field information.
+var errInvalidUTF8 = &invalidUTF8Error{}
+
+// isNonFatal reports whether the error is either a RequiredNotSet error
+// or a InvalidUTF8 error.
+func isNonFatal(err error) bool {
+	if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() {
+		return true
+	}
+	if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() {
+		return true
+	}
+	return false
+}
+
+type nonFatal struct{ E error }
+
+// Merge merges err into nf and reports whether it was successful.
+// Otherwise it returns false for any fatal non-nil errors.
+func (nf *nonFatal) Merge(err error) (ok bool) {
+	if err == nil {
+		return true // not an error
+	}
+	if !isNonFatal(err) {
+		return false // fatal error
+	}
+	if nf.E == nil {
+		nf.E = err // store first instance of non-fatal error
+	}
+	return true
+}
 
 
 // Message is implemented by generated protocol buffer messages.
 // Message is implemented by generated protocol buffer messages.
 type Message interface {
 type Message interface {

+ 8 - 8
vendor/github.com/golang/protobuf/proto/properties.go

@@ -139,7 +139,7 @@ type Properties struct {
 	Repeated bool
 	Repeated bool
 	Packed   bool   // relevant for repeated primitives only
 	Packed   bool   // relevant for repeated primitives only
 	Enum     string // set for enum types only
 	Enum     string // set for enum types only
-	proto3   bool   // whether this is known to be a proto3 field; set for []byte only
+	proto3   bool   // whether this is known to be a proto3 field
 	oneof    bool   // whether this is a oneof field
 	oneof    bool   // whether this is a oneof field
 
 
 	Default    string // default value
 	Default    string // default value
@@ -148,9 +148,9 @@ type Properties struct {
 	stype reflect.Type      // set for struct types only
 	stype reflect.Type      // set for struct types only
 	sprop *StructProperties // set for struct types only
 	sprop *StructProperties // set for struct types only
 
 
-	mtype    reflect.Type // set for map types only
-	mkeyprop *Properties  // set for map types only
-	mvalprop *Properties  // set for map types only
+	mtype      reflect.Type // set for map types only
+	MapKeyProp *Properties  // set for map types only
+	MapValProp *Properties  // set for map types only
 }
 }
 
 
 // String formats the properties in the protobuf struct field tag style.
 // String formats the properties in the protobuf struct field tag style.
@@ -275,16 +275,16 @@ func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, loc
 
 
 	case reflect.Map:
 	case reflect.Map:
 		p.mtype = t1
 		p.mtype = t1
-		p.mkeyprop = &Properties{}
-		p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
-		p.mvalprop = &Properties{}
+		p.MapKeyProp = &Properties{}
+		p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
+		p.MapValProp = &Properties{}
 		vtype := p.mtype.Elem()
 		vtype := p.mtype.Elem()
 		if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice {
 		if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice {
 			// The value type is not a message (*T) or bytes ([]byte),
 			// The value type is not a message (*T) or bytes ([]byte),
 			// so we need encoders for the pointer to this type.
 			// so we need encoders for the pointer to this type.
 			vtype = reflect.PtrTo(vtype)
 			vtype = reflect.PtrTo(vtype)
 		}
 		}
-		p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
+		p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
 	}
 	}
 
 
 	if p.stype != nil {
 	if p.stype != nil {

+ 135 - 49
vendor/github.com/golang/protobuf/proto/table_marshal.go

@@ -231,7 +231,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte
 		return b, err
 		return b, err
 	}
 	}
 
 
-	var err, errreq error
+	var err, errLater error
 	// The old marshaler encodes extensions at beginning.
 	// The old marshaler encodes extensions at beginning.
 	if u.extensions.IsValid() {
 	if u.extensions.IsValid() {
 		e := ptr.offset(u.extensions).toExtensions()
 		e := ptr.offset(u.extensions).toExtensions()
@@ -252,11 +252,13 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte
 		}
 		}
 	}
 	}
 	for _, f := range u.fields {
 	for _, f := range u.fields {
-		if f.required && errreq == nil {
+		if f.required {
 			if ptr.offset(f.field).getPointer().isNil() {
 			if ptr.offset(f.field).getPointer().isNil() {
 				// Required field is not set.
 				// Required field is not set.
 				// We record the error but keep going, to give a complete marshaling.
 				// We record the error but keep going, to give a complete marshaling.
-				errreq = &RequiredNotSetError{f.name}
+				if errLater == nil {
+					errLater = &RequiredNotSetError{f.name}
+				}
 				continue
 				continue
 			}
 			}
 		}
 		}
@@ -269,14 +271,21 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte
 			if err1, ok := err.(*RequiredNotSetError); ok {
 			if err1, ok := err.(*RequiredNotSetError); ok {
 				// Required field in submessage is not set.
 				// Required field in submessage is not set.
 				// We record the error but keep going, to give a complete marshaling.
 				// We record the error but keep going, to give a complete marshaling.
-				if errreq == nil {
-					errreq = &RequiredNotSetError{f.name + "." + err1.field}
+				if errLater == nil {
+					errLater = &RequiredNotSetError{f.name + "." + err1.field}
 				}
 				}
 				continue
 				continue
 			}
 			}
 			if err == errRepeatedHasNil {
 			if err == errRepeatedHasNil {
 				err = errors.New("proto: repeated field " + f.name + " has nil element")
 				err = errors.New("proto: repeated field " + f.name + " has nil element")
 			}
 			}
+			if err == errInvalidUTF8 {
+				if errLater == nil {
+					fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
+					errLater = &invalidUTF8Error{fullName}
+				}
+				continue
+			}
 			return b, err
 			return b, err
 		}
 		}
 	}
 	}
@@ -284,7 +293,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte
 		s := *ptr.offset(u.unrecognized).toBytes()
 		s := *ptr.offset(u.unrecognized).toBytes()
 		b = append(b, s...)
 		b = append(b, s...)
 	}
 	}
-	return b, errreq
+	return b, errLater
 }
 }
 
 
 // computeMarshalInfo initializes the marshal info.
 // computeMarshalInfo initializes the marshal info.
@@ -530,6 +539,7 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma
 
 
 	packed := false
 	packed := false
 	proto3 := false
 	proto3 := false
+	validateUTF8 := true
 	for i := 2; i < len(tags); i++ {
 	for i := 2; i < len(tags); i++ {
 		if tags[i] == "packed" {
 		if tags[i] == "packed" {
 			packed = true
 			packed = true
@@ -538,6 +548,7 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma
 			proto3 = true
 			proto3 = true
 		}
 		}
 	}
 	}
+	validateUTF8 = validateUTF8 && proto3
 
 
 	switch t.Kind() {
 	switch t.Kind() {
 	case reflect.Bool:
 	case reflect.Bool:
@@ -735,6 +746,18 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma
 		}
 		}
 		return sizeFloat64Value, appendFloat64Value
 		return sizeFloat64Value, appendFloat64Value
 	case reflect.String:
 	case reflect.String:
+		if validateUTF8 {
+			if pointer {
+				return sizeStringPtr, appendUTF8StringPtr
+			}
+			if slice {
+				return sizeStringSlice, appendUTF8StringSlice
+			}
+			if nozero {
+				return sizeStringValueNoZero, appendUTF8StringValueNoZero
+			}
+			return sizeStringValue, appendUTF8StringValue
+		}
 		if pointer {
 		if pointer {
 			return sizeStringPtr, appendStringPtr
 			return sizeStringPtr, appendStringPtr
 		}
 		}
@@ -1983,52 +2006,105 @@ func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byt
 	return b, nil
 	return b, nil
 }
 }
 func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
 func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	v := *ptr.toString()
+	b = appendVarint(b, wiretag)
+	b = appendVarint(b, uint64(len(v)))
+	b = append(b, v...)
+	return b, nil
+}
+func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	v := *ptr.toString()
+	if v == "" {
+		return b, nil
+	}
+	b = appendVarint(b, wiretag)
+	b = appendVarint(b, uint64(len(v)))
+	b = append(b, v...)
+	return b, nil
+}
+func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	p := *ptr.toStringPtr()
+	if p == nil {
+		return b, nil
+	}
+	v := *p
+	b = appendVarint(b, wiretag)
+	b = appendVarint(b, uint64(len(v)))
+	b = append(b, v...)
+	return b, nil
+}
+func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	s := *ptr.toStringSlice()
+	for _, v := range s {
+		b = appendVarint(b, wiretag)
+		b = appendVarint(b, uint64(len(v)))
+		b = append(b, v...)
+	}
+	return b, nil
+}
+func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	var invalidUTF8 bool
 	v := *ptr.toString()
 	v := *ptr.toString()
 	if !utf8.ValidString(v) {
 	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
+		invalidUTF8 = true
 	}
 	}
 	b = appendVarint(b, wiretag)
 	b = appendVarint(b, wiretag)
 	b = appendVarint(b, uint64(len(v)))
 	b = appendVarint(b, uint64(len(v)))
 	b = append(b, v...)
 	b = append(b, v...)
+	if invalidUTF8 {
+		return b, errInvalidUTF8
+	}
 	return b, nil
 	return b, nil
 }
 }
-func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	var invalidUTF8 bool
 	v := *ptr.toString()
 	v := *ptr.toString()
 	if v == "" {
 	if v == "" {
 		return b, nil
 		return b, nil
 	}
 	}
 	if !utf8.ValidString(v) {
 	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
+		invalidUTF8 = true
 	}
 	}
 	b = appendVarint(b, wiretag)
 	b = appendVarint(b, wiretag)
 	b = appendVarint(b, uint64(len(v)))
 	b = appendVarint(b, uint64(len(v)))
 	b = append(b, v...)
 	b = append(b, v...)
+	if invalidUTF8 {
+		return b, errInvalidUTF8
+	}
 	return b, nil
 	return b, nil
 }
 }
-func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	var invalidUTF8 bool
 	p := *ptr.toStringPtr()
 	p := *ptr.toStringPtr()
 	if p == nil {
 	if p == nil {
 		return b, nil
 		return b, nil
 	}
 	}
 	v := *p
 	v := *p
 	if !utf8.ValidString(v) {
 	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
+		invalidUTF8 = true
 	}
 	}
 	b = appendVarint(b, wiretag)
 	b = appendVarint(b, wiretag)
 	b = appendVarint(b, uint64(len(v)))
 	b = appendVarint(b, uint64(len(v)))
 	b = append(b, v...)
 	b = append(b, v...)
+	if invalidUTF8 {
+		return b, errInvalidUTF8
+	}
 	return b, nil
 	return b, nil
 }
 }
-func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+	var invalidUTF8 bool
 	s := *ptr.toStringSlice()
 	s := *ptr.toStringSlice()
 	for _, v := range s {
 	for _, v := range s {
 		if !utf8.ValidString(v) {
 		if !utf8.ValidString(v) {
-			return nil, errInvalidUTF8
+			invalidUTF8 = true
 		}
 		}
 		b = appendVarint(b, wiretag)
 		b = appendVarint(b, wiretag)
 		b = appendVarint(b, uint64(len(v)))
 		b = appendVarint(b, uint64(len(v)))
 		b = append(b, v...)
 		b = append(b, v...)
 	}
 	}
+	if invalidUTF8 {
+		return b, errInvalidUTF8
+	}
 	return b, nil
 	return b, nil
 }
 }
 func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
 func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
@@ -2107,7 +2183,8 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
 		},
 		},
 		func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
 		func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
 			s := ptr.getPointerSlice()
 			s := ptr.getPointerSlice()
-			var err, errreq error
+			var err error
+			var nerr nonFatal
 			for _, v := range s {
 			for _, v := range s {
 				if v.isNil() {
 				if v.isNil() {
 					return b, errRepeatedHasNil
 					return b, errRepeatedHasNil
@@ -2115,22 +2192,14 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
 				b = appendVarint(b, wiretag) // start group
 				b = appendVarint(b, wiretag) // start group
 				b, err = u.marshal(b, v, deterministic)
 				b, err = u.marshal(b, v, deterministic)
 				b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
 				b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
-				if err != nil {
-					if _, ok := err.(*RequiredNotSetError); ok {
-						// Required field in submessage is not set.
-						// We record the error but keep going, to give a complete marshaling.
-						if errreq == nil {
-							errreq = err
-						}
-						continue
-					}
+				if !nerr.Merge(err) {
 					if err == ErrNil {
 					if err == ErrNil {
 						err = errRepeatedHasNil
 						err = errRepeatedHasNil
 					}
 					}
 					return b, err
 					return b, err
 				}
 				}
 			}
 			}
-			return b, errreq
+			return b, nerr.E
 		}
 		}
 }
 }
 
 
@@ -2174,7 +2243,8 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
 		},
 		},
 		func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
 		func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
 			s := ptr.getPointerSlice()
 			s := ptr.getPointerSlice()
-			var err, errreq error
+			var err error
+			var nerr nonFatal
 			for _, v := range s {
 			for _, v := range s {
 				if v.isNil() {
 				if v.isNil() {
 					return b, errRepeatedHasNil
 					return b, errRepeatedHasNil
@@ -2184,22 +2254,14 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
 				b = appendVarint(b, uint64(siz))
 				b = appendVarint(b, uint64(siz))
 				b, err = u.marshal(b, v, deterministic)
 				b, err = u.marshal(b, v, deterministic)
 
 
-				if err != nil {
-					if _, ok := err.(*RequiredNotSetError); ok {
-						// Required field in submessage is not set.
-						// We record the error but keep going, to give a complete marshaling.
-						if errreq == nil {
-							errreq = err
-						}
-						continue
-					}
+				if !nerr.Merge(err) {
 					if err == ErrNil {
 					if err == ErrNil {
 						err = errRepeatedHasNil
 						err = errRepeatedHasNil
 					}
 					}
 					return b, err
 					return b, err
 				}
 				}
 			}
 			}
-			return b, errreq
+			return b, nerr.E
 		}
 		}
 }
 }
 
 
@@ -2223,6 +2285,25 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) {
 	// value.
 	// value.
 	// Key cannot be pointer-typed.
 	// Key cannot be pointer-typed.
 	valIsPtr := valType.Kind() == reflect.Ptr
 	valIsPtr := valType.Kind() == reflect.Ptr
+
+	// If value is a message with nested maps, calling
+	// valSizer in marshal may be quadratic. We should use
+	// cached version in marshal (but not in size).
+	// If value is not message type, we don't have size cache,
+	// but it cannot be nested either. Just use valSizer.
+	valCachedSizer := valSizer
+	if valIsPtr && valType.Elem().Kind() == reflect.Struct {
+		u := getMarshalInfo(valType.Elem())
+		valCachedSizer = func(ptr pointer, tagsize int) int {
+			// Same as message sizer, but use cache.
+			p := ptr.getPointer()
+			if p.isNil() {
+				return 0
+			}
+			siz := u.cachedsize(p)
+			return siz + SizeVarint(uint64(siz)) + tagsize
+		}
+	}
 	return func(ptr pointer, tagsize int) int {
 	return func(ptr pointer, tagsize int) int {
 			m := ptr.asPointerTo(t).Elem() // the map
 			m := ptr.asPointerTo(t).Elem() // the map
 			n := 0
 			n := 0
@@ -2243,24 +2324,26 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) {
 			if len(keys) > 1 && deterministic {
 			if len(keys) > 1 && deterministic {
 				sort.Sort(mapKeys(keys))
 				sort.Sort(mapKeys(keys))
 			}
 			}
+
+			var nerr nonFatal
 			for _, k := range keys {
 			for _, k := range keys {
 				ki := k.Interface()
 				ki := k.Interface()
 				vi := m.MapIndex(k).Interface()
 				vi := m.MapIndex(k).Interface()
 				kaddr := toAddrPointer(&ki, false)    // pointer to key
 				kaddr := toAddrPointer(&ki, false)    // pointer to key
 				vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
 				vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
 				b = appendVarint(b, tag)
 				b = appendVarint(b, tag)
-				siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
+				siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
 				b = appendVarint(b, uint64(siz))
 				b = appendVarint(b, uint64(siz))
 				b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic)
 				b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic)
-				if err != nil {
+				if !nerr.Merge(err) {
 					return b, err
 					return b, err
 				}
 				}
 				b, err = valMarshaler(b, vaddr, valWireTag, deterministic)
 				b, err = valMarshaler(b, vaddr, valWireTag, deterministic)
-				if err != nil && err != ErrNil { // allow nil value in map
+				if err != ErrNil && !nerr.Merge(err) { // allow nil value in map
 					return b, err
 					return b, err
 				}
 				}
 			}
 			}
-			return b, nil
+			return b, nerr.E
 		}
 		}
 }
 }
 
 
@@ -2333,6 +2416,7 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de
 	defer mu.Unlock()
 	defer mu.Unlock()
 
 
 	var err error
 	var err error
+	var nerr nonFatal
 
 
 	// Fast-path for common cases: zero or one extensions.
 	// Fast-path for common cases: zero or one extensions.
 	// Don't bother sorting the keys.
 	// Don't bother sorting the keys.
@@ -2352,11 +2436,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de
 			v := e.value
 			v := e.value
 			p := toAddrPointer(&v, ei.isptr)
 			p := toAddrPointer(&v, ei.isptr)
 			b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
 			b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
-			if err != nil {
+			if !nerr.Merge(err) {
 				return b, err
 				return b, err
 			}
 			}
 		}
 		}
-		return b, nil
+		return b, nerr.E
 	}
 	}
 
 
 	// Sort the keys to provide a deterministic encoding.
 	// Sort the keys to provide a deterministic encoding.
@@ -2383,11 +2467,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de
 		v := e.value
 		v := e.value
 		p := toAddrPointer(&v, ei.isptr)
 		p := toAddrPointer(&v, ei.isptr)
 		b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
 		b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
-		if err != nil {
+		if !nerr.Merge(err) {
 			return b, err
 			return b, err
 		}
 		}
 	}
 	}
-	return b, nil
+	return b, nerr.E
 }
 }
 
 
 // message set format is:
 // message set format is:
@@ -2444,6 +2528,7 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de
 	defer mu.Unlock()
 	defer mu.Unlock()
 
 
 	var err error
 	var err error
+	var nerr nonFatal
 
 
 	// Fast-path for common cases: zero or one extensions.
 	// Fast-path for common cases: zero or one extensions.
 	// Don't bother sorting the keys.
 	// Don't bother sorting the keys.
@@ -2470,12 +2555,12 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de
 			v := e.value
 			v := e.value
 			p := toAddrPointer(&v, ei.isptr)
 			p := toAddrPointer(&v, ei.isptr)
 			b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
 			b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
-			if err != nil {
+			if !nerr.Merge(err) {
 				return b, err
 				return b, err
 			}
 			}
 			b = append(b, 1<<3|WireEndGroup)
 			b = append(b, 1<<3|WireEndGroup)
 		}
 		}
-		return b, nil
+		return b, nerr.E
 	}
 	}
 
 
 	// Sort the keys to provide a deterministic encoding.
 	// Sort the keys to provide a deterministic encoding.
@@ -2509,11 +2594,11 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de
 		p := toAddrPointer(&v, ei.isptr)
 		p := toAddrPointer(&v, ei.isptr)
 		b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
 		b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
 		b = append(b, 1<<3|WireEndGroup)
 		b = append(b, 1<<3|WireEndGroup)
-		if err != nil {
+		if !nerr.Merge(err) {
 			return b, err
 			return b, err
 		}
 		}
 	}
 	}
-	return b, nil
+	return b, nerr.E
 }
 }
 
 
 // sizeV1Extensions computes the size of encoded data for a V1-API extension field.
 // sizeV1Extensions computes the size of encoded data for a V1-API extension field.
@@ -2556,6 +2641,7 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ
 	sort.Ints(keys)
 	sort.Ints(keys)
 
 
 	var err error
 	var err error
+	var nerr nonFatal
 	for _, k := range keys {
 	for _, k := range keys {
 		e := m[int32(k)]
 		e := m[int32(k)]
 		if e.value == nil || e.desc == nil {
 		if e.value == nil || e.desc == nil {
@@ -2572,11 +2658,11 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ
 		v := e.value
 		v := e.value
 		p := toAddrPointer(&v, ei.isptr)
 		p := toAddrPointer(&v, ei.isptr)
 		b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
 		b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
-		if err != nil {
+		if !nerr.Merge(err) {
 			return b, err
 			return b, err
 		}
 		}
 	}
 	}
-	return b, nil
+	return b, nerr.E
 }
 }
 
 
 // newMarshaler is the interface representing objects that can marshal themselves.
 // newMarshaler is the interface representing objects that can marshal themselves.

+ 113 - 29
vendor/github.com/golang/protobuf/proto/table_unmarshal.go

@@ -97,6 +97,8 @@ type unmarshalFieldInfo struct {
 
 
 	// if a required field, contains a single set bit at this field's index in the required field list.
 	// if a required field, contains a single set bit at this field's index in the required field list.
 	reqMask uint64
 	reqMask uint64
+
+	name string // name of the field, for error reporting
 }
 }
 
 
 var (
 var (
@@ -136,8 +138,8 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error {
 	if u.isMessageSet {
 	if u.isMessageSet {
 		return UnmarshalMessageSet(b, m.offset(u.extensions).toExtensions())
 		return UnmarshalMessageSet(b, m.offset(u.extensions).toExtensions())
 	}
 	}
-	var reqMask uint64            // bitmask of required fields we've seen.
-	var rnse *RequiredNotSetError // an instance of a RequiredNotSetError returned by a submessage.
+	var reqMask uint64 // bitmask of required fields we've seen.
+	var errLater error
 	for len(b) > 0 {
 	for len(b) > 0 {
 		// Read tag and wire type.
 		// Read tag and wire type.
 		// Special case 1 and 2 byte varints.
 		// Special case 1 and 2 byte varints.
@@ -176,11 +178,20 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error {
 			if r, ok := err.(*RequiredNotSetError); ok {
 			if r, ok := err.(*RequiredNotSetError); ok {
 				// Remember this error, but keep parsing. We need to produce
 				// Remember this error, but keep parsing. We need to produce
 				// a full parse even if a required field is missing.
 				// a full parse even if a required field is missing.
-				rnse = r
+				if errLater == nil {
+					errLater = r
+				}
 				reqMask |= f.reqMask
 				reqMask |= f.reqMask
 				continue
 				continue
 			}
 			}
 			if err != errInternalBadWireType {
 			if err != errInternalBadWireType {
+				if err == errInvalidUTF8 {
+					if errLater == nil {
+						fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
+						errLater = &invalidUTF8Error{fullName}
+					}
+					continue
+				}
 				return err
 				return err
 			}
 			}
 			// Fragments with bad wire type are treated as unknown fields.
 			// Fragments with bad wire type are treated as unknown fields.
@@ -239,20 +250,16 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error {
 			emap[int32(tag)] = e
 			emap[int32(tag)] = e
 		}
 		}
 	}
 	}
-	if rnse != nil {
-		// A required field of a submessage/group is missing. Return that error.
-		return rnse
-	}
-	if reqMask != u.reqMask {
+	if reqMask != u.reqMask && errLater == nil {
 		// A required field of this message is missing.
 		// A required field of this message is missing.
 		for _, n := range u.reqFields {
 		for _, n := range u.reqFields {
 			if reqMask&1 == 0 {
 			if reqMask&1 == 0 {
-				return &RequiredNotSetError{n}
+				errLater = &RequiredNotSetError{n}
 			}
 			}
 			reqMask >>= 1
 			reqMask >>= 1
 		}
 		}
 	}
 	}
-	return nil
+	return errLater
 }
 }
 
 
 // computeUnmarshalInfo fills in u with information for use
 // computeUnmarshalInfo fills in u with information for use
@@ -351,7 +358,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() {
 		}
 		}
 
 
 		// Store the info in the correct slot in the message.
 		// Store the info in the correct slot in the message.
-		u.setTag(tag, toField(&f), unmarshal, reqMask)
+		u.setTag(tag, toField(&f), unmarshal, reqMask, name)
 	}
 	}
 
 
 	// Find any types associated with oneof fields.
 	// Find any types associated with oneof fields.
@@ -366,10 +373,17 @@ func (u *unmarshalInfo) computeUnmarshalInfo() {
 
 
 			f := typ.Field(0) // oneof implementers have one field
 			f := typ.Field(0) // oneof implementers have one field
 			baseUnmarshal := fieldUnmarshaler(&f)
 			baseUnmarshal := fieldUnmarshaler(&f)
-			tagstr := strings.Split(f.Tag.Get("protobuf"), ",")[1]
-			tag, err := strconv.Atoi(tagstr)
+			tags := strings.Split(f.Tag.Get("protobuf"), ",")
+			fieldNum, err := strconv.Atoi(tags[1])
 			if err != nil {
 			if err != nil {
-				panic("protobuf tag field not an integer: " + tagstr)
+				panic("protobuf tag field not an integer: " + tags[1])
+			}
+			var name string
+			for _, tag := range tags {
+				if strings.HasPrefix(tag, "name=") {
+					name = strings.TrimPrefix(tag, "name=")
+					break
+				}
 			}
 			}
 
 
 			// Find the oneof field that this struct implements.
 			// Find the oneof field that this struct implements.
@@ -380,7 +394,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() {
 					// That lets us know where this struct should be stored
 					// That lets us know where this struct should be stored
 					// when we encounter it during unmarshaling.
 					// when we encounter it during unmarshaling.
 					unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal)
 					unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal)
-					u.setTag(tag, of.field, unmarshal, 0)
+					u.setTag(fieldNum, of.field, unmarshal, 0, name)
 				}
 				}
 			}
 			}
 		}
 		}
@@ -401,7 +415,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() {
 	// [0 0] is [tag=0/wiretype=varint varint-encoded-0].
 	// [0 0] is [tag=0/wiretype=varint varint-encoded-0].
 	u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) {
 	u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) {
 		return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w)
 		return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w)
-	}, 0)
+	}, 0, "")
 
 
 	// Set mask for required field check.
 	// Set mask for required field check.
 	u.reqMask = uint64(1)<<uint(len(u.reqFields)) - 1
 	u.reqMask = uint64(1)<<uint(len(u.reqFields)) - 1
@@ -413,8 +427,9 @@ func (u *unmarshalInfo) computeUnmarshalInfo() {
 // tag = tag # for field
 // tag = tag # for field
 // field/unmarshal = unmarshal info for that field.
 // field/unmarshal = unmarshal info for that field.
 // reqMask = if required, bitmask for field position in required field list. 0 otherwise.
 // reqMask = if required, bitmask for field position in required field list. 0 otherwise.
-func (u *unmarshalInfo) setTag(tag int, field field, unmarshal unmarshaler, reqMask uint64) {
-	i := unmarshalFieldInfo{field: field, unmarshal: unmarshal, reqMask: reqMask}
+// name = short name of the field.
+func (u *unmarshalInfo) setTag(tag int, field field, unmarshal unmarshaler, reqMask uint64, name string) {
+	i := unmarshalFieldInfo{field: field, unmarshal: unmarshal, reqMask: reqMask, name: name}
 	n := u.typ.NumField()
 	n := u.typ.NumField()
 	if tag >= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here?
 	if tag >= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here?
 		for len(u.dense) <= tag {
 		for len(u.dense) <= tag {
@@ -442,11 +457,17 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler {
 	tagArray := strings.Split(tags, ",")
 	tagArray := strings.Split(tags, ",")
 	encoding := tagArray[0]
 	encoding := tagArray[0]
 	name := "unknown"
 	name := "unknown"
+	proto3 := false
+	validateUTF8 := true
 	for _, tag := range tagArray[3:] {
 	for _, tag := range tagArray[3:] {
 		if strings.HasPrefix(tag, "name=") {
 		if strings.HasPrefix(tag, "name=") {
 			name = tag[5:]
 			name = tag[5:]
 		}
 		}
+		if tag == "proto3" {
+			proto3 = true
+		}
 	}
 	}
+	validateUTF8 = validateUTF8 && proto3
 
 
 	// Figure out packaging (pointer, slice, or both)
 	// Figure out packaging (pointer, slice, or both)
 	slice := false
 	slice := false
@@ -594,6 +615,15 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler {
 		}
 		}
 		return unmarshalBytesValue
 		return unmarshalBytesValue
 	case reflect.String:
 	case reflect.String:
+		if validateUTF8 {
+			if pointer {
+				return unmarshalUTF8StringPtr
+			}
+			if slice {
+				return unmarshalUTF8StringSlice
+			}
+			return unmarshalUTF8StringValue
+		}
 		if pointer {
 		if pointer {
 			return unmarshalStringPtr
 			return unmarshalStringPtr
 		}
 		}
@@ -1448,9 +1478,6 @@ func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) {
 		return nil, io.ErrUnexpectedEOF
 		return nil, io.ErrUnexpectedEOF
 	}
 	}
 	v := string(b[:x])
 	v := string(b[:x])
-	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
-	}
 	*f.toString() = v
 	*f.toString() = v
 	return b[x:], nil
 	return b[x:], nil
 }
 }
@@ -1468,9 +1495,6 @@ func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) {
 		return nil, io.ErrUnexpectedEOF
 		return nil, io.ErrUnexpectedEOF
 	}
 	}
 	v := string(b[:x])
 	v := string(b[:x])
-	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
-	}
 	*f.toStringPtr() = &v
 	*f.toStringPtr() = &v
 	return b[x:], nil
 	return b[x:], nil
 }
 }
@@ -1488,11 +1512,69 @@ func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) {
 		return nil, io.ErrUnexpectedEOF
 		return nil, io.ErrUnexpectedEOF
 	}
 	}
 	v := string(b[:x])
 	v := string(b[:x])
+	s := f.toStringSlice()
+	*s = append(*s, v)
+	return b[x:], nil
+}
+
+func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) {
+	if w != WireBytes {
+		return b, errInternalBadWireType
+	}
+	x, n := decodeVarint(b)
+	if n == 0 {
+		return nil, io.ErrUnexpectedEOF
+	}
+	b = b[n:]
+	if x > uint64(len(b)) {
+		return nil, io.ErrUnexpectedEOF
+	}
+	v := string(b[:x])
+	*f.toString() = v
 	if !utf8.ValidString(v) {
 	if !utf8.ValidString(v) {
-		return nil, errInvalidUTF8
+		return b[x:], errInvalidUTF8
 	}
 	}
+	return b[x:], nil
+}
+
+func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) {
+	if w != WireBytes {
+		return b, errInternalBadWireType
+	}
+	x, n := decodeVarint(b)
+	if n == 0 {
+		return nil, io.ErrUnexpectedEOF
+	}
+	b = b[n:]
+	if x > uint64(len(b)) {
+		return nil, io.ErrUnexpectedEOF
+	}
+	v := string(b[:x])
+	*f.toStringPtr() = &v
+	if !utf8.ValidString(v) {
+		return b[x:], errInvalidUTF8
+	}
+	return b[x:], nil
+}
+
+func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) {
+	if w != WireBytes {
+		return b, errInternalBadWireType
+	}
+	x, n := decodeVarint(b)
+	if n == 0 {
+		return nil, io.ErrUnexpectedEOF
+	}
+	b = b[n:]
+	if x > uint64(len(b)) {
+		return nil, io.ErrUnexpectedEOF
+	}
+	v := string(b[:x])
 	s := f.toStringSlice()
 	s := f.toStringSlice()
 	*s = append(*s, v)
 	*s = append(*s, v)
+	if !utf8.ValidString(v) {
+		return b[x:], errInvalidUTF8
+	}
 	return b[x:], nil
 	return b[x:], nil
 }
 }
 
 
@@ -1674,6 +1756,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler {
 		// Maps will be somewhat slow. Oh well.
 		// Maps will be somewhat slow. Oh well.
 
 
 		// Read key and value from data.
 		// Read key and value from data.
+		var nerr nonFatal
 		k := reflect.New(kt)
 		k := reflect.New(kt)
 		v := reflect.New(vt)
 		v := reflect.New(vt)
 		for len(b) > 0 {
 		for len(b) > 0 {
@@ -1694,7 +1777,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler {
 				err = errInternalBadWireType // skip unknown tag
 				err = errInternalBadWireType // skip unknown tag
 			}
 			}
 
 
-			if err == nil {
+			if nerr.Merge(err) {
 				continue
 				continue
 			}
 			}
 			if err != errInternalBadWireType {
 			if err != errInternalBadWireType {
@@ -1717,7 +1800,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler {
 		// Insert into map.
 		// Insert into map.
 		m.SetMapIndex(k.Elem(), v.Elem())
 		m.SetMapIndex(k.Elem(), v.Elem())
 
 
-		return r, nil
+		return r, nerr.E
 	}
 	}
 }
 }
 
 
@@ -1743,15 +1826,16 @@ func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshal
 		// Unmarshal data into holder.
 		// Unmarshal data into holder.
 		// We unmarshal into the first field of the holder object.
 		// We unmarshal into the first field of the holder object.
 		var err error
 		var err error
+		var nerr nonFatal
 		b, err = unmarshal(b, valToPointer(v).offset(field0), w)
 		b, err = unmarshal(b, valToPointer(v).offset(field0), w)
-		if err != nil {
+		if !nerr.Merge(err) {
 			return nil, err
 			return nil, err
 		}
 		}
 
 
 		// Write pointer to holder into target field.
 		// Write pointer to holder into target field.
 		f.asPointerTo(ityp).Elem().Set(v)
 		f.asPointerTo(ityp).Elem().Set(v)
 
 
-		return b, nil
+		return b, nerr.E
 	}
 	}
 }
 }
 
 

+ 2 - 2
vendor/github.com/golang/protobuf/proto/text.go

@@ -353,7 +353,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
 						return err
 						return err
 					}
 					}
 				}
 				}
-				if err := tm.writeAny(w, key, props.mkeyprop); err != nil {
+				if err := tm.writeAny(w, key, props.MapKeyProp); err != nil {
 					return err
 					return err
 				}
 				}
 				if err := w.WriteByte('\n'); err != nil {
 				if err := w.WriteByte('\n'); err != nil {
@@ -370,7 +370,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
 							return err
 							return err
 						}
 						}
 					}
 					}
-					if err := tm.writeAny(w, val, props.mvalprop); err != nil {
+					if err := tm.writeAny(w, val, props.MapValProp); err != nil {
 						return err
 						return err
 					}
 					}
 					if err := w.WriteByte('\n'); err != nil {
 					if err := w.WriteByte('\n'); err != nil {

+ 3 - 3
vendor/github.com/golang/protobuf/proto/text_parser.go

@@ -630,17 +630,17 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error {
 					if err := p.consumeToken(":"); err != nil {
 					if err := p.consumeToken(":"); err != nil {
 						return err
 						return err
 					}
 					}
-					if err := p.readAny(key, props.mkeyprop); err != nil {
+					if err := p.readAny(key, props.MapKeyProp); err != nil {
 						return err
 						return err
 					}
 					}
 					if err := p.consumeOptionalSeparator(); err != nil {
 					if err := p.consumeOptionalSeparator(); err != nil {
 						return err
 						return err
 					}
 					}
 				case "value":
 				case "value":
-					if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil {
+					if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil {
 						return err
 						return err
 					}
 					}
-					if err := p.readAny(val, props.mvalprop); err != nil {
+					if err := p.readAny(val, props.MapValProp); err != nil {
 						return err
 						return err
 					}
 					}
 					if err := p.consumeOptionalSeparator(); err != nil {
 					if err := p.consumeOptionalSeparator(); err != nil {

+ 6 - 4
vendor/github.com/golang/protobuf/ptypes/any.go

@@ -130,10 +130,12 @@ func UnmarshalAny(any *any.Any, pb proto.Message) error {
 
 
 // Is returns true if any value contains a given message type.
 // Is returns true if any value contains a given message type.
 func Is(any *any.Any, pb proto.Message) bool {
 func Is(any *any.Any, pb proto.Message) bool {
-	aname, err := AnyMessageName(any)
-	if err != nil {
+	// The following is equivalent to AnyMessageName(any) == proto.MessageName(pb),
+	// but it avoids scanning TypeUrl for the slash.
+	if any == nil {
 		return false
 		return false
 	}
 	}
-
-	return aname == proto.MessageName(pb)
+	name := proto.MessageName(pb)
+	prefix := len(any.TypeUrl) - len(name)
+	return prefix >= 1 && any.TypeUrl[prefix-1] == '/' && any.TypeUrl[prefix:] == name
 }
 }

+ 1 - 1
vendor/github.com/golang/protobuf/ptypes/any/any.pb.go

@@ -121,7 +121,7 @@ type Any struct {
 	// Schemes other than `http`, `https` (or the empty scheme) might be
 	// Schemes other than `http`, `https` (or the empty scheme) might be
 	// used with implementation specific semantics.
 	// used with implementation specific semantics.
 	//
 	//
-	TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl" json:"type_url,omitempty"`
+	TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
 	// Must be a valid serialized protocol buffer of the above specified type.
 	// Must be a valid serialized protocol buffer of the above specified type.
 	Value                []byte   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
 	Value                []byte   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`

+ 2 - 2
vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go

@@ -82,14 +82,14 @@ type Duration struct {
 	// Signed seconds of the span of time. Must be from -315,576,000,000
 	// Signed seconds of the span of time. Must be from -315,576,000,000
 	// to +315,576,000,000 inclusive. Note: these bounds are computed from:
 	// to +315,576,000,000 inclusive. Note: these bounds are computed from:
 	// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
 	// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
-	Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
+	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
 	// Signed fractions of a second at nanosecond resolution of the span
 	// Signed fractions of a second at nanosecond resolution of the span
 	// of time. Durations less than one second are represented with a 0
 	// of time. Durations less than one second are represented with a 0
 	// `seconds` field and a positive or negative `nanos` field. For durations
 	// `seconds` field and a positive or negative `nanos` field. For durations
 	// of one second or more, a non-zero value for the `nanos` field must be
 	// of one second or more, a non-zero value for the `nanos` field must be
 	// of the same sign as the `seconds` field. Must be from -999,999,999
 	// of the same sign as the `seconds` field. Must be from -999,999,999
 	// to +999,999,999 inclusive.
 	// to +999,999,999 inclusive.
-	Nanos                int32    `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
+	Nanos                int32    `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_sizecache        int32    `json:"-"`
 	XXX_sizecache        int32    `json:"-"`

+ 21 - 11
vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go

@@ -54,7 +54,7 @@ func (NullValue) XXX_WellKnownType() string { return "NullValue" }
 // The JSON representation for `Struct` is JSON object.
 // The JSON representation for `Struct` is JSON object.
 type Struct struct {
 type Struct struct {
 	// Unordered map of dynamically typed values.
 	// Unordered map of dynamically typed values.
-	Fields               map[string]*Value `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+	Fields               map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
 	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
 	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
 	XXX_unrecognized     []byte            `json:"-"`
 	XXX_unrecognized     []byte            `json:"-"`
 	XXX_sizecache        int32             `json:"-"`
 	XXX_sizecache        int32             `json:"-"`
@@ -144,30 +144,40 @@ type isValue_Kind interface {
 }
 }
 
 
 type Value_NullValue struct {
 type Value_NullValue struct {
-	NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,enum=google.protobuf.NullValue,oneof"`
+	NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"`
 }
 }
+
 type Value_NumberValue struct {
 type Value_NumberValue struct {
-	NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,oneof"`
+	NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof"`
 }
 }
+
 type Value_StringValue struct {
 type Value_StringValue struct {
-	StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,oneof"`
+	StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"`
 }
 }
+
 type Value_BoolValue struct {
 type Value_BoolValue struct {
-	BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,oneof"`
+	BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
 }
 }
+
 type Value_StructValue struct {
 type Value_StructValue struct {
-	StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,oneof"`
+	StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof"`
 }
 }
+
 type Value_ListValue struct {
 type Value_ListValue struct {
-	ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,oneof"`
+	ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof"`
 }
 }
 
 
-func (*Value_NullValue) isValue_Kind()   {}
+func (*Value_NullValue) isValue_Kind() {}
+
 func (*Value_NumberValue) isValue_Kind() {}
 func (*Value_NumberValue) isValue_Kind() {}
+
 func (*Value_StringValue) isValue_Kind() {}
 func (*Value_StringValue) isValue_Kind() {}
-func (*Value_BoolValue) isValue_Kind()   {}
+
+func (*Value_BoolValue) isValue_Kind() {}
+
 func (*Value_StructValue) isValue_Kind() {}
 func (*Value_StructValue) isValue_Kind() {}
-func (*Value_ListValue) isValue_Kind()   {}
+
+func (*Value_ListValue) isValue_Kind() {}
 
 
 func (m *Value) GetKind() isValue_Kind {
 func (m *Value) GetKind() isValue_Kind {
 	if m != nil {
 	if m != nil {
@@ -358,7 +368,7 @@ func _Value_OneofSizer(msg proto.Message) (n int) {
 // The JSON representation for `ListValue` is JSON array.
 // The JSON representation for `ListValue` is JSON array.
 type ListValue struct {
 type ListValue struct {
 	// Repeated field of dynamically typed values.
 	// Repeated field of dynamically typed values.
-	Values               []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
+	Values               []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_sizecache        int32    `json:"-"`
 	XXX_sizecache        int32    `json:"-"`

+ 2 - 2
vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go

@@ -100,12 +100,12 @@ type Timestamp struct {
 	// Represents seconds of UTC time since Unix epoch
 	// Represents seconds of UTC time since Unix epoch
 	// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
 	// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
 	// 9999-12-31T23:59:59Z inclusive.
 	// 9999-12-31T23:59:59Z inclusive.
-	Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
+	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
 	// Non-negative fractions of a second at nanosecond resolution. Negative
 	// Non-negative fractions of a second at nanosecond resolution. Negative
 	// second values with fractions must still have non-negative nanos values
 	// second values with fractions must still have non-negative nanos values
 	// that count forward in time. Must be from 0 to 999,999,999
 	// that count forward in time. Must be from 0 to 999,999,999
 	// inclusive.
 	// inclusive.
-	Nanos                int32    `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
+	Nanos                int32    `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_sizecache        int32    `json:"-"`
 	XXX_sizecache        int32    `json:"-"`

+ 0 - 201
vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/LICENSE

@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

+ 0 - 27
vendor/github.com/petar/GoLLRB/LICENSE

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

+ 0 - 39
vendor/github.com/petar/GoLLRB/llrb/avgvar.go

@@ -1,39 +0,0 @@
-// Copyright 2010 Petar Maymounkov. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package llrb
-
-import "math"
-
-// avgVar maintains the average and variance of a stream of numbers
-// in a space-efficient manner.
-type avgVar struct {
-	count      int64
-	sum, sumsq float64
-}
-
-func (av *avgVar) Init() {
-	av.count = 0
-	av.sum = 0.0
-	av.sumsq = 0.0
-}
-
-func (av *avgVar) Add(sample float64) {
-	av.count++
-	av.sum += sample
-	av.sumsq += sample * sample
-}
-
-func (av *avgVar) GetCount() int64 { return av.count }
-
-func (av *avgVar) GetAvg() float64 { return av.sum / float64(av.count) }
-
-func (av *avgVar) GetTotal() float64 { return av.sum }
-
-func (av *avgVar) GetVar() float64 {
-	a := av.GetAvg()
-	return av.sumsq/float64(av.count) - a*a
-}
-
-func (av *avgVar) GetStdDev() float64 { return math.Sqrt(av.GetVar()) }

+ 0 - 93
vendor/github.com/petar/GoLLRB/llrb/iterator.go

@@ -1,93 +0,0 @@
-package llrb
-
-type ItemIterator func(i Item) bool
-
-//func (t *Tree) Ascend(iterator ItemIterator) {
-//	t.AscendGreaterOrEqual(Inf(-1), iterator)
-//}
-
-func (t *LLRB) AscendRange(greaterOrEqual, lessThan Item, iterator ItemIterator) {
-	t.ascendRange(t.root, greaterOrEqual, lessThan, iterator)
-}
-
-func (t *LLRB) ascendRange(h *Node, inf, sup Item, iterator ItemIterator) bool {
-	if h == nil {
-		return true
-	}
-	if !less(h.Item, sup) {
-		return t.ascendRange(h.Left, inf, sup, iterator)
-	}
-	if less(h.Item, inf) {
-		return t.ascendRange(h.Right, inf, sup, iterator)
-	}
-
-	if !t.ascendRange(h.Left, inf, sup, iterator) {
-		return false
-	}
-	if !iterator(h.Item) {
-		return false
-	}
-	return t.ascendRange(h.Right, inf, sup, iterator)
-}
-
-// AscendGreaterOrEqual will call iterator once for each element greater or equal to
-// pivot in ascending order. It will stop whenever the iterator returns false.
-func (t *LLRB) AscendGreaterOrEqual(pivot Item, iterator ItemIterator) {
-	t.ascendGreaterOrEqual(t.root, pivot, iterator)
-}
-
-func (t *LLRB) ascendGreaterOrEqual(h *Node, pivot Item, iterator ItemIterator) bool {
-	if h == nil {
-		return true
-	}
-	if !less(h.Item, pivot) {
-		if !t.ascendGreaterOrEqual(h.Left, pivot, iterator) {
-			return false
-		}
-		if !iterator(h.Item) {
-			return false
-		}
-	}
-	return t.ascendGreaterOrEqual(h.Right, pivot, iterator)
-}
-
-func (t *LLRB) AscendLessThan(pivot Item, iterator ItemIterator) {
-	t.ascendLessThan(t.root, pivot, iterator)
-}
-
-func (t *LLRB) ascendLessThan(h *Node, pivot Item, iterator ItemIterator) bool {
-	if h == nil {
-		return true
-	}
-	if !t.ascendLessThan(h.Left, pivot, iterator) {
-		return false
-	}
-	if !iterator(h.Item) {
-		return false
-	}
-	if less(h.Item, pivot) {
-		return t.ascendLessThan(h.Left, pivot, iterator)
-	}
-	return true
-}
-
-// DescendLessOrEqual will call iterator once for each element less than the
-// pivot in descending order. It will stop whenever the iterator returns false.
-func (t *LLRB) DescendLessOrEqual(pivot Item, iterator ItemIterator) {
-	t.descendLessOrEqual(t.root, pivot, iterator)
-}
-
-func (t *LLRB) descendLessOrEqual(h *Node, pivot Item, iterator ItemIterator) bool {
-	if h == nil {
-		return true
-	}
-	if less(h.Item, pivot) || !less(pivot, h.Item) {
-		if !t.descendLessOrEqual(h.Right, pivot, iterator) {
-			return false
-		}
-		if !iterator(h.Item) {
-			return false
-		}
-	}
-	return t.descendLessOrEqual(h.Left, pivot, iterator)
-}

+ 0 - 46
vendor/github.com/petar/GoLLRB/llrb/llrb-stats.go

@@ -1,46 +0,0 @@
-// Copyright 2010 Petar Maymounkov. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package llrb
-
-// GetHeight() returns an item in the tree with key @key, and it's height in the tree
-func (t *LLRB) GetHeight(key Item) (result Item, depth int) {
-	return t.getHeight(t.root, key)
-}
-
-func (t *LLRB) getHeight(h *Node, item Item) (Item, int) {
-	if h == nil {
-		return nil, 0
-	}
-	if less(item, h.Item) {
-		result, depth := t.getHeight(h.Left, item)
-		return result, depth + 1
-	}
-	if less(h.Item, item) {
-		result, depth := t.getHeight(h.Right, item)
-		return result, depth + 1
-	}
-	return h.Item, 0
-}
-
-// HeightStats() returns the average and standard deviation of the height
-// of elements in the tree
-func (t *LLRB) HeightStats() (avg, stddev float64) {
-	av := &avgVar{}
-	heightStats(t.root, 0, av)
-	return av.GetAvg(), av.GetStdDev()
-}
-
-func heightStats(h *Node, d int, av *avgVar) {
-	if h == nil {
-		return
-	}
-	av.Add(float64(d))
-	if h.Left != nil {
-		heightStats(h.Left, d+1, av)
-	}
-	if h.Right != nil {
-		heightStats(h.Right, d+1, av)
-	}
-}

+ 0 - 456
vendor/github.com/petar/GoLLRB/llrb/llrb.go

@@ -1,456 +0,0 @@
-// Copyright 2010 Petar Maymounkov. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// A Left-Leaning Red-Black (LLRB) implementation of 2-3 balanced binary search trees,
-// based on the following work:
-//
-//   http://www.cs.princeton.edu/~rs/talks/LLRB/08Penn.pdf
-//   http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf
-//   http://www.cs.princeton.edu/~rs/talks/LLRB/Java/RedBlackBST.java
-//
-//  2-3 trees (and the run-time equivalent 2-3-4 trees) are the de facto standard BST
-//  algoritms found in implementations of Python, Java, and other libraries. The LLRB
-//  implementation of 2-3 trees is a recent improvement on the traditional implementation,
-//  observed and documented by Robert Sedgewick.
-//
-package llrb
-
-// Tree is a Left-Leaning Red-Black (LLRB) implementation of 2-3 trees
-type LLRB struct {
-	count int
-	root  *Node
-}
-
-type Node struct {
-	Item
-	Left, Right *Node // Pointers to left and right child nodes
-	Black       bool  // If set, the color of the link (incoming from the parent) is black
-	// In the LLRB, new nodes are always red, hence the zero-value for node
-}
-
-type Item interface {
-	Less(than Item) bool
-}
-
-//
-func less(x, y Item) bool {
-	if x == pinf {
-		return false
-	}
-	if x == ninf {
-		return true
-	}
-	return x.Less(y)
-}
-
-// Inf returns an Item that is "bigger than" any other item, if sign is positive.
-// Otherwise  it returns an Item that is "smaller than" any other item.
-func Inf(sign int) Item {
-	if sign == 0 {
-		panic("sign")
-	}
-	if sign > 0 {
-		return pinf
-	}
-	return ninf
-}
-
-var (
-	ninf = nInf{}
-	pinf = pInf{}
-)
-
-type nInf struct{}
-
-func (nInf) Less(Item) bool {
-	return true
-}
-
-type pInf struct{}
-
-func (pInf) Less(Item) bool {
-	return false
-}
-
-// New() allocates a new tree
-func New() *LLRB {
-	return &LLRB{}
-}
-
-// SetRoot sets the root node of the tree.
-// It is intended to be used by functions that deserialize the tree.
-func (t *LLRB) SetRoot(r *Node) {
-	t.root = r
-}
-
-// Root returns the root node of the tree.
-// It is intended to be used by functions that serialize the tree.
-func (t *LLRB) Root() *Node {
-	return t.root
-}
-
-// Len returns the number of nodes in the tree.
-func (t *LLRB) Len() int { return t.count }
-
-// Has returns true if the tree contains an element whose order is the same as that of key.
-func (t *LLRB) Has(key Item) bool {
-	return t.Get(key) != nil
-}
-
-// Get retrieves an element from the tree whose order is the same as that of key.
-func (t *LLRB) Get(key Item) Item {
-	h := t.root
-	for h != nil {
-		switch {
-		case less(key, h.Item):
-			h = h.Left
-		case less(h.Item, key):
-			h = h.Right
-		default:
-			return h.Item
-		}
-	}
-	return nil
-}
-
-// Min returns the minimum element in the tree.
-func (t *LLRB) Min() Item {
-	h := t.root
-	if h == nil {
-		return nil
-	}
-	for h.Left != nil {
-		h = h.Left
-	}
-	return h.Item
-}
-
-// Max returns the maximum element in the tree.
-func (t *LLRB) Max() Item {
-	h := t.root
-	if h == nil {
-		return nil
-	}
-	for h.Right != nil {
-		h = h.Right
-	}
-	return h.Item
-}
-
-func (t *LLRB) ReplaceOrInsertBulk(items ...Item) {
-	for _, i := range items {
-		t.ReplaceOrInsert(i)
-	}
-}
-
-func (t *LLRB) InsertNoReplaceBulk(items ...Item) {
-	for _, i := range items {
-		t.InsertNoReplace(i)
-	}
-}
-
-// ReplaceOrInsert inserts item into the tree. If an existing
-// element has the same order, it is removed from the tree and returned.
-func (t *LLRB) ReplaceOrInsert(item Item) Item {
-	if item == nil {
-		panic("inserting nil item")
-	}
-	var replaced Item
-	t.root, replaced = t.replaceOrInsert(t.root, item)
-	t.root.Black = true
-	if replaced == nil {
-		t.count++
-	}
-	return replaced
-}
-
-func (t *LLRB) replaceOrInsert(h *Node, item Item) (*Node, Item) {
-	if h == nil {
-		return newNode(item), nil
-	}
-
-	h = walkDownRot23(h)
-
-	var replaced Item
-	if less(item, h.Item) { // BUG
-		h.Left, replaced = t.replaceOrInsert(h.Left, item)
-	} else if less(h.Item, item) {
-		h.Right, replaced = t.replaceOrInsert(h.Right, item)
-	} else {
-		replaced, h.Item = h.Item, item
-	}
-
-	h = walkUpRot23(h)
-
-	return h, replaced
-}
-
-// InsertNoReplace inserts item into the tree. If an existing
-// element has the same order, both elements remain in the tree.
-func (t *LLRB) InsertNoReplace(item Item) {
-	if item == nil {
-		panic("inserting nil item")
-	}
-	t.root = t.insertNoReplace(t.root, item)
-	t.root.Black = true
-	t.count++
-}
-
-func (t *LLRB) insertNoReplace(h *Node, item Item) *Node {
-	if h == nil {
-		return newNode(item)
-	}
-
-	h = walkDownRot23(h)
-
-	if less(item, h.Item) {
-		h.Left = t.insertNoReplace(h.Left, item)
-	} else {
-		h.Right = t.insertNoReplace(h.Right, item)
-	}
-
-	return walkUpRot23(h)
-}
-
-// Rotation driver routines for 2-3 algorithm
-
-func walkDownRot23(h *Node) *Node { return h }
-
-func walkUpRot23(h *Node) *Node {
-	if isRed(h.Right) && !isRed(h.Left) {
-		h = rotateLeft(h)
-	}
-
-	if isRed(h.Left) && isRed(h.Left.Left) {
-		h = rotateRight(h)
-	}
-
-	if isRed(h.Left) && isRed(h.Right) {
-		flip(h)
-	}
-
-	return h
-}
-
-// Rotation driver routines for 2-3-4 algorithm
-
-func walkDownRot234(h *Node) *Node {
-	if isRed(h.Left) && isRed(h.Right) {
-		flip(h)
-	}
-
-	return h
-}
-
-func walkUpRot234(h *Node) *Node {
-	if isRed(h.Right) && !isRed(h.Left) {
-		h = rotateLeft(h)
-	}
-
-	if isRed(h.Left) && isRed(h.Left.Left) {
-		h = rotateRight(h)
-	}
-
-	return h
-}
-
-// DeleteMin deletes the minimum element in the tree and returns the
-// deleted item or nil otherwise.
-func (t *LLRB) DeleteMin() Item {
-	var deleted Item
-	t.root, deleted = deleteMin(t.root)
-	if t.root != nil {
-		t.root.Black = true
-	}
-	if deleted != nil {
-		t.count--
-	}
-	return deleted
-}
-
-// deleteMin code for LLRB 2-3 trees
-func deleteMin(h *Node) (*Node, Item) {
-	if h == nil {
-		return nil, nil
-	}
-	if h.Left == nil {
-		return nil, h.Item
-	}
-
-	if !isRed(h.Left) && !isRed(h.Left.Left) {
-		h = moveRedLeft(h)
-	}
-
-	var deleted Item
-	h.Left, deleted = deleteMin(h.Left)
-
-	return fixUp(h), deleted
-}
-
-// DeleteMax deletes the maximum element in the tree and returns
-// the deleted item or nil otherwise
-func (t *LLRB) DeleteMax() Item {
-	var deleted Item
-	t.root, deleted = deleteMax(t.root)
-	if t.root != nil {
-		t.root.Black = true
-	}
-	if deleted != nil {
-		t.count--
-	}
-	return deleted
-}
-
-func deleteMax(h *Node) (*Node, Item) {
-	if h == nil {
-		return nil, nil
-	}
-	if isRed(h.Left) {
-		h = rotateRight(h)
-	}
-	if h.Right == nil {
-		return nil, h.Item
-	}
-	if !isRed(h.Right) && !isRed(h.Right.Left) {
-		h = moveRedRight(h)
-	}
-	var deleted Item
-	h.Right, deleted = deleteMax(h.Right)
-
-	return fixUp(h), deleted
-}
-
-// Delete deletes an item from the tree whose key equals key.
-// The deleted item is return, otherwise nil is returned.
-func (t *LLRB) Delete(key Item) Item {
-	var deleted Item
-	t.root, deleted = t.delete(t.root, key)
-	if t.root != nil {
-		t.root.Black = true
-	}
-	if deleted != nil {
-		t.count--
-	}
-	return deleted
-}
-
-func (t *LLRB) delete(h *Node, item Item) (*Node, Item) {
-	var deleted Item
-	if h == nil {
-		return nil, nil
-	}
-	if less(item, h.Item) {
-		if h.Left == nil { // item not present. Nothing to delete
-			return h, nil
-		}
-		if !isRed(h.Left) && !isRed(h.Left.Left) {
-			h = moveRedLeft(h)
-		}
-		h.Left, deleted = t.delete(h.Left, item)
-	} else {
-		if isRed(h.Left) {
-			h = rotateRight(h)
-		}
-		// If @item equals @h.Item and no right children at @h
-		if !less(h.Item, item) && h.Right == nil {
-			return nil, h.Item
-		}
-		// PETAR: Added 'h.Right != nil' below
-		if h.Right != nil && !isRed(h.Right) && !isRed(h.Right.Left) {
-			h = moveRedRight(h)
-		}
-		// If @item equals @h.Item, and (from above) 'h.Right != nil'
-		if !less(h.Item, item) {
-			var subDeleted Item
-			h.Right, subDeleted = deleteMin(h.Right)
-			if subDeleted == nil {
-				panic("logic")
-			}
-			deleted, h.Item = h.Item, subDeleted
-		} else { // Else, @item is bigger than @h.Item
-			h.Right, deleted = t.delete(h.Right, item)
-		}
-	}
-
-	return fixUp(h), deleted
-}
-
-// Internal node manipulation routines
-
-func newNode(item Item) *Node { return &Node{Item: item} }
-
-func isRed(h *Node) bool {
-	if h == nil {
-		return false
-	}
-	return !h.Black
-}
-
-func rotateLeft(h *Node) *Node {
-	x := h.Right
-	if x.Black {
-		panic("rotating a black link")
-	}
-	h.Right = x.Left
-	x.Left = h
-	x.Black = h.Black
-	h.Black = false
-	return x
-}
-
-func rotateRight(h *Node) *Node {
-	x := h.Left
-	if x.Black {
-		panic("rotating a black link")
-	}
-	h.Left = x.Right
-	x.Right = h
-	x.Black = h.Black
-	h.Black = false
-	return x
-}
-
-// REQUIRE: Left and Right children must be present
-func flip(h *Node) {
-	h.Black = !h.Black
-	h.Left.Black = !h.Left.Black
-	h.Right.Black = !h.Right.Black
-}
-
-// REQUIRE: Left and Right children must be present
-func moveRedLeft(h *Node) *Node {
-	flip(h)
-	if isRed(h.Right.Left) {
-		h.Right = rotateRight(h.Right)
-		h = rotateLeft(h)
-		flip(h)
-	}
-	return h
-}
-
-// REQUIRE: Left and Right children must be present
-func moveRedRight(h *Node) *Node {
-	flip(h)
-	if isRed(h.Left.Left) {
-		h = rotateRight(h)
-		flip(h)
-	}
-	return h
-}
-
-func fixUp(h *Node) *Node {
-	if isRed(h.Right) {
-		h = rotateLeft(h)
-	}
-
-	if isRed(h.Left) && isRed(h.Left.Left) {
-		h = rotateRight(h)
-	}
-
-	if isRed(h.Left) && isRed(h.Right) {
-		flip(h)
-	}
-
-	return h
-}

+ 0 - 17
vendor/github.com/petar/GoLLRB/llrb/util.go

@@ -1,17 +0,0 @@
-// Copyright 2010 Petar Maymounkov. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package llrb
-
-type Int int
-
-func (x Int) Less(than Item) bool {
-	return x < than.(Int)
-}
-
-type String string
-
-func (x String) Less(than Item) bool {
-	return x < than.(String)
-}

+ 0 - 201
vendor/github.com/prometheus/client_model/ruby/LICENSE

@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.

+ 0 - 202
vendor/github.com/spf13/cobra/cobra/cmd/testdata/LICENSE.golden

@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

+ 9 - 0
vendor/go.uber.org/zap/buffer/buffer.go

@@ -98,6 +98,15 @@ func (b *Buffer) Write(bs []byte) (int, error) {
 	return len(bs), nil
 	return len(bs), nil
 }
 }
 
 
+// TrimNewline trims any final "\n" byte from the end of the buffer.
+func (b *Buffer) TrimNewline() {
+	if i := len(b.bs) - 1; i >= 0 {
+		if b.bs[i] == '\n' {
+			b.bs = b.bs[:i]
+		}
+	}
+}
+
 // Free returns the Buffer to its Pool.
 // Free returns the Buffer to its Pool.
 //
 //
 // Callers must not retain references to the Buffer after calling Free.
 // Callers must not retain references to the Buffer after calling Free.

+ 3 - 3
vendor/go.uber.org/zap/config.go

@@ -74,10 +74,10 @@ type Config struct {
 	// EncoderConfig sets options for the chosen encoder. See
 	// EncoderConfig sets options for the chosen encoder. See
 	// zapcore.EncoderConfig for details.
 	// zapcore.EncoderConfig for details.
 	EncoderConfig zapcore.EncoderConfig `json:"encoderConfig" yaml:"encoderConfig"`
 	EncoderConfig zapcore.EncoderConfig `json:"encoderConfig" yaml:"encoderConfig"`
-	// OutputPaths is a list of paths to write logging output to. See Open for
-	// details.
+	// OutputPaths is a list of URLs or file paths to write logging output to.
+	// See Open for details.
 	OutputPaths []string `json:"outputPaths" yaml:"outputPaths"`
 	OutputPaths []string `json:"outputPaths" yaml:"outputPaths"`
-	// ErrorOutputPaths is a list of paths to write internal logger errors to.
+	// ErrorOutputPaths is a list of URLs to write internal logger errors to.
 	// The default is standard error.
 	// The default is standard error.
 	//
 	//
 	// Note that this setting only affects internal errors; for sample code that
 	// Note that this setting only affects internal errors; for sample code that

+ 1 - 1
vendor/go.uber.org/zap/doc.go

@@ -48,7 +48,7 @@
 //    "attempt", 3,
 //    "attempt", 3,
 //    "backoff", time.Second,
 //    "backoff", time.Second,
 //  )
 //  )
-//  sugar.Printf("failed to fetch URL: %s", "http://example.com")
+//  sugar.Infof("failed to fetch URL: %s", "http://example.com")
 //
 //
 // By default, loggers are unbuffered. However, since zap's low-level APIs
 // By default, loggers are unbuffered. However, since zap's low-level APIs
 // allow buffering, calling Sync before letting your process exit is a good
 // allow buffering, calling Sync before letting your process exit is a good

+ 2 - 2
vendor/go.uber.org/zap/http_handler.go

@@ -48,11 +48,11 @@ func (lvl AtomicLevel) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 
 
 	switch r.Method {
 	switch r.Method {
 
 
-	case "GET":
+	case http.MethodGet:
 		current := lvl.Level()
 		current := lvl.Level()
 		enc.Encode(payload{Level: &current})
 		enc.Encode(payload{Level: &current})
 
 
-	case "PUT":
+	case http.MethodPut:
 		var req payload
 		var req payload
 
 
 		if errmess := func() string {
 		if errmess := func() string {

+ 161 - 0
vendor/go.uber.org/zap/sink.go

@@ -0,0 +1,161 @@
+// Copyright (c) 2016 Uber Technologies, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+package zap
+
+import (
+	"errors"
+	"fmt"
+	"io"
+	"net/url"
+	"os"
+	"strings"
+	"sync"
+
+	"go.uber.org/zap/zapcore"
+)
+
+const schemeFile = "file"
+
+var (
+	_sinkMutex     sync.RWMutex
+	_sinkFactories map[string]func(*url.URL) (Sink, error) // keyed by scheme
+)
+
+func init() {
+	resetSinkRegistry()
+}
+
+func resetSinkRegistry() {
+	_sinkMutex.Lock()
+	defer _sinkMutex.Unlock()
+
+	_sinkFactories = map[string]func(*url.URL) (Sink, error){
+		schemeFile: newFileSink,
+	}
+}
+
+// Sink defines the interface to write to and close logger destinations.
+type Sink interface {
+	zapcore.WriteSyncer
+	io.Closer
+}
+
+type nopCloserSink struct{ zapcore.WriteSyncer }
+
+func (nopCloserSink) Close() error { return nil }
+
+type errSinkNotFound struct {
+	scheme string
+}
+
+func (e *errSinkNotFound) Error() string {
+	return fmt.Sprintf("no sink found for scheme %q", e.scheme)
+}
+
+// RegisterSink registers a user-supplied factory for all sinks with a
+// particular scheme.
+//
+// All schemes must be ASCII, valid under section 3.1 of RFC 3986
+// (https://tools.ietf.org/html/rfc3986#section-3.1), and must not already
+// have a factory registered. Zap automatically registers a factory for the
+// "file" scheme.
+func RegisterSink(scheme string, factory func(*url.URL) (Sink, error)) error {
+	_sinkMutex.Lock()
+	defer _sinkMutex.Unlock()
+
+	if scheme == "" {
+		return errors.New("can't register a sink factory for empty string")
+	}
+	normalized, err := normalizeScheme(scheme)
+	if err != nil {
+		return fmt.Errorf("%q is not a valid scheme: %v", scheme, err)
+	}
+	if _, ok := _sinkFactories[normalized]; ok {
+		return fmt.Errorf("sink factory already registered for scheme %q", normalized)
+	}
+	_sinkFactories[normalized] = factory
+	return nil
+}
+
+func newSink(rawURL string) (Sink, error) {
+	u, err := url.Parse(rawURL)
+	if err != nil {
+		return nil, fmt.Errorf("can't parse %q as a URL: %v", rawURL, err)
+	}
+	if u.Scheme == "" {
+		u.Scheme = schemeFile
+	}
+
+	_sinkMutex.RLock()
+	factory, ok := _sinkFactories[u.Scheme]
+	_sinkMutex.RUnlock()
+	if !ok {
+		return nil, &errSinkNotFound{u.Scheme}
+	}
+	return factory(u)
+}
+
+func newFileSink(u *url.URL) (Sink, error) {
+	if u.User != nil {
+		return nil, fmt.Errorf("user and password not allowed with file URLs: got %v", u)
+	}
+	if u.Fragment != "" {
+		return nil, fmt.Errorf("fragments not allowed with file URLs: got %v", u)
+	}
+	if u.RawQuery != "" {
+		return nil, fmt.Errorf("query parameters not allowed with file URLs: got %v", u)
+	}
+	// Error messages are better if we check hostname and port separately.
+	if u.Port() != "" {
+		return nil, fmt.Errorf("ports not allowed with file URLs: got %v", u)
+	}
+	if hn := u.Hostname(); hn != "" && hn != "localhost" {
+		return nil, fmt.Errorf("file URLs must leave host empty or use localhost: got %v", u)
+	}
+	switch u.Path {
+	case "stdout":
+		return nopCloserSink{os.Stdout}, nil
+	case "stderr":
+		return nopCloserSink{os.Stderr}, nil
+	}
+	return os.OpenFile(u.Path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644)
+}
+
+func normalizeScheme(s string) (string, error) {
+	// https://tools.ietf.org/html/rfc3986#section-3.1
+	s = strings.ToLower(s)
+	if first := s[0]; 'a' > first || 'z' < first {
+		return "", errors.New("must start with a letter")
+	}
+	for i := 1; i < len(s); i++ { // iterate over bytes, not runes
+		c := s[i]
+		switch {
+		case 'a' <= c && c <= 'z':
+			continue
+		case '0' <= c && c <= '9':
+			continue
+		case c == '.' || c == '+' || c == '-':
+			continue
+		}
+		return "", fmt.Errorf("may not contain %q", c)
+	}
+	return s, nil
+}

+ 27 - 24
vendor/go.uber.org/zap/writer.go

@@ -21,21 +21,33 @@
 package zap
 package zap
 
 
 import (
 import (
+	"fmt"
+	"io"
 	"io/ioutil"
 	"io/ioutil"
-	"os"
 
 
 	"go.uber.org/zap/zapcore"
 	"go.uber.org/zap/zapcore"
 
 
 	"go.uber.org/multierr"
 	"go.uber.org/multierr"
 )
 )
 
 
-// Open is a high-level wrapper that takes a variadic number of paths, opens or
-// creates each of the specified files, and combines them into a locked
+// Open is a high-level wrapper that takes a variadic number of URLs, opens or
+// creates each of the specified resources, and combines them into a locked
 // WriteSyncer. It also returns any error encountered and a function to close
 // WriteSyncer. It also returns any error encountered and a function to close
 // any opened files.
 // any opened files.
 //
 //
-// Passing no paths returns a no-op WriteSyncer. The special paths "stdout" and
-// "stderr" are interpreted as os.Stdout and os.Stderr, respectively.
+// Passing no URLs returns a no-op WriteSyncer. Zap handles URLs without a
+// scheme and URLs with the "file" scheme. Third-party code may register
+// factories for other schemes using RegisterSink.
+//
+// URLs with the "file" scheme must use absolute paths on the local
+// filesystem. No user, password, port, fragments, or query parameters are
+// allowed, and the hostname must be empty or "localhost".
+//
+// Since it's common to write logs to the local filesystem, URLs without a
+// scheme (e.g., "/var/log/foo.log") are treated as local file paths. Without
+// a scheme, the special paths "stdout" and "stderr" are interpreted as
+// os.Stdout and os.Stderr. When specified without a scheme, relative file
+// paths also work.
 func Open(paths ...string) (zapcore.WriteSyncer, func(), error) {
 func Open(paths ...string) (zapcore.WriteSyncer, func(), error) {
 	writers, close, err := open(paths)
 	writers, close, err := open(paths)
 	if err != nil {
 	if err != nil {
@@ -47,33 +59,24 @@ func Open(paths ...string) (zapcore.WriteSyncer, func(), error) {
 }
 }
 
 
 func open(paths []string) ([]zapcore.WriteSyncer, func(), error) {
 func open(paths []string) ([]zapcore.WriteSyncer, func(), error) {
-	var openErr error
 	writers := make([]zapcore.WriteSyncer, 0, len(paths))
 	writers := make([]zapcore.WriteSyncer, 0, len(paths))
-	files := make([]*os.File, 0, len(paths))
+	closers := make([]io.Closer, 0, len(paths))
 	close := func() {
 	close := func() {
-		for _, f := range files {
-			f.Close()
+		for _, c := range closers {
+			c.Close()
 		}
 		}
 	}
 	}
+
+	var openErr error
 	for _, path := range paths {
 	for _, path := range paths {
-		switch path {
-		case "stdout":
-			writers = append(writers, os.Stdout)
-			// Don't close standard out.
-			continue
-		case "stderr":
-			writers = append(writers, os.Stderr)
-			// Don't close standard error.
+		sink, err := newSink(path)
+		if err != nil {
+			openErr = multierr.Append(openErr, fmt.Errorf("couldn't open sink %q: %v", path, err))
 			continue
 			continue
 		}
 		}
-		f, err := os.OpenFile(path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644)
-		openErr = multierr.Append(openErr, err)
-		if err == nil {
-			writers = append(writers, f)
-			files = append(files, f)
-		}
+		writers = append(writers, sink)
+		closers = append(closers, sink)
 	}
 	}
-
 	if openErr != nil {
 	if openErr != nil {
 		close()
 		close()
 		return writers, nil, openErr
 		return writers, nil, openErr

+ 26 - 4
vendor/go.uber.org/zap/zapcore/json_encoder.go

@@ -44,10 +44,15 @@ func getJSONEncoder() *jsonEncoder {
 }
 }
 
 
 func putJSONEncoder(enc *jsonEncoder) {
 func putJSONEncoder(enc *jsonEncoder) {
+	if enc.reflectBuf != nil {
+		enc.reflectBuf.Free()
+	}
 	enc.EncoderConfig = nil
 	enc.EncoderConfig = nil
 	enc.buf = nil
 	enc.buf = nil
 	enc.spaced = false
 	enc.spaced = false
 	enc.openNamespaces = 0
 	enc.openNamespaces = 0
+	enc.reflectBuf = nil
+	enc.reflectEnc = nil
 	_jsonPool.Put(enc)
 	_jsonPool.Put(enc)
 }
 }
 
 
@@ -56,6 +61,10 @@ type jsonEncoder struct {
 	buf            *buffer.Buffer
 	buf            *buffer.Buffer
 	spaced         bool // include spaces after colons and commas
 	spaced         bool // include spaces after colons and commas
 	openNamespaces int
 	openNamespaces int
+
+	// for encoding generic values by reflection
+	reflectBuf *buffer.Buffer
+	reflectEnc *json.Encoder
 }
 }
 
 
 // NewJSONEncoder creates a fast, low-allocation JSON encoder. The encoder
 // NewJSONEncoder creates a fast, low-allocation JSON encoder. The encoder
@@ -124,13 +133,24 @@ func (enc *jsonEncoder) AddInt64(key string, val int64) {
 	enc.AppendInt64(val)
 	enc.AppendInt64(val)
 }
 }
 
 
+func (enc *jsonEncoder) resetReflectBuf() {
+	if enc.reflectBuf == nil {
+		enc.reflectBuf = bufferpool.Get()
+		enc.reflectEnc = json.NewEncoder(enc.reflectBuf)
+	} else {
+		enc.reflectBuf.Reset()
+	}
+}
+
 func (enc *jsonEncoder) AddReflected(key string, obj interface{}) error {
 func (enc *jsonEncoder) AddReflected(key string, obj interface{}) error {
-	marshaled, err := json.Marshal(obj)
+	enc.resetReflectBuf()
+	err := enc.reflectEnc.Encode(obj)
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}
+	enc.reflectBuf.TrimNewline()
 	enc.addKey(key)
 	enc.addKey(key)
-	_, err = enc.buf.Write(marshaled)
+	_, err = enc.buf.Write(enc.reflectBuf.Bytes())
 	return err
 	return err
 }
 }
 
 
@@ -213,12 +233,14 @@ func (enc *jsonEncoder) AppendInt64(val int64) {
 }
 }
 
 
 func (enc *jsonEncoder) AppendReflected(val interface{}) error {
 func (enc *jsonEncoder) AppendReflected(val interface{}) error {
-	marshaled, err := json.Marshal(val)
+	enc.resetReflectBuf()
+	err := enc.reflectEnc.Encode(val)
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}
+	enc.reflectBuf.TrimNewline()
 	enc.addElementSeparator()
 	enc.addElementSeparator()
-	_, err = enc.buf.Write(marshaled)
+	_, err = enc.buf.Write(enc.reflectBuf.Bytes())
 	return err
 	return err
 }
 }
 
 

+ 1 - 1
vendor/go.uber.org/zap/zapcore/memory_encoder.go

@@ -43,7 +43,7 @@ func NewMapObjectEncoder() *MapObjectEncoder {
 
 
 // AddArray implements ObjectEncoder.
 // AddArray implements ObjectEncoder.
 func (m *MapObjectEncoder) AddArray(key string, v ArrayMarshaler) error {
 func (m *MapObjectEncoder) AddArray(key string, v ArrayMarshaler) error {
-	arr := &sliceArrayEncoder{}
+	arr := &sliceArrayEncoder{elems: make([]interface{}, 0)}
 	err := v.MarshalLogArray(arr)
 	err := v.MarshalLogArray(arr)
 	m.cur[key] = arr.elems
 	m.cur[key] = arr.elems
 	return err
 	return err

+ 27 - 1
vendor/golang.org/x/net/http2/client_conn_pool.go

@@ -52,9 +52,31 @@ const (
 	noDialOnMiss = false
 	noDialOnMiss = false
 )
 )
 
 
+// shouldTraceGetConn reports whether getClientConn should call any
+// ClientTrace.GetConn hook associated with the http.Request.
+//
+// This complexity is needed to avoid double calls of the GetConn hook
+// during the back-and-forth between net/http and x/net/http2 (when the
+// net/http.Transport is upgraded to also speak http2), as well as support
+// the case where x/net/http2 is being used directly.
+func (p *clientConnPool) shouldTraceGetConn(st clientConnIdleState) bool {
+	// If our Transport wasn't made via ConfigureTransport, always
+	// trace the GetConn hook if provided, because that means the
+	// http2 package is being used directly and it's the one
+	// dialing, as opposed to net/http.
+	if _, ok := p.t.ConnPool.(noDialClientConnPool); !ok {
+		return true
+	}
+	// Otherwise, only use the GetConn hook if this connection has
+	// been used previously for other requests. For fresh
+	// connections, the net/http package does the dialing.
+	return !st.freshConn
+}
+
 func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMiss bool) (*ClientConn, error) {
 func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMiss bool) (*ClientConn, error) {
 	if isConnectionCloseRequest(req) && dialOnMiss {
 	if isConnectionCloseRequest(req) && dialOnMiss {
 		// It gets its own connection.
 		// It gets its own connection.
+		traceGetConn(req, addr)
 		const singleUse = true
 		const singleUse = true
 		cc, err := p.t.dialClientConn(addr, singleUse)
 		cc, err := p.t.dialClientConn(addr, singleUse)
 		if err != nil {
 		if err != nil {
@@ -64,7 +86,10 @@ func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMis
 	}
 	}
 	p.mu.Lock()
 	p.mu.Lock()
 	for _, cc := range p.conns[addr] {
 	for _, cc := range p.conns[addr] {
-		if cc.CanTakeNewRequest() {
+		if st := cc.idleState(); st.canTakeNewRequest {
+			if p.shouldTraceGetConn(st) {
+				traceGetConn(req, addr)
+			}
 			p.mu.Unlock()
 			p.mu.Unlock()
 			return cc, nil
 			return cc, nil
 		}
 		}
@@ -73,6 +98,7 @@ func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMis
 		p.mu.Unlock()
 		p.mu.Unlock()
 		return nil, ErrNoCachedConn
 		return nil, ErrNoCachedConn
 	}
 	}
+	traceGetConn(req, addr)
 	call := p.getStartDialLocked(addr)
 	call := p.getStartDialLocked(addr)
 	p.mu.Unlock()
 	p.mu.Unlock()
 	<-call.done
 	<-call.done

+ 5 - 3
vendor/golang.org/x/net/http2/configure_transport.go

@@ -57,7 +57,7 @@ func configureTransport(t1 *http.Transport) (*Transport, error) {
 
 
 // registerHTTPSProtocol calls Transport.RegisterProtocol but
 // registerHTTPSProtocol calls Transport.RegisterProtocol but
 // converting panics into errors.
 // converting panics into errors.
-func registerHTTPSProtocol(t *http.Transport, rt http.RoundTripper) (err error) {
+func registerHTTPSProtocol(t *http.Transport, rt noDialH2RoundTripper) (err error) {
 	defer func() {
 	defer func() {
 		if e := recover(); e != nil {
 		if e := recover(); e != nil {
 			err = fmt.Errorf("%v", e)
 			err = fmt.Errorf("%v", e)
@@ -69,10 +69,12 @@ func registerHTTPSProtocol(t *http.Transport, rt http.RoundTripper) (err error)
 
 
 // noDialH2RoundTripper is a RoundTripper which only tries to complete the request
 // noDialH2RoundTripper is a RoundTripper which only tries to complete the request
 // if there's already has a cached connection to the host.
 // if there's already has a cached connection to the host.
-type noDialH2RoundTripper struct{ t *Transport }
+// (The field is exported so it can be accessed via reflect from net/http; tested
+// by TestNoDialH2RoundTripperType)
+type noDialH2RoundTripper struct{ *Transport }
 
 
 func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
 func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
-	res, err := rt.t.RoundTrip(req)
+	res, err := rt.Transport.RoundTrip(req)
 	if isNoCachedConnError(err) {
 	if isNoCachedConnError(err) {
 		return nil, http.ErrSkipAltProtocol
 		return nil, http.ErrSkipAltProtocol
 	}
 	}

+ 5 - 5
vendor/golang.org/x/net/http2/flow.go

@@ -41,10 +41,10 @@ func (f *flow) take(n int32) {
 // add adds n bytes (positive or negative) to the flow control window.
 // add adds n bytes (positive or negative) to the flow control window.
 // It returns false if the sum would exceed 2^31-1.
 // It returns false if the sum would exceed 2^31-1.
 func (f *flow) add(n int32) bool {
 func (f *flow) add(n int32) bool {
-	remain := (1<<31 - 1) - f.n
-	if n > remain {
-		return false
+	sum := f.n + n
+	if (sum > n) == (f.n > 0) {
+		f.n = sum
+		return true
 	}
 	}
-	f.n += n
-	return true
+	return false
 }
 }

+ 49 - 14
vendor/golang.org/x/net/http2/frame.go

@@ -733,32 +733,67 @@ func (f *SettingsFrame) IsAck() bool {
 	return f.FrameHeader.Flags.Has(FlagSettingsAck)
 	return f.FrameHeader.Flags.Has(FlagSettingsAck)
 }
 }
 
 
-func (f *SettingsFrame) Value(s SettingID) (v uint32, ok bool) {
+func (f *SettingsFrame) Value(id SettingID) (v uint32, ok bool) {
 	f.checkValid()
 	f.checkValid()
-	buf := f.p
-	for len(buf) > 0 {
-		settingID := SettingID(binary.BigEndian.Uint16(buf[:2]))
-		if settingID == s {
-			return binary.BigEndian.Uint32(buf[2:6]), true
+	for i := 0; i < f.NumSettings(); i++ {
+		if s := f.Setting(i); s.ID == id {
+			return s.Val, true
 		}
 		}
-		buf = buf[6:]
 	}
 	}
 	return 0, false
 	return 0, false
 }
 }
 
 
+// Setting returns the setting from the frame at the given 0-based index.
+// The index must be >= 0 and less than f.NumSettings().
+func (f *SettingsFrame) Setting(i int) Setting {
+	buf := f.p
+	return Setting{
+		ID:  SettingID(binary.BigEndian.Uint16(buf[i*6 : i*6+2])),
+		Val: binary.BigEndian.Uint32(buf[i*6+2 : i*6+6]),
+	}
+}
+
+func (f *SettingsFrame) NumSettings() int { return len(f.p) / 6 }
+
+// HasDuplicates reports whether f contains any duplicate setting IDs.
+func (f *SettingsFrame) HasDuplicates() bool {
+	num := f.NumSettings()
+	if num == 0 {
+		return false
+	}
+	// If it's small enough (the common case), just do the n^2
+	// thing and avoid a map allocation.
+	if num < 10 {
+		for i := 0; i < num; i++ {
+			idi := f.Setting(i).ID
+			for j := i + 1; j < num; j++ {
+				idj := f.Setting(j).ID
+				if idi == idj {
+					return true
+				}
+			}
+		}
+		return false
+	}
+	seen := map[SettingID]bool{}
+	for i := 0; i < num; i++ {
+		id := f.Setting(i).ID
+		if seen[id] {
+			return true
+		}
+		seen[id] = true
+	}
+	return false
+}
+
 // ForeachSetting runs fn for each setting.
 // ForeachSetting runs fn for each setting.
 // It stops and returns the first error.
 // It stops and returns the first error.
 func (f *SettingsFrame) ForeachSetting(fn func(Setting) error) error {
 func (f *SettingsFrame) ForeachSetting(fn func(Setting) error) error {
 	f.checkValid()
 	f.checkValid()
-	buf := f.p
-	for len(buf) > 0 {
-		if err := fn(Setting{
-			SettingID(binary.BigEndian.Uint16(buf[:2])),
-			binary.BigEndian.Uint32(buf[2:6]),
-		}); err != nil {
+	for i := 0; i < f.NumSettings(); i++ {
+		if err := fn(f.Setting(i)); err != nil {
 			return err
 			return err
 		}
 		}
-		buf = buf[6:]
 	}
 	}
 	return nil
 	return nil
 }
 }

+ 26 - 0
vendor/golang.org/x/net/http2/go111.go

@@ -0,0 +1,26 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build go1.11
+
+package http2
+
+import "net/textproto"
+
+func traceHasWroteHeaderField(trace *clientTrace) bool {
+	return trace != nil && trace.WroteHeaderField != nil
+}
+
+func traceWroteHeaderField(trace *clientTrace, k, v string) {
+	if trace != nil && trace.WroteHeaderField != nil {
+		trace.WroteHeaderField(k, []string{v})
+	}
+}
+
+func traceGot1xxResponseFunc(trace *clientTrace) func(int, textproto.MIMEHeader) error {
+	if trace != nil {
+		return trace.Got1xxResponse
+	}
+	return nil
+}

+ 15 - 0
vendor/golang.org/x/net/http2/go17.go

@@ -18,6 +18,8 @@ type contextContext interface {
 	context.Context
 	context.Context
 }
 }
 
 
+var errCanceled = context.Canceled
+
 func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx contextContext, cancel func()) {
 func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx contextContext, cancel func()) {
 	ctx, cancel = context.WithCancel(context.Background())
 	ctx, cancel = context.WithCancel(context.Background())
 	ctx = context.WithValue(ctx, http.LocalAddrContextKey, c.LocalAddr())
 	ctx = context.WithValue(ctx, http.LocalAddrContextKey, c.LocalAddr())
@@ -48,6 +50,14 @@ func (t *Transport) idleConnTimeout() time.Duration {
 
 
 func setResponseUncompressed(res *http.Response) { res.Uncompressed = true }
 func setResponseUncompressed(res *http.Response) { res.Uncompressed = true }
 
 
+func traceGetConn(req *http.Request, hostPort string) {
+	trace := httptrace.ContextClientTrace(req.Context())
+	if trace == nil || trace.GetConn == nil {
+		return
+	}
+	trace.GetConn(hostPort)
+}
+
 func traceGotConn(req *http.Request, cc *ClientConn) {
 func traceGotConn(req *http.Request, cc *ClientConn) {
 	trace := httptrace.ContextClientTrace(req.Context())
 	trace := httptrace.ContextClientTrace(req.Context())
 	if trace == nil || trace.GotConn == nil {
 	if trace == nil || trace.GotConn == nil {
@@ -104,3 +114,8 @@ func requestTrace(req *http.Request) *clientTrace {
 func (cc *ClientConn) Ping(ctx context.Context) error {
 func (cc *ClientConn) Ping(ctx context.Context) error {
 	return cc.ping(ctx)
 	return cc.ping(ctx)
 }
 }
+
+// Shutdown gracefully closes the client connection, waiting for running streams to complete.
+func (cc *ClientConn) Shutdown(ctx context.Context) error {
+	return cc.shutdown(ctx)
+}

+ 15 - 5
vendor/golang.org/x/net/http2/headermap.go

@@ -7,15 +7,21 @@ package http2
 import (
 import (
 	"net/http"
 	"net/http"
 	"strings"
 	"strings"
+	"sync"
 )
 )
 
 
 var (
 var (
-	commonLowerHeader = map[string]string{} // Go-Canonical-Case -> lower-case
-	commonCanonHeader = map[string]string{} // lower-case -> Go-Canonical-Case
+	commonBuildOnce   sync.Once
+	commonLowerHeader map[string]string // Go-Canonical-Case -> lower-case
+	commonCanonHeader map[string]string // lower-case -> Go-Canonical-Case
 )
 )
 
 
-func init() {
-	for _, v := range []string{
+func buildCommonHeaderMapsOnce() {
+	commonBuildOnce.Do(buildCommonHeaderMaps)
+}
+
+func buildCommonHeaderMaps() {
+	common := []string{
 		"accept",
 		"accept",
 		"accept-charset",
 		"accept-charset",
 		"accept-encoding",
 		"accept-encoding",
@@ -63,7 +69,10 @@ func init() {
 		"vary",
 		"vary",
 		"via",
 		"via",
 		"www-authenticate",
 		"www-authenticate",
-	} {
+	}
+	commonLowerHeader = make(map[string]string, len(common))
+	commonCanonHeader = make(map[string]string, len(common))
+	for _, v := range common {
 		chk := http.CanonicalHeaderKey(v)
 		chk := http.CanonicalHeaderKey(v)
 		commonLowerHeader[chk] = v
 		commonLowerHeader[chk] = v
 		commonCanonHeader[v] = chk
 		commonCanonHeader[v] = chk
@@ -71,6 +80,7 @@ func init() {
 }
 }
 
 
 func lowerHeader(v string) string {
 func lowerHeader(v string) string {
+	buildCommonHeaderMapsOnce()
 	if s, ok := commonLowerHeader[v]; ok {
 	if s, ok := commonLowerHeader[v]; ok {
 		return s
 		return s
 	}
 	}

+ 15 - 5
vendor/golang.org/x/net/http2/hpack/huffman.go

@@ -47,6 +47,7 @@ var ErrInvalidHuffman = errors.New("hpack: invalid Huffman-encoded data")
 // If maxLen is greater than 0, attempts to write more to buf than
 // If maxLen is greater than 0, attempts to write more to buf than
 // maxLen bytes will return ErrStringLength.
 // maxLen bytes will return ErrStringLength.
 func huffmanDecode(buf *bytes.Buffer, maxLen int, v []byte) error {
 func huffmanDecode(buf *bytes.Buffer, maxLen int, v []byte) error {
+	rootHuffmanNode := getRootHuffmanNode()
 	n := rootHuffmanNode
 	n := rootHuffmanNode
 	// cur is the bit buffer that has not been fed into n.
 	// cur is the bit buffer that has not been fed into n.
 	// cbits is the number of low order bits in cur that are valid.
 	// cbits is the number of low order bits in cur that are valid.
@@ -106,7 +107,7 @@ func huffmanDecode(buf *bytes.Buffer, maxLen int, v []byte) error {
 
 
 type node struct {
 type node struct {
 	// children is non-nil for internal nodes
 	// children is non-nil for internal nodes
-	children []*node
+	children *[256]*node
 
 
 	// The following are only valid if children is nil:
 	// The following are only valid if children is nil:
 	codeLen uint8 // number of bits that led to the output of sym
 	codeLen uint8 // number of bits that led to the output of sym
@@ -114,22 +115,31 @@ type node struct {
 }
 }
 
 
 func newInternalNode() *node {
 func newInternalNode() *node {
-	return &node{children: make([]*node, 256)}
+	return &node{children: new([256]*node)}
 }
 }
 
 
-var rootHuffmanNode = newInternalNode()
+var (
+	buildRootOnce       sync.Once
+	lazyRootHuffmanNode *node
+)
+
+func getRootHuffmanNode() *node {
+	buildRootOnce.Do(buildRootHuffmanNode)
+	return lazyRootHuffmanNode
+}
 
 
-func init() {
+func buildRootHuffmanNode() {
 	if len(huffmanCodes) != 256 {
 	if len(huffmanCodes) != 256 {
 		panic("unexpected size")
 		panic("unexpected size")
 	}
 	}
+	lazyRootHuffmanNode = newInternalNode()
 	for i, code := range huffmanCodes {
 	for i, code := range huffmanCodes {
 		addDecoderNode(byte(i), code, huffmanCodeLen[i])
 		addDecoderNode(byte(i), code, huffmanCodeLen[i])
 	}
 	}
 }
 }
 
 
 func addDecoderNode(sym byte, code uint32, codeLen uint8) {
 func addDecoderNode(sym byte, code uint32, codeLen uint8) {
-	cur := rootHuffmanNode
+	cur := lazyRootHuffmanNode
 	for codeLen > 8 {
 	for codeLen > 8 {
 		codeLen -= 8
 		codeLen -= 8
 		i := uint8(code >> codeLen)
 		i := uint8(code >> codeLen)

+ 5 - 12
vendor/golang.org/x/net/http2/http2.go

@@ -201,19 +201,12 @@ func validWireHeaderFieldName(v string) bool {
 	return true
 	return true
 }
 }
 
 
-var httpCodeStringCommon = map[int]string{} // n -> strconv.Itoa(n)
-
-func init() {
-	for i := 100; i <= 999; i++ {
-		if v := http.StatusText(i); v != "" {
-			httpCodeStringCommon[i] = strconv.Itoa(i)
-		}
-	}
-}
-
 func httpCodeString(code int) string {
 func httpCodeString(code int) string {
-	if s, ok := httpCodeStringCommon[code]; ok {
-		return s
+	switch code {
+	case 200:
+		return "200"
+	case 404:
+		return "404"
 	}
 	}
 	return strconv.Itoa(code)
 	return strconv.Itoa(code)
 }
 }

+ 17 - 0
vendor/golang.org/x/net/http2/not_go111.go

@@ -0,0 +1,17 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !go1.11
+
+package http2
+
+import "net/textproto"
+
+func traceHasWroteHeaderField(trace *clientTrace) bool { return false }
+
+func traceWroteHeaderField(trace *clientTrace, k, v string) {}
+
+func traceGot1xxResponseFunc(trace *clientTrace) func(int, textproto.MIMEHeader) error {
+	return nil
+}

+ 8 - 0
vendor/golang.org/x/net/http2/not_go17.go

@@ -8,6 +8,7 @@ package http2
 
 
 import (
 import (
 	"crypto/tls"
 	"crypto/tls"
+	"errors"
 	"net"
 	"net"
 	"net/http"
 	"net/http"
 	"time"
 	"time"
@@ -18,6 +19,8 @@ type contextContext interface {
 	Err() error
 	Err() error
 }
 }
 
 
+var errCanceled = errors.New("canceled")
+
 type fakeContext struct{}
 type fakeContext struct{}
 
 
 func (fakeContext) Done() <-chan struct{} { return nil }
 func (fakeContext) Done() <-chan struct{} { return nil }
@@ -34,6 +37,7 @@ func setResponseUncompressed(res *http.Response) {
 type clientTrace struct{}
 type clientTrace struct{}
 
 
 func requestTrace(*http.Request) *clientTrace { return nil }
 func requestTrace(*http.Request) *clientTrace { return nil }
+func traceGetConn(*http.Request, string)      {}
 func traceGotConn(*http.Request, *ClientConn) {}
 func traceGotConn(*http.Request, *ClientConn) {}
 func traceFirstResponseByte(*clientTrace)     {}
 func traceFirstResponseByte(*clientTrace)     {}
 func traceWroteHeaders(*clientTrace)          {}
 func traceWroteHeaders(*clientTrace)          {}
@@ -84,4 +88,8 @@ func (cc *ClientConn) Ping(ctx contextContext) error {
 	return cc.ping(ctx)
 	return cc.ping(ctx)
 }
 }
 
 
+func (cc *ClientConn) Shutdown(ctx contextContext) error {
+	return cc.shutdown(ctx)
+}
+
 func (t *Transport) idleConnTimeout() time.Duration { return 0 }
 func (t *Transport) idleConnTimeout() time.Duration { return 0 }

+ 34 - 9
vendor/golang.org/x/net/http2/server.go

@@ -663,6 +663,7 @@ func (sc *serverConn) condlogf(err error, format string, args ...interface{}) {
 
 
 func (sc *serverConn) canonicalHeader(v string) string {
 func (sc *serverConn) canonicalHeader(v string) string {
 	sc.serveG.check()
 	sc.serveG.check()
+	buildCommonHeaderMapsOnce()
 	cv, ok := commonCanonHeader[v]
 	cv, ok := commonCanonHeader[v]
 	if ok {
 	if ok {
 		return cv
 		return cv
@@ -1487,6 +1488,12 @@ func (sc *serverConn) processSettings(f *SettingsFrame) error {
 		}
 		}
 		return nil
 		return nil
 	}
 	}
+	if f.NumSettings() > 100 || f.HasDuplicates() {
+		// This isn't actually in the spec, but hang up on
+		// suspiciously large settings frames or those with
+		// duplicate entries.
+		return ConnectionError(ErrCodeProtocol)
+	}
 	if err := f.ForeachSetting(sc.processSetting); err != nil {
 	if err := f.ForeachSetting(sc.processSetting); err != nil {
 		return err
 		return err
 	}
 	}
@@ -1575,6 +1582,12 @@ func (sc *serverConn) processData(f *DataFrame) error {
 		// type PROTOCOL_ERROR."
 		// type PROTOCOL_ERROR."
 		return ConnectionError(ErrCodeProtocol)
 		return ConnectionError(ErrCodeProtocol)
 	}
 	}
+	// RFC 7540, sec 6.1: If a DATA frame is received whose stream is not in
+	// "open" or "half-closed (local)" state, the recipient MUST respond with a
+	// stream error (Section 5.4.2) of type STREAM_CLOSED.
+	if state == stateClosed {
+		return streamError(id, ErrCodeStreamClosed)
+	}
 	if st == nil || state != stateOpen || st.gotTrailerHeader || st.resetQueued {
 	if st == nil || state != stateOpen || st.gotTrailerHeader || st.resetQueued {
 		// This includes sending a RST_STREAM if the stream is
 		// This includes sending a RST_STREAM if the stream is
 		// in stateHalfClosedLocal (which currently means that
 		// in stateHalfClosedLocal (which currently means that
@@ -1721,6 +1734,13 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
 			// processing this frame.
 			// processing this frame.
 			return nil
 			return nil
 		}
 		}
+		// RFC 7540, sec 5.1: If an endpoint receives additional frames, other than
+		// WINDOW_UPDATE, PRIORITY, or RST_STREAM, for a stream that is in
+		// this state, it MUST respond with a stream error (Section 5.4.2) of
+		// type STREAM_CLOSED.
+		if st.state == stateHalfClosedRemote {
+			return streamError(id, ErrCodeStreamClosed)
+		}
 		return st.processTrailerHeaders(f)
 		return st.processTrailerHeaders(f)
 	}
 	}
 
 
@@ -2327,15 +2347,7 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
 		}
 		}
 		_, hasContentType := rws.snapHeader["Content-Type"]
 		_, hasContentType := rws.snapHeader["Content-Type"]
 		if !hasContentType && bodyAllowedForStatus(rws.status) && len(p) > 0 {
 		if !hasContentType && bodyAllowedForStatus(rws.status) && len(p) > 0 {
-			if cto := rws.snapHeader.Get("X-Content-Type-Options"); strings.EqualFold("nosniff", cto) {
-				// nosniff is an explicit directive not to guess a content-type.
-				// Content-sniffing is no less susceptible to polyglot attacks via
-				// hosted content when done on the server.
-				ctype = "application/octet-stream"
-				rws.conn.logf("http2: WriteHeader called with X-Content-Type-Options:nosniff but no Content-Type")
-			} else {
-				ctype = http.DetectContentType(p)
-			}
+			ctype = http.DetectContentType(p)
 		}
 		}
 		var date string
 		var date string
 		if _, ok := rws.snapHeader["Date"]; !ok {
 		if _, ok := rws.snapHeader["Date"]; !ok {
@@ -2347,6 +2359,19 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
 			foreachHeaderElement(v, rws.declareTrailer)
 			foreachHeaderElement(v, rws.declareTrailer)
 		}
 		}
 
 
+		// "Connection" headers aren't allowed in HTTP/2 (RFC 7540, 8.1.2.2),
+		// but respect "Connection" == "close" to mean sending a GOAWAY and tearing
+		// down the TCP connection when idle, like we do for HTTP/1.
+		// TODO: remove more Connection-specific header fields here, in addition
+		// to "Connection".
+		if _, ok := rws.snapHeader["Connection"]; ok {
+			v := rws.snapHeader.Get("Connection")
+			delete(rws.snapHeader, "Connection")
+			if v == "close" {
+				rws.conn.startGracefulShutdown()
+			}
+		}
+
 		endStream := (rws.handlerDone && !rws.hasTrailers() && len(p) == 0) || isHeadResp
 		endStream := (rws.handlerDone && !rws.hasTrailers() && len(p) == 0) || isHeadResp
 		err = rws.conn.writeHeaders(rws.stream, &writeResHeaders{
 		err = rws.conn.writeHeaders(rws.stream, &writeResHeaders{
 			streamID:      rws.stream.id,
 			streamID:      rws.stream.id,

+ 175 - 32
vendor/golang.org/x/net/http2/transport.go

@@ -21,6 +21,7 @@ import (
 	mathrand "math/rand"
 	mathrand "math/rand"
 	"net"
 	"net"
 	"net/http"
 	"net/http"
+	"net/textproto"
 	"sort"
 	"sort"
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
@@ -159,6 +160,7 @@ type ClientConn struct {
 	cond            *sync.Cond // hold mu; broadcast on flow/closed changes
 	cond            *sync.Cond // hold mu; broadcast on flow/closed changes
 	flow            flow       // our conn-level flow control quota (cs.flow is per stream)
 	flow            flow       // our conn-level flow control quota (cs.flow is per stream)
 	inflow          flow       // peer's conn-level flow control
 	inflow          flow       // peer's conn-level flow control
+	closing         bool
 	closed          bool
 	closed          bool
 	wantSettingsAck bool                     // we sent a SETTINGS frame and haven't heard back
 	wantSettingsAck bool                     // we sent a SETTINGS frame and haven't heard back
 	goAway          *GoAwayFrame             // if non-nil, the GoAwayFrame we received
 	goAway          *GoAwayFrame             // if non-nil, the GoAwayFrame we received
@@ -211,9 +213,10 @@ type clientStream struct {
 	done chan struct{} // closed when stream remove from cc.streams map; close calls guarded by cc.mu
 	done chan struct{} // closed when stream remove from cc.streams map; close calls guarded by cc.mu
 
 
 	// owned by clientConnReadLoop:
 	// owned by clientConnReadLoop:
-	firstByte    bool // got the first response byte
-	pastHeaders  bool // got first MetaHeadersFrame (actual headers)
-	pastTrailers bool // got optional second MetaHeadersFrame (trailers)
+	firstByte    bool  // got the first response byte
+	pastHeaders  bool  // got first MetaHeadersFrame (actual headers)
+	pastTrailers bool  // got optional second MetaHeadersFrame (trailers)
+	num1xx       uint8 // number of 1xx responses seen
 
 
 	trailer    http.Header  // accumulated trailers
 	trailer    http.Header  // accumulated trailers
 	resTrailer *http.Header // client's Response.Trailer
 	resTrailer *http.Header // client's Response.Trailer
@@ -237,6 +240,17 @@ func awaitRequestCancel(req *http.Request, done <-chan struct{}) error {
 	}
 	}
 }
 }
 
 
+var got1xxFuncForTests func(int, textproto.MIMEHeader) error
+
+// get1xxTraceFunc returns the value of request's httptrace.ClientTrace.Got1xxResponse func,
+// if any. It returns nil if not set or if the Go version is too old.
+func (cs *clientStream) get1xxTraceFunc() func(int, textproto.MIMEHeader) error {
+	if fn := got1xxFuncForTests; fn != nil {
+		return fn
+	}
+	return traceGot1xxResponseFunc(cs.trace)
+}
+
 // awaitRequestCancel waits for the user to cancel a request, its context to
 // awaitRequestCancel waits for the user to cancel a request, its context to
 // expire, or for the request to be done (any way it might be removed from the
 // expire, or for the request to be done (any way it might be removed from the
 // cc.streams map: peer reset, successful completion, TCP connection breakage,
 // cc.streams map: peer reset, successful completion, TCP connection breakage,
@@ -423,27 +437,36 @@ func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*htt
 	if !canRetryError(err) {
 	if !canRetryError(err) {
 		return nil, err
 		return nil, err
 	}
 	}
-	if !afterBodyWrite {
-		return req, nil
-	}
 	// If the Body is nil (or http.NoBody), it's safe to reuse
 	// If the Body is nil (or http.NoBody), it's safe to reuse
 	// this request and its Body.
 	// this request and its Body.
 	if req.Body == nil || reqBodyIsNoBody(req.Body) {
 	if req.Body == nil || reqBodyIsNoBody(req.Body) {
 		return req, nil
 		return req, nil
 	}
 	}
-	// Otherwise we depend on the Request having its GetBody
-	// func defined.
+
+	// If the request body can be reset back to its original
+	// state via the optional req.GetBody, do that.
 	getBody := reqGetBody(req) // Go 1.8: getBody = req.GetBody
 	getBody := reqGetBody(req) // Go 1.8: getBody = req.GetBody
-	if getBody == nil {
-		return nil, fmt.Errorf("http2: Transport: cannot retry err [%v] after Request.Body was written; define Request.GetBody to avoid this error", err)
+	if getBody != nil {
+		// TODO: consider a req.Body.Close here? or audit that all caller paths do?
+		body, err := getBody()
+		if err != nil {
+			return nil, err
+		}
+		newReq := *req
+		newReq.Body = body
+		return &newReq, nil
 	}
 	}
-	body, err := getBody()
-	if err != nil {
-		return nil, err
+
+	// The Request.Body can't reset back to the beginning, but we
+	// don't seem to have started to read from it yet, so reuse
+	// the request directly. The "afterBodyWrite" means the
+	// bodyWrite process has started, which becomes true before
+	// the first Read.
+	if !afterBodyWrite {
+		return req, nil
 	}
 	}
-	newReq := *req
-	newReq.Body = body
-	return &newReq, nil
+
+	return nil, fmt.Errorf("http2: Transport: cannot retry err [%v] after Request.Body was written; define Request.GetBody to avoid this error", err)
 }
 }
 
 
 func canRetryError(err error) bool {
 func canRetryError(err error) bool {
@@ -630,12 +653,32 @@ func (cc *ClientConn) CanTakeNewRequest() bool {
 	return cc.canTakeNewRequestLocked()
 	return cc.canTakeNewRequestLocked()
 }
 }
 
 
-func (cc *ClientConn) canTakeNewRequestLocked() bool {
+// clientConnIdleState describes the suitability of a client
+// connection to initiate a new RoundTrip request.
+type clientConnIdleState struct {
+	canTakeNewRequest bool
+	freshConn         bool // whether it's unused by any previous request
+}
+
+func (cc *ClientConn) idleState() clientConnIdleState {
+	cc.mu.Lock()
+	defer cc.mu.Unlock()
+	return cc.idleStateLocked()
+}
+
+func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) {
 	if cc.singleUse && cc.nextStreamID > 1 {
 	if cc.singleUse && cc.nextStreamID > 1 {
-		return false
+		return
 	}
 	}
-	return cc.goAway == nil && !cc.closed &&
+	st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing &&
 		int64(cc.nextStreamID)+int64(cc.pendingRequests) < math.MaxInt32
 		int64(cc.nextStreamID)+int64(cc.pendingRequests) < math.MaxInt32
+	st.freshConn = cc.nextStreamID == 1 && st.canTakeNewRequest
+	return
+}
+
+func (cc *ClientConn) canTakeNewRequestLocked() bool {
+	st := cc.idleStateLocked()
+	return st.canTakeNewRequest
 }
 }
 
 
 // onIdleTimeout is called from a time.AfterFunc goroutine. It will
 // onIdleTimeout is called from a time.AfterFunc goroutine. It will
@@ -665,6 +708,88 @@ func (cc *ClientConn) closeIfIdle() {
 	cc.tconn.Close()
 	cc.tconn.Close()
 }
 }
 
 
+var shutdownEnterWaitStateHook = func() {}
+
+// Shutdown gracefully close the client connection, waiting for running streams to complete.
+// Public implementation is in go17.go and not_go17.go
+func (cc *ClientConn) shutdown(ctx contextContext) error {
+	if err := cc.sendGoAway(); err != nil {
+		return err
+	}
+	// Wait for all in-flight streams to complete or connection to close
+	done := make(chan error, 1)
+	cancelled := false // guarded by cc.mu
+	go func() {
+		cc.mu.Lock()
+		defer cc.mu.Unlock()
+		for {
+			if len(cc.streams) == 0 || cc.closed {
+				cc.closed = true
+				done <- cc.tconn.Close()
+				break
+			}
+			if cancelled {
+				break
+			}
+			cc.cond.Wait()
+		}
+	}()
+	shutdownEnterWaitStateHook()
+	select {
+	case err := <-done:
+		return err
+	case <-ctx.Done():
+		cc.mu.Lock()
+		// Free the goroutine above
+		cancelled = true
+		cc.cond.Broadcast()
+		cc.mu.Unlock()
+		return ctx.Err()
+	}
+}
+
+func (cc *ClientConn) sendGoAway() error {
+	cc.mu.Lock()
+	defer cc.mu.Unlock()
+	cc.wmu.Lock()
+	defer cc.wmu.Unlock()
+	if cc.closing {
+		// GOAWAY sent already
+		return nil
+	}
+	// Send a graceful shutdown frame to server
+	maxStreamID := cc.nextStreamID
+	if err := cc.fr.WriteGoAway(maxStreamID, ErrCodeNo, nil); err != nil {
+		return err
+	}
+	if err := cc.bw.Flush(); err != nil {
+		return err
+	}
+	// Prevent new requests
+	cc.closing = true
+	return nil
+}
+
+// Close closes the client connection immediately.
+//
+// In-flight requests are interrupted. For a graceful shutdown, use Shutdown instead.
+func (cc *ClientConn) Close() error {
+	cc.mu.Lock()
+	defer cc.cond.Broadcast()
+	defer cc.mu.Unlock()
+	err := errors.New("http2: client connection force closed via ClientConn.Close")
+	for id, cs := range cc.streams {
+		select {
+		case cs.resc <- resAndError{err: err}:
+		default:
+		}
+		cs.bufPipe.CloseWithError(err)
+		delete(cc.streams, id)
+	}
+	cc.closed = true
+	return cc.tconn.Close()
+}
+
 const maxAllocFrameSize = 512 << 10
 const maxAllocFrameSize = 512 << 10
 
 
 // frameBuffer returns a scratch buffer suitable for writing DATA frames.
 // frameBuffer returns a scratch buffer suitable for writing DATA frames.
@@ -747,7 +872,7 @@ func checkConnHeaders(req *http.Request) error {
 	if vv := req.Header["Transfer-Encoding"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && vv[0] != "chunked") {
 	if vv := req.Header["Transfer-Encoding"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && vv[0] != "chunked") {
 		return fmt.Errorf("http2: invalid Transfer-Encoding request header: %q", vv)
 		return fmt.Errorf("http2: invalid Transfer-Encoding request header: %q", vv)
 	}
 	}
-	if vv := req.Header["Connection"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && vv[0] != "close" && vv[0] != "keep-alive") {
+	if vv := req.Header["Connection"]; len(vv) > 0 && (len(vv) > 1 || vv[0] != "" && !strings.EqualFold(vv[0], "close") && !strings.EqualFold(vv[0], "keep-alive")) {
 		return fmt.Errorf("http2: invalid Connection request header: %q", vv)
 		return fmt.Errorf("http2: invalid Connection request header: %q", vv)
 	}
 	}
 	return nil
 	return nil
@@ -1291,9 +1416,16 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail
 		return nil, errRequestHeaderListSize
 		return nil, errRequestHeaderListSize
 	}
 	}
 
 
+	trace := requestTrace(req)
+	traceHeaders := traceHasWroteHeaderField(trace)
+
 	// Header list size is ok. Write the headers.
 	// Header list size is ok. Write the headers.
 	enumerateHeaders(func(name, value string) {
 	enumerateHeaders(func(name, value string) {
-		cc.writeHeader(strings.ToLower(name), value)
+		name = strings.ToLower(name)
+		cc.writeHeader(name, value)
+		if traceHeaders {
+			traceWroteHeaderField(trace, name, value)
+		}
 	})
 	})
 
 
 	return cc.hbuf.Bytes(), nil
 	return cc.hbuf.Bytes(), nil
@@ -1615,8 +1747,7 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error {
 // is the detail.
 // is the detail.
 //
 //
 // As a special case, handleResponse may return (nil, nil) to skip the
 // As a special case, handleResponse may return (nil, nil) to skip the
-// frame (currently only used for 100 expect continue). This special
-// case is going away after Issue 13851 is fixed.
+// frame (currently only used for 1xx responses).
 func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFrame) (*http.Response, error) {
 func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFrame) (*http.Response, error) {
 	if f.Truncated {
 	if f.Truncated {
 		return nil, errResponseHeaderListSize
 		return nil, errResponseHeaderListSize
@@ -1631,15 +1762,6 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
 		return nil, errors.New("malformed response from server: malformed non-numeric status pseudo header")
 		return nil, errors.New("malformed response from server: malformed non-numeric status pseudo header")
 	}
 	}
 
 
-	if statusCode == 100 {
-		traceGot100Continue(cs.trace)
-		if cs.on100 != nil {
-			cs.on100() // forces any write delay timer to fire
-		}
-		cs.pastHeaders = false // do it all again
-		return nil, nil
-	}
-
 	header := make(http.Header)
 	header := make(http.Header)
 	res := &http.Response{
 	res := &http.Response{
 		Proto:      "HTTP/2.0",
 		Proto:      "HTTP/2.0",
@@ -1664,6 +1786,27 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
 		}
 		}
 	}
 	}
 
 
+	if statusCode >= 100 && statusCode <= 199 {
+		cs.num1xx++
+		const max1xxResponses = 5 // arbitrary bound on number of informational responses, same as net/http
+		if cs.num1xx > max1xxResponses {
+			return nil, errors.New("http2: too many 1xx informational responses")
+		}
+		if fn := cs.get1xxTraceFunc(); fn != nil {
+			if err := fn(statusCode, textproto.MIMEHeader(header)); err != nil {
+				return nil, err
+			}
+		}
+		if statusCode == 100 {
+			traceGot100Continue(cs.trace)
+			if cs.on100 != nil {
+				cs.on100() // forces any write delay timer to fire
+			}
+		}
+		cs.pastHeaders = false // do it all again
+		return nil, nil
+	}
+
 	streamEnded := f.StreamEnded()
 	streamEnded := f.StreamEnded()
 	isHead := cs.req.Method == "HEAD"
 	isHead := cs.req.Method == "HEAD"
 	if !streamEnded || isHead {
 	if !streamEnded || isHead {

+ 8 - 0
vendor/golang.org/x/net/trace/trace.go

@@ -70,6 +70,7 @@ import (
 	"log"
 	"log"
 	"net"
 	"net"
 	"net/http"
 	"net/http"
+	"net/url"
 	"runtime"
 	"runtime"
 	"sort"
 	"sort"
 	"strconv"
 	"strconv"
@@ -110,6 +111,13 @@ var AuthRequest = func(req *http.Request) (any, sensitive bool) {
 }
 }
 
 
 func init() {
 func init() {
+	_, pat := http.DefaultServeMux.Handler(&http.Request{URL: &url.URL{Path: "/debug/requests"}})
+	if pat != "" {
+		panic("/debug/requests is already registered. You may have two independent copies of " +
+			"golang.org/x/net/trace in your binary, trying to maintain separate state. This may " +
+			"involve a vendored copy of golang.org/x/net/trace.")
+	}
+
 	// TODO(jbd): Serve Traces from /debug/traces in the future?
 	// TODO(jbd): Serve Traces from /debug/traces in the future?
 	// There is no requirement for a request to be present to have traces.
 	// There is no requirement for a request to be present to have traces.
 	http.HandleFunc("/debug/requests", Traces)
 	http.HandleFunc("/debug/requests", Traces)

+ 14 - 0
vendor/golang.org/x/sys/unix/aliases.go

@@ -0,0 +1,14 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build go1.9
+
+package unix
+
+import "syscall"
+
+type Signal = syscall.Signal
+type Errno = syscall.Errno
+type SysProcAttr = syscall.SysProcAttr

+ 1 - 1
vendor/golang.org/x/sys/unix/constants.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 
 package unix
 package unix
 
 

+ 37 - 0
vendor/golang.org/x/sys/unix/dev_aix_ppc.go

@@ -0,0 +1,37 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix
+// +build ppc
+
+// Functions to access/create device major and minor numbers matching the
+// encoding used by the Linux kernel and glibc.
+//
+// The information below is extracted and adapted from bits/sysmacros.h in the
+// glibc sources:
+//
+// dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's
+// default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major
+// number and m is a hex digit of the minor number. This is backward compatible
+// with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also
+// backward compatible with the Linux kernel, which for some architectures uses
+// 32-bit dev_t, encoded as mmmM MMmm.
+
+package unix
+
+// Major returns the major component of a Linux device number.
+func Major(dev uint64) uint32 {
+	return uint32((dev >> 16) & 0xffff)
+}
+
+// Minor returns the minor component of a Linux device number.
+func Minor(dev uint64) uint32 {
+	return uint32(dev & 0xffff)
+}
+
+// Mkdev returns a Linux device number generated from the given major and minor
+// components.
+func Mkdev(major, minor uint32) uint64 {
+	return uint64(((major) << 16) | (minor))
+}

+ 39 - 0
vendor/golang.org/x/sys/unix/dev_aix_ppc64.go

@@ -0,0 +1,39 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix
+// +build ppc64
+
+// Functions to access/create device major and minor numbers matching the
+// encoding used by the Linux kernel and glibc.
+//
+// The information below is extracted and adapted from bits/sysmacros.h in the
+// glibc sources:
+//
+// dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's
+// default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major
+// number and m is a hex digit of the minor number. This is backward compatible
+// with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also
+// backward compatible with the Linux kernel, which for some architectures uses
+// 32-bit dev_t, encoded as mmmM MMmm.
+
+package unix
+
+// Major returns the major component of a Linux device number.
+func Major(dev uint64) uint32 {
+	return uint32((dev & 0x3fffffff00000000) >> 32)
+}
+
+// Minor returns the minor component of a Linux device number.
+func Minor(dev uint64) uint32 {
+	return uint32((dev & 0x00000000ffffffff) >> 0)
+}
+
+// Mkdev returns a Linux device number generated from the given major and minor
+// components.
+func Mkdev(major, minor uint32) uint64 {
+	var DEVNO64 uint64
+	DEVNO64 = 0x8000000000000000
+	return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
+}

+ 1 - 1
vendor/golang.org/x/sys/unix/dirent.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
 
 
 package unix
 package unix
 
 

+ 1 - 1
vendor/golang.org/x/sys/unix/env_unix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 
 // Unix environment variables.
 // Unix environment variables.
 
 

+ 5 - 1
vendor/golang.org/x/sys/unix/fcntl.go

@@ -14,7 +14,11 @@ var fcntl64Syscall uintptr = SYS_FCNTL
 
 
 // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
 // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
 func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
 func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
-	valptr, _, err := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg))
+	valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg))
+	var err error
+	if errno != 0 {
+		err = errno
+	}
 	return int(valptr), err
 	return int(valptr), err
 }
 }
 
 

+ 1 - 0
vendor/golang.org/x/sys/unix/gccgo.go

@@ -3,6 +3,7 @@
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
 // +build gccgo
 // +build gccgo
+// +build !aix
 
 
 package unix
 package unix
 
 

+ 1 - 0
vendor/golang.org/x/sys/unix/gccgo_c.c

@@ -3,6 +3,7 @@
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
 // +build gccgo
 // +build gccgo
+// +build !aix
 
 
 #include <errno.h>
 #include <errno.h>
 #include <stdint.h>
 #include <stdint.h>

+ 30 - 0
vendor/golang.org/x/sys/unix/ioctl.go

@@ -0,0 +1,30 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package unix
+
+import "runtime"
+
+// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
+//
+// To change fd's window size, the req argument should be TIOCSWINSZ.
+func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+	// TODO: if we get the chance, remove the req parameter and
+	// hardcode TIOCSWINSZ.
+	err := ioctlSetWinsize(fd, req, value)
+	runtime.KeepAlive(value)
+	return err
+}
+
+// IoctlSetTermios performs an ioctl on fd with a *Termios.
+//
+// The req value will usually be TCSETA or TIOCSETA.
+func IoctlSetTermios(fd int, req uint, value *Termios) error {
+	// TODO: if we get the chance, remove the req parameter.
+	err := ioctlSetTermios(fd, req, value)
+	runtime.KeepAlive(value)
+	return err
+}

+ 66 - 9
vendor/golang.org/x/sys/unix/openbsd_pledge.go

@@ -8,6 +8,9 @@
 package unix
 package unix
 
 
 import (
 import (
+	"errors"
+	"fmt"
+	"strconv"
 	"syscall"
 	"syscall"
 	"unsafe"
 	"unsafe"
 )
 )
@@ -16,23 +19,77 @@ const (
 	_SYS_PLEDGE = 108
 	_SYS_PLEDGE = 108
 )
 )
 
 
-// Pledge implements the pledge syscall. For more information see pledge(2).
-func Pledge(promises string, paths []string) error {
-	promisesPtr, err := syscall.BytePtrFromString(promises)
+// Pledge implements the pledge syscall.
+//
+// The pledge syscall does not accept execpromises on OpenBSD releases
+// before 6.3.
+//
+// execpromises must be empty when Pledge is called on OpenBSD
+// releases predating 6.3, otherwise an error will be returned.
+//
+// For more information see pledge(2).
+func Pledge(promises, execpromises string) error {
+	maj, min, err := majmin()
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}
-	promisesUnsafe, pathsUnsafe := unsafe.Pointer(promisesPtr), unsafe.Pointer(nil)
-	if paths != nil {
-		var pathsPtr []*byte
-		if pathsPtr, err = syscall.SlicePtrFromStrings(paths); err != nil {
+
+	// If OpenBSD <= 5.9, pledge is not available.
+	if (maj == 5 && min != 9) || maj < 5 {
+		return fmt.Errorf("pledge syscall is not available on OpenBSD %d.%d", maj, min)
+	}
+
+	// If OpenBSD <= 6.2 and execpromises is not empty
+	// return an error - execpromises is not available before 6.3
+	if (maj < 6 || (maj == 6 && min <= 2)) && execpromises != "" {
+		return fmt.Errorf("cannot use execpromises on OpenBSD %d.%d", maj, min)
+	}
+
+	pptr, err := syscall.BytePtrFromString(promises)
+	if err != nil {
+		return err
+	}
+
+	// This variable will hold either a nil unsafe.Pointer or
+	// an unsafe.Pointer to a string (execpromises).
+	var expr unsafe.Pointer
+
+	// If we're running on OpenBSD > 6.2, pass execpromises to the syscall.
+	if maj > 6 || (maj == 6 && min > 2) {
+		exptr, err := syscall.BytePtrFromString(execpromises)
+		if err != nil {
 			return err
 			return err
 		}
 		}
-		pathsUnsafe = unsafe.Pointer(&pathsPtr[0])
+		expr = unsafe.Pointer(exptr)
 	}
 	}
-	_, _, e := syscall.Syscall(_SYS_PLEDGE, uintptr(promisesUnsafe), uintptr(pathsUnsafe), 0)
+
+	_, _, e := syscall.Syscall(_SYS_PLEDGE, uintptr(unsafe.Pointer(pptr)), uintptr(expr), 0)
 	if e != 0 {
 	if e != 0 {
 		return e
 		return e
 	}
 	}
+
 	return nil
 	return nil
 }
 }
+
+// majmin returns major and minor version number for an OpenBSD system.
+func majmin() (major int, minor int, err error) {
+	var v Utsname
+	err = Uname(&v)
+	if err != nil {
+		return
+	}
+
+	major, err = strconv.Atoi(string(v.Release[0]))
+	if err != nil {
+		err = errors.New("cannot parse major version number returned by uname")
+		return
+	}
+
+	minor, err = strconv.Atoi(string(v.Release[2]))
+	if err != nil {
+		err = errors.New("cannot parse minor version number returned by uname")
+		return
+	}
+
+	return
+}

+ 1 - 1
vendor/golang.org/x/sys/unix/pagesize_unix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 
 // For Unix, get the pagesize from the runtime.
 // For Unix, get the pagesize from the runtime.
 
 

+ 1 - 1
vendor/golang.org/x/sys/unix/race0.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
-// +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
+// +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
 
 
 package unix
 package unix
 
 

+ 1 - 1
vendor/golang.org/x/sys/unix/sockcmsg_unix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 
 // Socket control messages
 // Socket control messages
 
 

+ 1 - 1
vendor/golang.org/x/sys/unix/str.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 
 package unix
 package unix
 
 

+ 1 - 1
vendor/golang.org/x/sys/unix/syscall.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 
 // Package unix contains an interface to the low-level operating system
 // Package unix contains an interface to the low-level operating system
 // primitives. OS details vary depending on the underlying system, and
 // primitives. OS details vary depending on the underlying system, and

+ 562 - 0
vendor/golang.org/x/sys/unix/syscall_aix.go

@@ -0,0 +1,562 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix
+
+// Aix system calls.
+// This file is compiled as ordinary Go code,
+// but it is also input to mksyscall,
+// which parses the //sys lines and generates system call stubs.
+// Note that sometimes we use a lowercase //sys name and
+// wrap it in our own nicer implementation.
+
+package unix
+
+import (
+	"syscall"
+	"unsafe"
+)
+
+/*
+ * Wrapped
+ */
+
+//sys	utimes(path string, times *[2]Timeval) (err error)
+func Utimes(path string, tv []Timeval) error {
+	if len(tv) != 2 {
+		return EINVAL
+	}
+	return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
+}
+
+//sys	utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error)
+func UtimesNano(path string, ts []Timespec) error {
+	if len(ts) != 2 {
+		return EINVAL
+	}
+	return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+}
+
+func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
+	if ts == nil {
+		return utimensat(dirfd, path, nil, flags)
+	}
+	if len(ts) != 2 {
+		return EINVAL
+	}
+	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
+}
+
+func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
+	if sa.Port < 0 || sa.Port > 0xFFFF {
+		return nil, 0, EINVAL
+	}
+	sa.raw.Family = AF_INET
+	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
+	p[0] = byte(sa.Port >> 8)
+	p[1] = byte(sa.Port)
+	for i := 0; i < len(sa.Addr); i++ {
+		sa.raw.Addr[i] = sa.Addr[i]
+	}
+	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
+}
+
+func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
+	if sa.Port < 0 || sa.Port > 0xFFFF {
+		return nil, 0, EINVAL
+	}
+	sa.raw.Family = AF_INET6
+	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
+	p[0] = byte(sa.Port >> 8)
+	p[1] = byte(sa.Port)
+	sa.raw.Scope_id = sa.ZoneId
+	for i := 0; i < len(sa.Addr); i++ {
+		sa.raw.Addr[i] = sa.Addr[i]
+	}
+	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
+}
+
+func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
+	name := sa.Name
+	n := len(name)
+	if n > len(sa.raw.Path) {
+		return nil, 0, EINVAL
+	}
+	if n == len(sa.raw.Path) && name[0] != '@' {
+		return nil, 0, EINVAL
+	}
+	sa.raw.Family = AF_UNIX
+	for i := 0; i < n; i++ {
+		sa.raw.Path[i] = uint8(name[i])
+	}
+	// length is family (uint16), name, NUL.
+	sl := _Socklen(2)
+	if n > 0 {
+		sl += _Socklen(n) + 1
+	}
+	if sa.raw.Path[0] == '@' {
+		sa.raw.Path[0] = 0
+		// Don't count trailing NUL for abstract address.
+		sl--
+	}
+
+	return unsafe.Pointer(&sa.raw), sl, nil
+}
+
+func Getsockname(fd int) (sa Sockaddr, err error) {
+	var rsa RawSockaddrAny
+	var len _Socklen = SizeofSockaddrAny
+	if err = getsockname(fd, &rsa, &len); err != nil {
+		return
+	}
+	return anyToSockaddr(fd, &rsa)
+}
+
+//sys	getcwd(buf []byte) (err error)
+
+const ImplementsGetwd = true
+
+func Getwd() (ret string, err error) {
+	for len := uint64(4096); ; len *= 2 {
+		b := make([]byte, len)
+		err := getcwd(b)
+		if err == nil {
+			i := 0
+			for b[i] != 0 {
+				i++
+			}
+			return string(b[0:i]), nil
+		}
+		if err != ERANGE {
+			return "", err
+		}
+	}
+}
+
+func Getcwd(buf []byte) (n int, err error) {
+	err = getcwd(buf)
+	if err == nil {
+		i := 0
+		for buf[i] != 0 {
+			i++
+		}
+		n = i + 1
+	}
+	return
+}
+
+func Getgroups() (gids []int, err error) {
+	n, err := getgroups(0, nil)
+	if err != nil {
+		return nil, err
+	}
+	if n == 0 {
+		return nil, nil
+	}
+
+	// Sanity check group count. Max is 16 on BSD.
+	if n < 0 || n > 1000 {
+		return nil, EINVAL
+	}
+
+	a := make([]_Gid_t, n)
+	n, err = getgroups(n, &a[0])
+	if err != nil {
+		return nil, err
+	}
+	gids = make([]int, n)
+	for i, v := range a[0:n] {
+		gids[i] = int(v)
+	}
+	return
+}
+
+func Setgroups(gids []int) (err error) {
+	if len(gids) == 0 {
+		return setgroups(0, nil)
+	}
+
+	a := make([]_Gid_t, len(gids))
+	for i, v := range gids {
+		a[i] = _Gid_t(v)
+	}
+	return setgroups(len(a), &a[0])
+}
+
+/*
+ * Socket
+ */
+
+//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
+
+func Accept(fd int) (nfd int, sa Sockaddr, err error) {
+	var rsa RawSockaddrAny
+	var len _Socklen = SizeofSockaddrAny
+	nfd, err = accept(fd, &rsa, &len)
+	if nfd == -1 {
+		return
+	}
+	sa, err = anyToSockaddr(fd, &rsa)
+	if err != nil {
+		Close(nfd)
+		nfd = 0
+	}
+	return
+}
+
+func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+	// Recvmsg not implemented on AIX
+	sa := new(SockaddrUnix)
+	return -1, -1, -1, sa, ENOSYS
+}
+
+func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
+	_, err = SendmsgN(fd, p, oob, to, flags)
+	return
+}
+
+func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
+	// SendmsgN not implemented on AIX
+	return -1, ENOSYS
+}
+
+func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
+	switch rsa.Addr.Family {
+
+	case AF_UNIX:
+		pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
+		sa := new(SockaddrUnix)
+
+		// Some versions of AIX have a bug in getsockname (see IV78655).
+		// We can't rely on sa.Len being set correctly.
+		n := SizeofSockaddrUnix - 3 // substract leading Family, Len, terminating NUL.
+		for i := 0; i < n; i++ {
+			if pp.Path[i] == 0 {
+				n = i
+				break
+			}
+		}
+
+		bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
+		sa.Name = string(bytes)
+		return sa, nil
+
+	case AF_INET:
+		pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
+		sa := new(SockaddrInet4)
+		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+		sa.Port = int(p[0])<<8 + int(p[1])
+		for i := 0; i < len(sa.Addr); i++ {
+			sa.Addr[i] = pp.Addr[i]
+		}
+		return sa, nil
+
+	case AF_INET6:
+		pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
+		sa := new(SockaddrInet6)
+		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+		sa.Port = int(p[0])<<8 + int(p[1])
+		sa.ZoneId = pp.Scope_id
+		for i := 0; i < len(sa.Addr); i++ {
+			sa.Addr[i] = pp.Addr[i]
+		}
+		return sa, nil
+	}
+	return nil, EAFNOSUPPORT
+}
+
+func Gettimeofday(tv *Timeval) (err error) {
+	err = gettimeofday(tv, nil)
+	return
+}
+
+// TODO
+func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
+	return -1, ENOSYS
+}
+
+//sys	getdirent(fd int, buf []byte) (n int, err error)
+func ReadDirent(fd int, buf []byte) (n int, err error) {
+	return getdirent(fd, buf)
+}
+
+//sys	wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error)
+func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
+	var status _C_int
+	var r Pid_t
+	err = ERESTART
+	// AIX wait4 may return with ERESTART errno, while the processus is still
+	// active.
+	for err == ERESTART {
+		r, err = wait4(Pid_t(pid), &status, options, rusage)
+	}
+	wpid = int(r)
+	if wstatus != nil {
+		*wstatus = WaitStatus(status)
+	}
+	return
+}
+
+/*
+ * Wait
+ */
+
+type WaitStatus uint32
+
+func (w WaitStatus) Stopped() bool { return w&0x40 != 0 }
+func (w WaitStatus) StopSignal() syscall.Signal {
+	if !w.Stopped() {
+		return -1
+	}
+	return syscall.Signal(w>>8) & 0xFF
+}
+
+func (w WaitStatus) Exited() bool { return w&0xFF == 0 }
+func (w WaitStatus) ExitStatus() int {
+	if !w.Exited() {
+		return -1
+	}
+	return int((w >> 8) & 0xFF)
+}
+
+func (w WaitStatus) Signaled() bool { return w&0x40 == 0 && w&0xFF != 0 }
+func (w WaitStatus) Signal() syscall.Signal {
+	if !w.Signaled() {
+		return -1
+	}
+	return syscall.Signal(w>>16) & 0xFF
+}
+
+func (w WaitStatus) Continued() bool { return w&0x01000000 != 0 }
+
+func (w WaitStatus) CoreDump() bool { return w&0x200 != 0 }
+
+func (w WaitStatus) TrapCause() int { return -1 }
+
+//sys	ioctl(fd int, req uint, arg uintptr) (err error)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req uint, value int) error {
+	return ioctl(fd, req, uintptr(value))
+}
+
+func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+func IoctlSetTermios(fd int, req uint, value *Termios) error {
+	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+func IoctlGetInt(fd int, req uint) (int, error) {
+	var value int
+	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+	return value, err
+}
+
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+	var value Winsize
+	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+	return &value, err
+}
+
+func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+	var value Termios
+	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+	return &value, err
+}
+
+// fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX
+// There is no way to create a custom fcntl and to keep //sys fcntl easily,
+// Therefore, the programmer must call dup2 instead of fcntl in this case.
+
+// FcntlInt performs a fcntl syscall on fd with the provided command and argument.
+//sys	FcntlInt(fd uintptr, cmd int, arg int) (r int,err error) = fcntl
+
+// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
+//sys	FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) = fcntl
+
+func Flock(fd int, how int) (err error) {
+	return syscall.Flock(fd, how)
+}
+
+/*
+ * Direct access
+ */
+
+//sys	Acct(path string) (err error)
+//sys	Chdir(path string) (err error)
+//sys	Chroot(path string) (err error)
+//sys	Close(fd int) (err error)
+//sys	Dup(oldfd int) (fd int, err error)
+//sys	Dup3(oldfd int, newfd int, flags int) (err error)
+//sys	Exit(code int)
+//sys	Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
+//sys	Fallocate(fd int, mode uint32, off int64, len int64) (err error)
+//sys	Fchdir(fd int) (err error)
+//sys	Fchmod(fd int, mode uint32) (err error)
+//sys	Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
+//sys	Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
+//sys	fcntl(fd int, cmd int, arg int) (val int, err error)
+//sys	Fdatasync(fd int) (err error)
+//sys	Fsync(fd int) (err error)
+// readdir_r
+//sysnb	Getpgid(pid int) (pgid int, err error)
+
+//sys	Getpgrp() (pid int)
+
+//sysnb	Getpid() (pid int)
+//sysnb	Getppid() (ppid int)
+//sys	Getpriority(which int, who int) (prio int, err error)
+//sysnb	Getrusage(who int, rusage *Rusage) (err error)
+//sysnb	Getsid(pid int) (sid int, err error)
+//sysnb	Kill(pid int, sig syscall.Signal) (err error)
+//sys	Klogctl(typ int, buf []byte) (n int, err error) = syslog
+//sys	Mkdirat(dirfd int, path string, mode uint32) (err error)
+//sys	Mkfifo(path string, mode uint32) (err error)
+//sys	Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
+//sys	Nanosleep(time *Timespec, leftover *Timespec) (err error)
+//sys   Open(path string, mode int, perm uint32) (fd int, err error) = open64
+//sys   Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
+//sys	read(fd int, p []byte) (n int, err error)
+//sys	Readlink(path string, buf []byte) (n int, err error)
+//sys	Removexattr(path string, attr string) (err error)
+//sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
+//sys	Setdomainname(p []byte) (err error)
+//sys	Sethostname(p []byte) (err error)
+//sysnb	Setpgid(pid int, pgid int) (err error)
+//sysnb	Setsid() (pid int, err error)
+//sysnb	Settimeofday(tv *Timeval) (err error)
+
+//sys	Setuid(uid int) (err error)
+//sys	Setgid(uid int) (err error)
+
+//sys	Setpriority(which int, who int, prio int) (err error)
+//sys	Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error)
+//sys	Sync()
+//sys	Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
+//sysnb	Times(tms *Tms) (ticks uintptr, err error)
+//sysnb	Umask(mask int) (oldmask int)
+//sysnb	Uname(buf *Utsname) (err error)
+//TODO umount
+// //sys	Unmount(target string, flags int) (err error) = umount
+//sys   Unlink(path string) (err error)
+//sys   Unlinkat(dirfd int, path string, flags int) (err error)
+//sys	Unshare(flags int) (err error)
+//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
+//sys	write(fd int, p []byte) (n int, err error)
+//sys	readlen(fd int, p *byte, np int) (n int, err error) = read
+//sys	writelen(fd int, p *byte, np int) (n int, err error) = write
+
+//sys	Dup2(oldfd int, newfd int) (err error)
+//sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = posix_fadvise64
+//sys	Fchown(fd int, uid int, gid int) (err error)
+//sys	Fstat(fd int, stat *Stat_t) (err error)
+//sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = fstatat
+//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
+//sys	Ftruncate(fd int, length int64) (err error)
+//sysnb	Getegid() (egid int)
+//sysnb	Geteuid() (euid int)
+//sysnb	Getgid() (gid int)
+//sysnb	Getuid() (uid int)
+//sys	Lchown(path string, uid int, gid int) (err error)
+//sys	Listen(s int, n int) (err error)
+//sys	Lstat(path string, stat *Stat_t) (err error)
+//sys	Pause() (err error)
+//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = pread64
+//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
+//TODO Select
+// //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
+//sys	Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
+//sysnb	Setregid(rgid int, egid int) (err error)
+//sysnb	Setreuid(ruid int, euid int) (err error)
+//sys	Shutdown(fd int, how int) (err error)
+//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
+//sys	Stat(path string, stat *Stat_t) (err error)
+//sys	Statfs(path string, buf *Statfs_t) (err error)
+//sys	Truncate(path string, length int64) (err error)
+
+//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb	setgroups(n int, list *_Gid_t) (err error)
+//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
+
+//sys	munmap(addr uintptr, length uintptr) (err error)
+
+var mapper = &mmapper{
+	active: make(map[*byte][]byte),
+	mmap:   mmap,
+	munmap: munmap,
+}
+
+func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
+	return mapper.Mmap(fd, offset, length, prot, flags)
+}
+
+func Munmap(b []byte) (err error) {
+	return mapper.Munmap(b)
+}
+
+//sys	Madvise(b []byte, advice int) (err error)
+//sys	Mprotect(b []byte, prot int) (err error)
+//sys	Mlock(b []byte) (err error)
+//sys	Mlockall(flags int) (err error)
+//sys	Msync(b []byte, flags int) (err error)
+//sys	Munlock(b []byte) (err error)
+//sys	Munlockall() (err error)
+
+//sysnb pipe(p *[2]_C_int) (err error)
+
+func Pipe(p []int) (err error) {
+	if len(p) != 2 {
+		return EINVAL
+	}
+	var pp [2]_C_int
+	err = pipe(&pp)
+	p[0] = int(pp[0])
+	p[1] = int(pp[1])
+	return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) (err error) {
+	if len(p) != 2 {
+		return EINVAL
+	}
+	var pp [2]_C_int
+	err = pipe2(&pp, flags)
+	p[0] = int(pp[0])
+	p[1] = int(pp[1])
+	return
+}
+
+//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+	if len(fds) == 0 {
+		return poll(nil, 0, timeout)
+	}
+	return poll(&fds[0], len(fds), timeout)
+}
+
+//sys	gettimeofday(tv *Timeval, tzp *Timezone) (err error)
+//sysnb	Time(t *Time_t) (tt Time_t, err error)
+//sys	Utime(path string, buf *Utimbuf) (err error)

+ 34 - 0
vendor/golang.org/x/sys/unix/syscall_aix_ppc.go

@@ -0,0 +1,34 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix
+// +build ppc
+
+package unix
+
+//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
+//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
+//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
+
+//sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
+
+func setTimespec(sec, nsec int64) Timespec {
+	return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+	return Timeval{Sec: int32(sec), Usec: int32(usec)}
+}
+
+func (iov *Iovec) SetLen(length int) {
+	iov.Len = uint32(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+	msghdr.Controllen = uint32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+	cmsg.Len = uint32(length)
+}

+ 34 - 0
vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go

@@ -0,0 +1,34 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix
+// +build ppc64
+
+package unix
+
+//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
+//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
+
+//sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
+
+func setTimespec(sec, nsec int64) Timespec {
+	return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+	return Timeval{Sec: int64(sec), Usec: int32(usec)}
+}
+
+func (iov *Iovec) SetLen(length int) {
+	iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+	msghdr.Controllen = uint32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+	cmsg.Len = uint32(length)
+}

+ 4 - 4
vendor/golang.org/x/sys/unix/syscall_bsd.go

@@ -206,7 +206,7 @@ func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
 }
 }
 
 
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
+func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 	switch rsa.Addr.Family {
 	switch rsa.Addr.Family {
 	case AF_LINK:
 	case AF_LINK:
 		pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa))
 		pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa))
@@ -286,7 +286,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
 		Close(nfd)
 		Close(nfd)
 		return 0, nil, ECONNABORTED
 		return 0, nil, ECONNABORTED
 	}
 	}
-	sa, err = anyToSockaddr(&rsa)
+	sa, err = anyToSockaddr(fd, &rsa)
 	if err != nil {
 	if err != nil {
 		Close(nfd)
 		Close(nfd)
 		nfd = 0
 		nfd = 0
@@ -306,7 +306,7 @@ func Getsockname(fd int) (sa Sockaddr, err error) {
 		rsa.Addr.Family = AF_UNIX
 		rsa.Addr.Family = AF_UNIX
 		rsa.Addr.Len = SizeofSockaddrUnix
 		rsa.Addr.Len = SizeofSockaddrUnix
 	}
 	}
-	return anyToSockaddr(&rsa)
+	return anyToSockaddr(fd, &rsa)
 }
 }
 
 
 //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
 //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
@@ -356,7 +356,7 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
 	recvflags = int(msg.Flags)
 	recvflags = int(msg.Flags)
 	// source address is only specified if the socket is unconnected
 	// source address is only specified if the socket is unconnected
 	if rsa.Addr.Family != AF_UNSPEC {
 	if rsa.Addr.Family != AF_UNSPEC {
-		from, err = anyToSockaddr(&rsa)
+		from, err = anyToSockaddr(fd, &rsa)
 	}
 	}
 	return
 	return
 }
 }

+ 28 - 8
vendor/golang.org/x/sys/unix/syscall_darwin.go

@@ -199,7 +199,13 @@ func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {
 	return getxattr(link, attr, xattrPointer(dest), len(dest), 0, XATTR_NOFOLLOW)
 	return getxattr(link, attr, xattrPointer(dest), len(dest), 0, XATTR_NOFOLLOW)
 }
 }
 
 
-//sys  setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error)
+//sys	fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error)
+
+func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
+	return fgetxattr(fd, attr, xattrPointer(dest), len(dest), 0, 0)
+}
+
+//sys	setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error)
 
 
 func Setxattr(path string, attr string, data []byte, flags int) (err error) {
 func Setxattr(path string, attr string, data []byte, flags int) (err error) {
 	// The parameters for the OS X implementation vary slightly compared to the
 	// The parameters for the OS X implementation vary slightly compared to the
@@ -235,7 +241,13 @@ func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
 	return setxattr(link, attr, xattrPointer(data), len(data), 0, flags|XATTR_NOFOLLOW)
 	return setxattr(link, attr, xattrPointer(data), len(data), 0, flags|XATTR_NOFOLLOW)
 }
 }
 
 
-//sys removexattr(path string, attr string, options int) (err error)
+//sys	fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error)
+
+func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
+	return fsetxattr(fd, attr, xattrPointer(data), len(data), 0, 0)
+}
+
+//sys	removexattr(path string, attr string, options int) (err error)
 
 
 func Removexattr(path string, attr string) (err error) {
 func Removexattr(path string, attr string) (err error) {
 	// We wrap around and explicitly zero out the options provided to the OS X
 	// We wrap around and explicitly zero out the options provided to the OS X
@@ -248,6 +260,12 @@ func Lremovexattr(link string, attr string) (err error) {
 	return removexattr(link, attr, XATTR_NOFOLLOW)
 	return removexattr(link, attr, XATTR_NOFOLLOW)
 }
 }
 
 
+//sys	fremovexattr(fd int, attr string, options int) (err error)
+
+func Fremovexattr(fd int, attr string) (err error) {
+	return fremovexattr(fd, attr, 0)
+}
+
 //sys	listxattr(path string, dest *byte, size int, options int) (sz int, err error)
 //sys	listxattr(path string, dest *byte, size int, options int) (sz int, err error)
 
 
 func Listxattr(path string, dest []byte) (sz int, err error) {
 func Listxattr(path string, dest []byte) (sz int, err error) {
@@ -258,6 +276,12 @@ func Llistxattr(link string, dest []byte) (sz int, err error) {
 	return listxattr(link, xattrPointer(dest), len(dest), XATTR_NOFOLLOW)
 	return listxattr(link, xattrPointer(dest), len(dest), XATTR_NOFOLLOW)
 }
 }
 
 
+//sys	flistxattr(fd int, dest *byte, size int, options int) (sz int, err error)
+
+func Flistxattr(fd int, dest []byte) (sz int, err error) {
+	return flistxattr(fd, xattrPointer(dest), len(dest), 0)
+}
+
 func setattrlistTimes(path string, times []Timespec, flags int) error {
 func setattrlistTimes(path string, times []Timespec, flags int) error {
 	_p0, err := BytePtrFromString(path)
 	_p0, err := BytePtrFromString(path)
 	if err != nil {
 	if err != nil {
@@ -313,11 +337,11 @@ func IoctlSetInt(fd int, req uint, value int) error {
 	return ioctl(fd, req, uintptr(value))
 	return ioctl(fd, req, uintptr(value))
 }
 }
 
 
-func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
-func IoctlSetTermios(fd int, req uint, value *Termios) error {
+func ioctlSetTermios(fd int, req uint, value *Termios) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
@@ -529,10 +553,6 @@ func Uname(uname *Utsname) error {
 // Watchevent
 // Watchevent
 // Waitevent
 // Waitevent
 // Modwatch
 // Modwatch
-// Fgetxattr
-// Fsetxattr
-// Fremovexattr
-// Flistxattr
 // Fsctl
 // Fsctl
 // Initgroups
 // Initgroups
 // Posix_spawn
 // Posix_spawn

+ 3 - 3
vendor/golang.org/x/sys/unix/syscall_dragonfly.go

@@ -87,7 +87,7 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
 	if len > SizeofSockaddrAny {
 	if len > SizeofSockaddrAny {
 		panic("RawSockaddrAny too small")
 		panic("RawSockaddrAny too small")
 	}
 	}
-	sa, err = anyToSockaddr(&rsa)
+	sa, err = anyToSockaddr(fd, &rsa)
 	if err != nil {
 	if err != nil {
 		Close(nfd)
 		Close(nfd)
 		nfd = 0
 		nfd = 0
@@ -143,11 +143,11 @@ func IoctlSetInt(fd int, req uint, value int) error {
 	return ioctl(fd, req, uintptr(value))
 	return ioctl(fd, req, uintptr(value))
 }
 }
 
 
-func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
-func IoctlSetTermios(fd int, req uint, value *Termios) error {
+func ioctlSetTermios(fd int, req uint, value *Termios) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 

+ 14 - 235
vendor/golang.org/x/sys/unix/syscall_freebsd.go

@@ -13,7 +13,6 @@
 package unix
 package unix
 
 
 import (
 import (
-	"strings"
 	"unsafe"
 	"unsafe"
 )
 )
 
 
@@ -58,14 +57,21 @@ func nametomib(name string) (mib []_C_int, err error) {
 	return buf[0 : n/siz], nil
 	return buf[0 : n/siz], nil
 }
 }
 
 
-//sysnb pipe() (r int, w int, err error)
-
 func Pipe(p []int) (err error) {
 func Pipe(p []int) (err error) {
+	return Pipe2(p, 0)
+}
+
+//sysnb	pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) error {
 	if len(p) != 2 {
 	if len(p) != 2 {
 		return EINVAL
 		return EINVAL
 	}
 	}
-	p[0], p[1], err = pipe()
-	return
+	var pp [2]_C_int
+	err := pipe2(&pp, flags)
+	p[0] = int(pp[0])
+	p[1] = int(pp[1])
+	return err
 }
 }
 
 
 func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
 func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
@@ -89,7 +95,7 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
 	if len > SizeofSockaddrAny {
 	if len > SizeofSockaddrAny {
 		panic("RawSockaddrAny too small")
 		panic("RawSockaddrAny too small")
 	}
 	}
-	sa, err = anyToSockaddr(&rsa)
+	sa, err = anyToSockaddr(fd, &rsa)
 	if err != nil {
 	if err != nil {
 		Close(nfd)
 		Close(nfd)
 		nfd = 0
 		nfd = 0
@@ -134,225 +140,6 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
 	return ENOSYS
 	return ENOSYS
 }
 }
 
 
-// Derive extattr namespace and attribute name
-
-func xattrnamespace(fullattr string) (ns int, attr string, err error) {
-	s := strings.IndexByte(fullattr, '.')
-	if s == -1 {
-		return -1, "", ENOATTR
-	}
-
-	namespace := fullattr[0:s]
-	attr = fullattr[s+1:]
-
-	switch namespace {
-	case "user":
-		return EXTATTR_NAMESPACE_USER, attr, nil
-	case "system":
-		return EXTATTR_NAMESPACE_SYSTEM, attr, nil
-	default:
-		return -1, "", ENOATTR
-	}
-}
-
-func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {
-	if len(dest) > idx {
-		return unsafe.Pointer(&dest[idx])
-	} else {
-		return unsafe.Pointer(_zero)
-	}
-}
-
-// FreeBSD implements its own syscalls to handle extended attributes
-
-func Getxattr(file string, attr string, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsize := len(dest)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return -1, err
-	}
-
-	return ExtattrGetFile(file, nsid, a, uintptr(d), destsize)
-}
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsize := len(dest)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return -1, err
-	}
-
-	return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize)
-}
-
-func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsize := len(dest)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return -1, err
-	}
-
-	return ExtattrGetLink(link, nsid, a, uintptr(d), destsize)
-}
-
-// flags are unused on FreeBSD
-
-func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
-	d := unsafe.Pointer(&data[0])
-	datasiz := len(data)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	_, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz)
-	return
-}
-
-func Setxattr(file string, attr string, data []byte, flags int) (err error) {
-	d := unsafe.Pointer(&data[0])
-	datasiz := len(data)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	_, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz)
-	return
-}
-
-func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
-	d := unsafe.Pointer(&data[0])
-	datasiz := len(data)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	_, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz)
-	return
-}
-
-func Removexattr(file string, attr string) (err error) {
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	err = ExtattrDeleteFile(file, nsid, a)
-	return
-}
-
-func Fremovexattr(fd int, attr string) (err error) {
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	err = ExtattrDeleteFd(fd, nsid, a)
-	return
-}
-
-func Lremovexattr(link string, attr string) (err error) {
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	err = ExtattrDeleteLink(link, nsid, a)
-	return
-}
-
-func Listxattr(file string, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsiz := len(dest)
-
-	// FreeBSD won't allow you to list xattrs from multiple namespaces
-	s := 0
-	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
-		stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
-
-		/* Errors accessing system attrs are ignored so that
-		 * we can implement the Linux-like behavior of omitting errors that
-		 * we don't have read permissions on
-		 *
-		 * Linux will still error if we ask for user attributes on a file that
-		 * we don't have read permissions on, so don't ignore those errors
-		 */
-		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
-			continue
-		} else if e != nil {
-			return s, e
-		}
-
-		s += stmp
-		destsiz -= s
-		if destsiz < 0 {
-			destsiz = 0
-		}
-		d = initxattrdest(dest, s)
-	}
-
-	return s, nil
-}
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsiz := len(dest)
-
-	s := 0
-	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
-		stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
-		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
-			continue
-		} else if e != nil {
-			return s, e
-		}
-
-		s += stmp
-		destsiz -= s
-		if destsiz < 0 {
-			destsiz = 0
-		}
-		d = initxattrdest(dest, s)
-	}
-
-	return s, nil
-}
-
-func Llistxattr(link string, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsiz := len(dest)
-
-	s := 0
-	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
-		stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
-		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
-			continue
-		} else if e != nil {
-			return s, e
-		}
-
-		s += stmp
-		destsiz -= s
-		if destsiz < 0 {
-			destsiz = 0
-		}
-		d = initxattrdest(dest, s)
-	}
-
-	return s, nil
-}
-
 //sys   ioctl(fd int, req uint, arg uintptr) (err error)
 //sys   ioctl(fd int, req uint, arg uintptr) (err error)
 
 
 // ioctl itself should not be exposed directly, but additional get/set
 // ioctl itself should not be exposed directly, but additional get/set
@@ -364,11 +151,11 @@ func IoctlSetInt(fd int, req uint, value int) error {
 	return ioctl(fd, req, uintptr(value))
 	return ioctl(fd, req, uintptr(value))
 }
 }
 
 
-func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
-func IoctlSetTermios(fd int, req uint, value *Termios) error {
+func ioctlSetTermios(fd int, req uint, value *Termios) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
@@ -602,14 +389,6 @@ func Uname(uname *Utsname) error {
 // Watchevent
 // Watchevent
 // Waitevent
 // Waitevent
 // Modwatch
 // Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
 // Fsctl
 // Fsctl
 // Initgroups
 // Initgroups
 // Posix_spawn
 // Posix_spawn

+ 150 - 24
vendor/golang.org/x/sys/unix/syscall_linux.go

@@ -61,11 +61,11 @@ func IoctlSetInt(fd int, req uint, value int) error {
 	return ioctl(fd, req, uintptr(value))
 	return ioctl(fd, req, uintptr(value))
 }
 }
 
 
-func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
-func IoctlSetTermios(fd int, req uint, value *Termios) error {
+func ioctlSetTermios(fd int, req uint, value *Termios) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
@@ -148,8 +148,6 @@ func Unlink(path string) error {
 
 
 //sys	Unlinkat(dirfd int, path string, flags int) (err error)
 //sys	Unlinkat(dirfd int, path string, flags int) (err error)
 
 
-//sys	utimes(path string, times *[2]Timeval) (err error)
-
 func Utimes(path string, tv []Timeval) error {
 func Utimes(path string, tv []Timeval) error {
 	if tv == nil {
 	if tv == nil {
 		err := utimensat(AT_FDCWD, path, nil, 0)
 		err := utimensat(AT_FDCWD, path, nil, 0)
@@ -207,20 +205,14 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
 	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
 	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
 }
 }
 
 
-//sys	futimesat(dirfd int, path *byte, times *[2]Timeval) (err error)
-
 func Futimesat(dirfd int, path string, tv []Timeval) error {
 func Futimesat(dirfd int, path string, tv []Timeval) error {
-	pathp, err := BytePtrFromString(path)
-	if err != nil {
-		return err
-	}
 	if tv == nil {
 	if tv == nil {
-		return futimesat(dirfd, pathp, nil)
+		return futimesat(dirfd, path, nil)
 	}
 	}
 	if len(tv) != 2 {
 	if len(tv) != 2 {
 		return EINVAL
 		return EINVAL
 	}
 	}
-	return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
+	return futimesat(dirfd, path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
 }
 }
 
 
 func Futimes(fd int, tv []Timeval) (err error) {
 func Futimes(fd int, tv []Timeval) (err error) {
@@ -497,6 +489,47 @@ func (sa *SockaddrL2) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrL2, nil
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrL2, nil
 }
 }
 
 
+// SockaddrRFCOMM implements the Sockaddr interface for AF_BLUETOOTH type sockets
+// using the RFCOMM protocol.
+//
+// Server example:
+//
+//      fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
+//      _ = unix.Bind(fd, &unix.SockaddrRFCOMM{
+//      	Channel: 1,
+//      	Addr:    [6]uint8{0, 0, 0, 0, 0, 0}, // BDADDR_ANY or 00:00:00:00:00:00
+//      })
+//      _ = Listen(fd, 1)
+//      nfd, sa, _ := Accept(fd)
+//      fmt.Printf("conn addr=%v fd=%d", sa.(*unix.SockaddrRFCOMM).Addr, nfd)
+//      Read(nfd, buf)
+//
+// Client example:
+//
+//      fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
+//      _ = Connect(fd, &SockaddrRFCOMM{
+//      	Channel: 1,
+//      	Addr:    [6]byte{0x11, 0x22, 0x33, 0xaa, 0xbb, 0xcc}, // CC:BB:AA:33:22:11
+//      })
+//      Write(fd, []byte(`hello`))
+type SockaddrRFCOMM struct {
+	// Addr represents a bluetooth address, byte ordering is little-endian.
+	Addr [6]uint8
+
+	// Channel is a designated bluetooth channel, only 1-30 are available for use.
+	// Since Linux 2.6.7 and further zero value is the first available channel.
+	Channel uint8
+
+	raw RawSockaddrRFCOMM
+}
+
+func (sa *SockaddrRFCOMM) sockaddr() (unsafe.Pointer, _Socklen, error) {
+	sa.raw.Family = AF_BLUETOOTH
+	sa.raw.Channel = sa.Channel
+	sa.raw.Bdaddr = sa.Addr
+	return unsafe.Pointer(&sa.raw), SizeofSockaddrRFCOMM, nil
+}
+
 // SockaddrCAN implements the Sockaddr interface for AF_CAN type sockets.
 // SockaddrCAN implements the Sockaddr interface for AF_CAN type sockets.
 // The RxID and TxID fields are used for transport protocol addressing in
 // The RxID and TxID fields are used for transport protocol addressing in
 // (CAN_TP16, CAN_TP20, CAN_MCNET, and CAN_ISOTP), they can be left with
 // (CAN_TP16, CAN_TP20, CAN_MCNET, and CAN_ISOTP), they can be left with
@@ -659,7 +692,7 @@ func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
 }
 }
 
 
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
+func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 	switch rsa.Addr.Family {
 	switch rsa.Addr.Family {
 	case AF_NETLINK:
 	case AF_NETLINK:
 		pp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa))
 		pp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa))
@@ -736,6 +769,30 @@ func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
 			Port: pp.Port,
 			Port: pp.Port,
 		}
 		}
 		return sa, nil
 		return sa, nil
+	case AF_BLUETOOTH:
+		proto, err := GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL)
+		if err != nil {
+			return nil, err
+		}
+		// only BTPROTO_L2CAP and BTPROTO_RFCOMM can accept connections
+		switch proto {
+		case BTPROTO_L2CAP:
+			pp := (*RawSockaddrL2)(unsafe.Pointer(rsa))
+			sa := &SockaddrL2{
+				PSM:      pp.Psm,
+				CID:      pp.Cid,
+				Addr:     pp.Bdaddr,
+				AddrType: pp.Bdaddr_type,
+			}
+			return sa, nil
+		case BTPROTO_RFCOMM:
+			pp := (*RawSockaddrRFCOMM)(unsafe.Pointer(rsa))
+			sa := &SockaddrRFCOMM{
+				Channel: pp.Channel,
+				Addr:    pp.Bdaddr,
+			}
+			return sa, nil
+		}
 	}
 	}
 	return nil, EAFNOSUPPORT
 	return nil, EAFNOSUPPORT
 }
 }
@@ -747,7 +804,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
 	if err != nil {
 	if err != nil {
 		return
 		return
 	}
 	}
-	sa, err = anyToSockaddr(&rsa)
+	sa, err = anyToSockaddr(fd, &rsa)
 	if err != nil {
 	if err != nil {
 		Close(nfd)
 		Close(nfd)
 		nfd = 0
 		nfd = 0
@@ -765,7 +822,7 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
 	if len > SizeofSockaddrAny {
 	if len > SizeofSockaddrAny {
 		panic("RawSockaddrAny too small")
 		panic("RawSockaddrAny too small")
 	}
 	}
-	sa, err = anyToSockaddr(&rsa)
+	sa, err = anyToSockaddr(fd, &rsa)
 	if err != nil {
 	if err != nil {
 		Close(nfd)
 		Close(nfd)
 		nfd = 0
 		nfd = 0
@@ -779,7 +836,7 @@ func Getsockname(fd int) (sa Sockaddr, err error) {
 	if err = getsockname(fd, &rsa, &len); err != nil {
 	if err = getsockname(fd, &rsa, &len); err != nil {
 		return
 		return
 	}
 	}
-	return anyToSockaddr(&rsa)
+	return anyToSockaddr(fd, &rsa)
 }
 }
 
 
 func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
 func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
@@ -968,7 +1025,7 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
 	recvflags = int(msg.Flags)
 	recvflags = int(msg.Flags)
 	// source address is only specified if the socket is unconnected
 	// source address is only specified if the socket is unconnected
 	if rsa.Addr.Family != AF_UNSPEC {
 	if rsa.Addr.Family != AF_UNSPEC {
-		from, err = anyToSockaddr(&rsa)
+		from, err = anyToSockaddr(fd, &rsa)
 	}
 	}
 	return
 	return
 }
 }
@@ -1221,19 +1278,21 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
 //sys	CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
 //sys	CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
 //sys	Dup(oldfd int) (fd int, err error)
 //sys	Dup(oldfd int) (fd int, err error)
 //sys	Dup3(oldfd int, newfd int, flags int) (err error)
 //sys	Dup3(oldfd int, newfd int, flags int) (err error)
-//sysnb	EpollCreate(size int) (fd int, err error)
 //sysnb	EpollCreate1(flag int) (fd int, err error)
 //sysnb	EpollCreate1(flag int) (fd int, err error)
 //sysnb	EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
 //sysnb	EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
 //sys	Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD2
 //sys	Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD2
 //sys	Exit(code int) = SYS_EXIT_GROUP
 //sys	Exit(code int) = SYS_EXIT_GROUP
-//sys	Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
 //sys	Fallocate(fd int, mode uint32, off int64, len int64) (err error)
 //sys	Fallocate(fd int, mode uint32, off int64, len int64) (err error)
 //sys	Fchdir(fd int) (err error)
 //sys	Fchdir(fd int) (err error)
 //sys	Fchmod(fd int, mode uint32) (err error)
 //sys	Fchmod(fd int, mode uint32) (err error)
 //sys	Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
 //sys	Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
 //sys	fcntl(fd int, cmd int, arg int) (val int, err error)
 //sys	fcntl(fd int, cmd int, arg int) (val int, err error)
 //sys	Fdatasync(fd int) (err error)
 //sys	Fdatasync(fd int) (err error)
+//sys	Fgetxattr(fd int, attr string, dest []byte) (sz int, err error)
+//sys	Flistxattr(fd int, dest []byte) (sz int, err error)
 //sys	Flock(fd int, how int) (err error)
 //sys	Flock(fd int, how int) (err error)
+//sys	Fremovexattr(fd int, attr string) (err error)
+//sys	Fsetxattr(fd int, attr string, dest []byte, flags int) (err error)
 //sys	Fsync(fd int) (err error)
 //sys	Fsync(fd int) (err error)
 //sys	Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
 //sys	Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
 //sysnb	Getpgid(pid int) (pgid int, err error)
 //sysnb	Getpgid(pid int) (pgid int, err error)
@@ -1272,6 +1331,7 @@ func Getpgrp() (pid int) {
 //sys	read(fd int, p []byte) (n int, err error)
 //sys	read(fd int, p []byte) (n int, err error)
 //sys	Removexattr(path string, attr string) (err error)
 //sys	Removexattr(path string, attr string) (err error)
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
 //sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
+//sys	Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error)
 //sys	RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error)
 //sys	RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error)
 //sys	Setdomainname(p []byte) (err error)
 //sys	Setdomainname(p []byte) (err error)
 //sys	Sethostname(p []byte) (err error)
 //sys	Sethostname(p []byte) (err error)
@@ -1306,7 +1366,6 @@ func Setgid(uid int) (err error) {
 //sysnb	Uname(buf *Utsname) (err error)
 //sysnb	Uname(buf *Utsname) (err error)
 //sys	Unmount(target string, flags int) (err error) = SYS_UMOUNT2
 //sys	Unmount(target string, flags int) (err error) = SYS_UMOUNT2
 //sys	Unshare(flags int) (err error)
 //sys	Unshare(flags int) (err error)
-//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
 //sys	write(fd int, p []byte) (n int, err error)
 //sys	write(fd int, p []byte) (n int, err error)
 //sys	exitThread(code int) (err error) = SYS_EXIT
 //sys	exitThread(code int) (err error) = SYS_EXIT
 //sys	readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ
 //sys	readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ
@@ -1356,6 +1415,77 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
 	return int(n), nil
 	return int(n), nil
 }
 }
 
 
+//sys	faccessat(dirfd int, path string, mode uint32) (err error)
+
+func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
+	if flags & ^(AT_SYMLINK_NOFOLLOW|AT_EACCESS) != 0 {
+		return EINVAL
+	}
+
+	// The Linux kernel faccessat system call does not take any flags.
+	// The glibc faccessat implements the flags itself; see
+	// https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/faccessat.c;hb=HEAD
+	// Because people naturally expect syscall.Faccessat to act
+	// like C faccessat, we do the same.
+
+	if flags == 0 {
+		return faccessat(dirfd, path, mode)
+	}
+
+	var st Stat_t
+	if err := Fstatat(dirfd, path, &st, flags&AT_SYMLINK_NOFOLLOW); err != nil {
+		return err
+	}
+
+	mode &= 7
+	if mode == 0 {
+		return nil
+	}
+
+	var uid int
+	if flags&AT_EACCESS != 0 {
+		uid = Geteuid()
+	} else {
+		uid = Getuid()
+	}
+
+	if uid == 0 {
+		if mode&1 == 0 {
+			// Root can read and write any file.
+			return nil
+		}
+		if st.Mode&0111 != 0 {
+			// Root can execute any file that anybody can execute.
+			return nil
+		}
+		return EACCES
+	}
+
+	var fmode uint32
+	if uint32(uid) == st.Uid {
+		fmode = (st.Mode >> 6) & 7
+	} else {
+		var gid int
+		if flags&AT_EACCESS != 0 {
+			gid = Getegid()
+		} else {
+			gid = Getgid()
+		}
+
+		if uint32(gid) == st.Gid {
+			fmode = (st.Mode >> 3) & 7
+		} else {
+			fmode = st.Mode & 7
+		}
+	}
+
+	if fmode&mode == mode {
+		return nil
+	}
+
+	return EACCES
+}
+
 /*
 /*
  * Unimplemented
  * Unimplemented
  */
  */
@@ -1375,11 +1505,7 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
 // EpollPwait
 // EpollPwait
 // EpollWaitOld
 // EpollWaitOld
 // Execve
 // Execve
-// Fgetxattr
-// Flistxattr
 // Fork
 // Fork
-// Fremovexattr
-// Fsetxattr
 // Futex
 // Futex
 // GetKernelSyms
 // GetKernelSyms
 // GetMempolicy
 // GetMempolicy

+ 5 - 3
vendor/golang.org/x/sys/unix/syscall_linux_386.go

@@ -50,6 +50,8 @@ func Pipe2(p []int, flags int) (err error) {
 // 64-bit file system and 32-bit uid calls
 // 64-bit file system and 32-bit uid calls
 // (386 default is 32-bit file system and 16-bit uid).
 // (386 default is 32-bit file system and 16-bit uid).
 //sys	Dup2(oldfd int, newfd int) (err error)
 //sys	Dup2(oldfd int, newfd int) (err error)
+//sysnb	EpollCreate(size int) (fd int, err error)
+//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
 //sys	Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
 //sys	Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
 //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
 //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@@ -77,12 +79,12 @@ func Pipe2(p []int, flags int) (err error) {
 //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
 //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
 //sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
+//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
 //sysnb	getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
 //sysnb	getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
 //sysnb	setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
 //sysnb	setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
 //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
 //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
 
 
 //sys	mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
 //sys	mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	Pause() (err error)
 //sys	Pause() (err error)
 
 
 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
@@ -164,11 +166,11 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
 	return newoffset, nil
 	return newoffset, nil
 }
 }
 
 
-// Vsyscalls on amd64.
+//sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 //sysnb	Time(t *Time_t) (tt Time_t, err error)
 //sysnb	Time(t *Time_t) (tt Time_t, err error)
-
 //sys	Utime(path string, buf *Utimbuf) (err error)
 //sys	Utime(path string, buf *Utimbuf) (err error)
+//sys	utimes(path string, times *[2]Timeval) (err error)
 
 
 // On x86 Linux, all the socket calls go through an extra indirection,
 // On x86 Linux, all the socket calls go through an extra indirection,
 // I think because the 5-register system call interface can't handle
 // I think because the 5-register system call interface can't handle

+ 5 - 0
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go

@@ -7,6 +7,7 @@
 package unix
 package unix
 
 
 //sys	Dup2(oldfd int, newfd int) (err error)
 //sys	Dup2(oldfd int, newfd int) (err error)
+//sysnb	EpollCreate(size int) (fd int, err error)
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fchown(fd int, uid int, gid int) (err error)
 //sys	Fchown(fd int, uid int, gid int) (err error)
@@ -57,6 +58,7 @@ func Stat(path string, stat *Stat_t) (err error) {
 //sys	Statfs(path string, buf *Statfs_t) (err error)
 //sys	Statfs(path string, buf *Statfs_t) (err error)
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	Truncate(path string, length int64) (err error)
 //sys	Truncate(path string, length int64) (err error)
+//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
 //sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
 //sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -75,6 +77,8 @@ func Stat(path string, stat *Stat_t) (err error) {
 //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
 //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
 //sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
 //sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
 
 
+//sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error)
+
 func Gettimeofday(tv *Timeval) (err error) {
 func Gettimeofday(tv *Timeval) (err error) {
 	errno := gettimeofday(tv)
 	errno := gettimeofday(tv)
 	if errno != 0 {
 	if errno != 0 {
@@ -96,6 +100,7 @@ func Time(t *Time_t) (tt Time_t, err error) {
 }
 }
 
 
 //sys	Utime(path string, buf *Utimbuf) (err error)
 //sys	Utime(path string, buf *Utimbuf) (err error)
+//sys	utimes(path string, times *[2]Timeval) (err error)
 
 
 func setTimespec(sec, nsec int64) Timespec {
 func setTimespec(sec, nsec int64) Timespec {
 	return Timespec{Sec: sec, Nsec: nsec}
 	return Timespec{Sec: sec, Nsec: nsec}

+ 7 - 3
vendor/golang.org/x/sys/unix/syscall_linux_arm.go

@@ -75,6 +75,8 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
 // 64-bit file system and 32-bit uid calls
 // 64-bit file system and 32-bit uid calls
 // (16-bit uid calls are not always supported in newer kernels)
 // (16-bit uid calls are not always supported in newer kernels)
 //sys	Dup2(oldfd int, newfd int) (err error)
 //sys	Dup2(oldfd int, newfd int) (err error)
+//sysnb	EpollCreate(size int) (fd int, err error)
+//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
 //sys	Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
 //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
 //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
 //sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
 //sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
@@ -86,6 +88,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
 //sys	Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
 //sys	Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
 //sys	Listen(s int, n int) (err error)
 //sys	Listen(s int, n int) (err error)
 //sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
 //sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
+//sys	Pause() (err error)
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
 //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
 //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
 //sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
 //sys	Setfsgid(gid int) (err error) = SYS_SETFSGID32
 //sys	Setfsgid(gid int) (err error) = SYS_SETFSGID32
@@ -97,11 +100,10 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
 //sys	Shutdown(fd int, how int) (err error)
 //sys	Shutdown(fd int, how int) (err error)
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
 //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
 //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
+//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
 
 
-// Vsyscalls on amd64.
+//sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys	Pause() (err error)
 
 
 func Time(t *Time_t) (Time_t, error) {
 func Time(t *Time_t) (Time_t, error) {
 	var tv Timeval
 	var tv Timeval
@@ -123,6 +125,8 @@ func Utime(path string, buf *Utimbuf) error {
 	return Utimes(path, tv)
 	return Utimes(path, tv)
 }
 }
 
 
+//sys	utimes(path string, times *[2]Timeval) (err error)
+
 //sys   Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
 //sys   Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
 //sys   Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
 //sys   Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
 //sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
 //sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64

+ 38 - 16
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go

@@ -6,6 +6,15 @@
 
 
 package unix
 package unix
 
 
+import "unsafe"
+
+func EpollCreate(size int) (fd int, err error) {
+	if size <= 0 {
+		return -1, EINVAL
+	}
+	return EpollCreate1(0)
+}
+
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fchown(fd int, uid int, gid int) (err error)
 //sys	Fchown(fd int, uid int, gid int) (err error)
@@ -57,6 +66,11 @@ func Lstat(path string, stat *Stat_t) (err error) {
 //sys	Statfs(path string, buf *Statfs_t) (err error)
 //sys	Statfs(path string, buf *Statfs_t) (err error)
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	Truncate(path string, length int64) (err error)
 //sys	Truncate(path string, length int64) (err error)
+
+func Ustat(dev int, ubuf *Ustat_t) (err error) {
+	return ENOSYS
+}
+
 //sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
 //sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -85,6 +99,18 @@ func setTimeval(sec, usec int64) Timeval {
 	return Timeval{Sec: sec, Usec: usec}
 	return Timeval{Sec: sec, Usec: usec}
 }
 }
 
 
+func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
+	if tv == nil {
+		return utimensat(dirfd, path, nil, 0)
+	}
+
+	ts := []Timespec{
+		NsecToTimespec(TimevalToNsec(tv[0])),
+		NsecToTimespec(TimevalToNsec(tv[1])),
+	}
+	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+}
+
 func Time(t *Time_t) (Time_t, error) {
 func Time(t *Time_t) (Time_t, error) {
 	var tv Timeval
 	var tv Timeval
 	err := Gettimeofday(&tv)
 	err := Gettimeofday(&tv)
@@ -105,6 +131,18 @@ func Utime(path string, buf *Utimbuf) error {
 	return Utimes(path, tv)
 	return Utimes(path, tv)
 }
 }
 
 
+func utimes(path string, tv *[2]Timeval) (err error) {
+	if tv == nil {
+		return utimensat(AT_FDCWD, path, nil, 0)
+	}
+
+	ts := []Timespec{
+		NsecToTimespec(TimevalToNsec(tv[0])),
+		NsecToTimespec(TimevalToNsec(tv[1])),
+	}
+	return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+}
+
 func Pipe(p []int) (err error) {
 func Pipe(p []int) (err error) {
 	if len(p) != 2 {
 	if len(p) != 2 {
 		return EINVAL
 		return EINVAL
@@ -161,22 +199,6 @@ func Pause() (err error) {
 	return
 	return
 }
 }
 
 
-// TODO(dfc): constants that should be in zsysnum_linux_arm64.go, remove
-// these when the deprecated syscalls that the syscall package relies on
-// are removed.
-const (
-	SYS_GETPGRP      = 1060
-	SYS_UTIMES       = 1037
-	SYS_FUTIMESAT    = 1066
-	SYS_PAUSE        = 1061
-	SYS_USTAT        = 1070
-	SYS_UTIME        = 1063
-	SYS_LCHOWN       = 1032
-	SYS_TIME         = 1062
-	SYS_EPOLL_CREATE = 1042
-	SYS_EPOLL_WAIT   = 1069
-)
-
 func Poll(fds []PollFd, timeout int) (n int, err error) {
 func Poll(fds []PollFd, timeout int) (n int, err error) {
 	var ts *Timespec
 	var ts *Timespec
 	if timeout >= 0 {
 	if timeout >= 0 {

+ 4 - 0
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go

@@ -8,6 +8,7 @@
 package unix
 package unix
 
 
 //sys	Dup2(oldfd int, newfd int) (err error)
 //sys	Dup2(oldfd int, newfd int) (err error)
+//sysnb	EpollCreate(size int) (fd int, err error)
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fchown(fd int, uid int, gid int) (err error)
 //sys	Fchown(fd int, uid int, gid int) (err error)
@@ -47,6 +48,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
 //sys	Statfs(path string, buf *Statfs_t) (err error)
 //sys	Statfs(path string, buf *Statfs_t) (err error)
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	Truncate(path string, length int64) (err error)
 //sys	Truncate(path string, length int64) (err error)
+//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
 //sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
 //sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -65,6 +67,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
 //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
 //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
 //sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
 //sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
 
 
+//sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 
 
 func Time(t *Time_t) (tt Time_t, err error) {
 func Time(t *Time_t) (tt Time_t, err error) {
@@ -80,6 +83,7 @@ func Time(t *Time_t) (tt Time_t, err error) {
 }
 }
 
 
 //sys	Utime(path string, buf *Utimbuf) (err error)
 //sys	Utime(path string, buf *Utimbuf) (err error)
+//sys	utimes(path string, times *[2]Timeval) (err error)
 
 
 func setTimespec(sec, nsec int64) Timespec {
 func setTimespec(sec, nsec int64) Timespec {
 	return Timespec{Sec: sec, Nsec: nsec}
 	return Timespec{Sec: sec, Nsec: nsec}

+ 9 - 8
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go

@@ -15,6 +15,8 @@ import (
 func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
 func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
 
 
 //sys	Dup2(oldfd int, newfd int) (err error)
 //sys	Dup2(oldfd int, newfd int) (err error)
+//sysnb	EpollCreate(size int) (fd int, err error)
+//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fchown(fd int, uid int, gid int) (err error)
 //sys	Fchown(fd int, uid int, gid int) (err error)
 //sys	Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
 //sys	Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
@@ -33,13 +35,12 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 //sysnb	Setregid(rgid int, egid int) (err error)
 //sysnb	Setregid(rgid int, egid int) (err error)
 //sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
 //sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
 //sysnb	Setresuid(ruid int, euid int, suid int) (err error)
 //sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-
 //sysnb	Setreuid(ruid int, euid int) (err error)
 //sysnb	Setreuid(ruid int, euid int) (err error)
 //sys	Shutdown(fd int, how int) (err error)
 //sys	Shutdown(fd int, how int) (err error)
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
-
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
 //sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
+//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
 //sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
 //sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -61,16 +62,17 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
 //sys	Ioperm(from int, num int, on int) (err error)
 //sys	Ioperm(from int, num int, on int) (err error)
 //sys	Iopl(level int) (err error)
 //sys	Iopl(level int) (err error)
 
 
+//sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 //sysnb	Time(t *Time_t) (tt Time_t, err error)
 //sysnb	Time(t *Time_t) (tt Time_t, err error)
+//sys	Utime(path string, buf *Utimbuf) (err error)
+//sys	utimes(path string, times *[2]Timeval) (err error)
 
 
 //sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
 //sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
 //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
 //sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
 //sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
 //sys	Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
 //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
 //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
 
 
-//sys	Utime(path string, buf *Utimbuf) (err error)
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	Pause() (err error)
 //sys	Pause() (err error)
 
 
 func Fstatfs(fd int, buf *Statfs_t) (err error) {
 func Fstatfs(fd int, buf *Statfs_t) (err error) {
@@ -122,14 +124,13 @@ func Pipe2(p []int, flags int) (err error) {
 	return
 	return
 }
 }
 
 
+//sysnb pipe() (p1 int, p2 int, err error)
+
 func Pipe(p []int) (err error) {
 func Pipe(p []int) (err error) {
 	if len(p) != 2 {
 	if len(p) != 2 {
 		return EINVAL
 		return EINVAL
 	}
 	}
-	var pp [2]_C_int
-	err = pipe2(&pp, 0)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
+	p[0], p[1], err = pipe()
 	return
 	return
 }
 }
 
 

+ 13 - 3
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go

@@ -7,8 +7,9 @@
 
 
 package unix
 package unix
 
 
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	Dup2(oldfd int, newfd int) (err error)
 //sys	Dup2(oldfd int, newfd int) (err error)
+//sysnb	EpollCreate(size int) (fd int, err error)
+//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fchown(fd int, uid int, gid int) (err error)
 //sys	Fchown(fd int, uid int, gid int) (err error)
 //sys	Fstat(fd int, stat *Stat_t) (err error)
 //sys	Fstat(fd int, stat *Stat_t) (err error)
@@ -43,8 +44,8 @@ package unix
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
 //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
 //sys	Stat(path string, stat *Stat_t) (err error)
 //sys	Stat(path string, stat *Stat_t) (err error)
 //sys	Statfs(path string, buf *Statfs_t) (err error)
 //sys	Statfs(path string, buf *Statfs_t) (err error)
-//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2
 //sys	Truncate(path string, length int64) (err error)
 //sys	Truncate(path string, length int64) (err error)
+//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
 //sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
 //sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
 //sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
 //sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -63,10 +64,11 @@ package unix
 //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
 //sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
 //sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
 //sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
 
 
+//sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 //sysnb	Time(t *Time_t) (tt Time_t, err error)
 //sysnb	Time(t *Time_t) (tt Time_t, err error)
-
 //sys	Utime(path string, buf *Utimbuf) (err error)
 //sys	Utime(path string, buf *Utimbuf) (err error)
+//sys	utimes(path string, times *[2]Timeval) (err error)
 
 
 func setTimespec(sec, nsec int64) Timespec {
 func setTimespec(sec, nsec int64) Timespec {
 	return Timespec{Sec: sec, Nsec: nsec}
 	return Timespec{Sec: sec, Nsec: nsec}
@@ -126,3 +128,11 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
 	}
 	}
 	return poll(&fds[0], len(fds), timeout)
 	return poll(&fds[0], len(fds), timeout)
 }
 }
+
+//sys	syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
+
+func SyncFileRange(fd int, off int64, n int64, flags int) error {
+	// The sync_file_range and sync_file_range2 syscalls differ only in the
+	// order of their arguments.
+	return syncFileRange2(fd, flags, off, n)
+}

+ 212 - 0
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go

@@ -0,0 +1,212 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build riscv64,linux
+
+package unix
+
+import "unsafe"
+
+func EpollCreate(size int) (fd int, err error) {
+	if size <= 0 {
+		return -1, EINVAL
+	}
+	return EpollCreate1(0)
+}
+
+//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
+//sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
+//sys	Fchown(fd int, uid int, gid int) (err error)
+//sys	Fstat(fd int, stat *Stat_t) (err error)
+//sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
+//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
+//sys	Ftruncate(fd int, length int64) (err error)
+//sysnb	Getegid() (egid int)
+//sysnb	Geteuid() (euid int)
+//sysnb	Getgid() (gid int)
+//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb	Getuid() (uid int)
+//sys	Listen(s int, n int) (err error)
+//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
+
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+	var ts *Timespec
+	if timeout != nil {
+		ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
+	}
+	return Pselect(nfd, r, w, e, ts, nil)
+}
+
+//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
+//sys	Setfsgid(gid int) (err error)
+//sys	Setfsuid(uid int) (err error)
+//sysnb	Setregid(rgid int, egid int) (err error)
+//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
+//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
+//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb	Setreuid(ruid int, euid int) (err error)
+//sys	Shutdown(fd int, how int) (err error)
+//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
+
+func Stat(path string, stat *Stat_t) (err error) {
+	return Fstatat(AT_FDCWD, path, stat, 0)
+}
+
+func Lchown(path string, uid int, gid int) (err error) {
+	return Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)
+}
+
+func Lstat(path string, stat *Stat_t) (err error) {
+	return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
+}
+
+//sys	Statfs(path string, buf *Statfs_t) (err error)
+//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
+//sys	Truncate(path string, length int64) (err error)
+
+func Ustat(dev int, ubuf *Ustat_t) (err error) {
+	return ENOSYS
+}
+
+//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
+//sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
+//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb	setgroups(n int, list *_Gid_t) (err error)
+//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
+
+//sysnb	Gettimeofday(tv *Timeval) (err error)
+
+func setTimespec(sec, nsec int64) Timespec {
+	return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+	return Timeval{Sec: sec, Usec: usec}
+}
+
+func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
+	if tv == nil {
+		return utimensat(dirfd, path, nil, 0)
+	}
+
+	ts := []Timespec{
+		NsecToTimespec(TimevalToNsec(tv[0])),
+		NsecToTimespec(TimevalToNsec(tv[1])),
+	}
+	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+}
+
+func Time(t *Time_t) (Time_t, error) {
+	var tv Timeval
+	err := Gettimeofday(&tv)
+	if err != nil {
+		return 0, err
+	}
+	if t != nil {
+		*t = Time_t(tv.Sec)
+	}
+	return Time_t(tv.Sec), nil
+}
+
+func Utime(path string, buf *Utimbuf) error {
+	tv := []Timeval{
+		{Sec: buf.Actime},
+		{Sec: buf.Modtime},
+	}
+	return Utimes(path, tv)
+}
+
+func utimes(path string, tv *[2]Timeval) (err error) {
+	if tv == nil {
+		return utimensat(AT_FDCWD, path, nil, 0)
+	}
+
+	ts := []Timespec{
+		NsecToTimespec(TimevalToNsec(tv[0])),
+		NsecToTimespec(TimevalToNsec(tv[1])),
+	}
+	return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+}
+
+func Pipe(p []int) (err error) {
+	if len(p) != 2 {
+		return EINVAL
+	}
+	var pp [2]_C_int
+	err = pipe2(&pp, 0)
+	p[0] = int(pp[0])
+	p[1] = int(pp[1])
+	return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) (err error) {
+	if len(p) != 2 {
+		return EINVAL
+	}
+	var pp [2]_C_int
+	err = pipe2(&pp, flags)
+	p[0] = int(pp[0])
+	p[1] = int(pp[1])
+	return
+}
+
+func (r *PtraceRegs) PC() uint64 { return r.Pc }
+
+func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
+
+func (iov *Iovec) SetLen(length int) {
+	iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+	msghdr.Controllen = uint64(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+	cmsg.Len = uint64(length)
+}
+
+func InotifyInit() (fd int, err error) {
+	return InotifyInit1(0)
+}
+
+func Dup2(oldfd int, newfd int) (err error) {
+	return Dup3(oldfd, newfd, 0)
+}
+
+func Pause() (err error) {
+	_, _, e1 := Syscall6(SYS_PPOLL, 0, 0, 0, 0, 0, 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+	var ts *Timespec
+	if timeout >= 0 {
+		ts = new(Timespec)
+		*ts = NsecToTimespec(int64(timeout) * 1e6)
+	}
+	if len(fds) == 0 {
+		return ppoll(nil, 0, ts, nil)
+	}
+	return ppoll(&fds[0], len(fds), ts, nil)
+}

+ 4 - 0
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go

@@ -11,6 +11,7 @@ import (
 )
 )
 
 
 //sys	Dup2(oldfd int, newfd int) (err error)
 //sys	Dup2(oldfd int, newfd int) (err error)
+//sysnb	EpollCreate(size int) (fd int, err error)
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
 //sys	Fchown(fd int, uid int, gid int) (err error)
 //sys	Fchown(fd int, uid int, gid int) (err error)
@@ -44,9 +45,11 @@ import (
 //sys	Statfs(path string, buf *Statfs_t) (err error)
 //sys	Statfs(path string, buf *Statfs_t) (err error)
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
 //sys	Truncate(path string, length int64) (err error)
 //sys	Truncate(path string, length int64) (err error)
+//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
 //sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
 //sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
 //sysnb	setgroups(n int, list *_Gid_t) (err error)
 //sysnb	setgroups(n int, list *_Gid_t) (err error)
 
 
+//sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 
 
 func Time(t *Time_t) (tt Time_t, err error) {
 func Time(t *Time_t) (tt Time_t, err error) {
@@ -62,6 +65,7 @@ func Time(t *Time_t) (tt Time_t, err error) {
 }
 }
 
 
 //sys	Utime(path string, buf *Utimbuf) (err error)
 //sys	Utime(path string, buf *Utimbuf) (err error)
+//sys	utimes(path string, times *[2]Timeval) (err error)
 
 
 func setTimespec(sec, nsec int64) Timespec {
 func setTimespec(sec, nsec int64) Timespec {
 	return Timespec{Sec: sec, Nsec: nsec}
 	return Timespec{Sec: sec, Nsec: nsec}

+ 2 - 0
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go

@@ -68,6 +68,7 @@ func Iopl(level int) (err error) {
 	return ENOSYS
 	return ENOSYS
 }
 }
 
 
+//sys	futimesat(dirfd int, path string, times *[2]Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 //sysnb	Gettimeofday(tv *Timeval) (err error)
 
 
 func Time(t *Time_t) (tt Time_t, err error) {
 func Time(t *Time_t) (tt Time_t, err error) {
@@ -83,6 +84,7 @@ func Time(t *Time_t) (tt Time_t, err error) {
 }
 }
 
 
 //sys	Utime(path string, buf *Utimbuf) (err error)
 //sys	Utime(path string, buf *Utimbuf) (err error)
+//sys	utimes(path string, times *[2]Timeval) (err error)
 
 
 func setTimespec(sec, nsec int64) Timespec {
 func setTimespec(sec, nsec int64) Timespec {
 	return Timespec{Sec: sec, Nsec: nsec}
 	return Timespec{Sec: sec, Nsec: nsec}

+ 14 - 2
vendor/golang.org/x/sys/unix/syscall_netbsd.go

@@ -145,11 +145,11 @@ func IoctlSetInt(fd int, req uint, value int) error {
 	return ioctl(fd, req, uintptr(value))
 	return ioctl(fd, req, uintptr(value))
 }
 }
 
 
-func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
-func IoctlSetTermios(fd int, req uint, value *Termios) error {
+func ioctlSetTermios(fd int, req uint, value *Termios) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
@@ -233,6 +233,18 @@ func Uname(uname *Utsname) error {
 //sys	Dup(fd int) (nfd int, err error)
 //sys	Dup(fd int) (nfd int, err error)
 //sys	Dup2(from int, to int) (err error)
 //sys	Dup2(from int, to int) (err error)
 //sys	Exit(code int)
 //sys	Exit(code int)
+//sys	ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
+//sys	ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
+//sys	ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error)
+//sys	ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
+//sys	ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
+//sys	ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
+//sys	ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error)
+//sys	ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
+//sys	ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
+//sys	ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
+//sys	ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error)
+//sys	ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
 //sys	Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
 //sys	Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE
 //sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE
 //sys	Fchdir(fd int) (err error)
 //sys	Fchdir(fd int) (err error)

+ 2 - 2
vendor/golang.org/x/sys/unix/syscall_openbsd.go

@@ -113,11 +113,11 @@ func IoctlSetInt(fd int, req uint, value int) error {
 	return ioctl(fd, req, uintptr(value))
 	return ioctl(fd, req, uintptr(value))
 }
 }
 
 
-func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+func ioctlSetWinsize(fd int, req uint, value *Winsize) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
-func IoctlSetTermios(fd int, req uint, value *Termios) error {
+func ioctlSetTermios(fd int, req uint, value *Termios) error {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 

+ 12 - 7
vendor/golang.org/x/sys/unix/syscall_solaris.go

@@ -112,7 +112,7 @@ func Getsockname(fd int) (sa Sockaddr, err error) {
 	if err = getsockname(fd, &rsa, &len); err != nil {
 	if err = getsockname(fd, &rsa, &len); err != nil {
 		return
 		return
 	}
 	}
-	return anyToSockaddr(&rsa)
+	return anyToSockaddr(fd, &rsa)
 }
 }
 
 
 // GetsockoptString returns the string value of the socket option opt for the
 // GetsockoptString returns the string value of the socket option opt for the
@@ -314,7 +314,11 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
 
 
 // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
 // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
 func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
 func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
-	valptr, _, err := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
+	valptr, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
+	var err error
+	if errno != 0 {
+		err = errno
+	}
 	return int(valptr), err
 	return int(valptr), err
 }
 }
 
 
@@ -356,7 +360,7 @@ func Futimes(fd int, tv []Timeval) error {
 	return futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
 	return futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
 }
 }
 
 
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
+func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 	switch rsa.Addr.Family {
 	switch rsa.Addr.Family {
 	case AF_UNIX:
 	case AF_UNIX:
 		pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
 		pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
@@ -407,7 +411,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
 	if nfd == -1 {
 	if nfd == -1 {
 		return
 		return
 	}
 	}
-	sa, err = anyToSockaddr(&rsa)
+	sa, err = anyToSockaddr(fd, &rsa)
 	if err != nil {
 	if err != nil {
 		Close(nfd)
 		Close(nfd)
 		nfd = 0
 		nfd = 0
@@ -444,7 +448,7 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
 	oobn = int(msg.Accrightslen)
 	oobn = int(msg.Accrightslen)
 	// source address is only specified if the socket is unconnected
 	// source address is only specified if the socket is unconnected
 	if rsa.Addr.Family != AF_UNSPEC {
 	if rsa.Addr.Family != AF_UNSPEC {
-		from, err = anyToSockaddr(&rsa)
+		from, err = anyToSockaddr(fd, &rsa)
 	}
 	}
 	return
 	return
 }
 }
@@ -536,11 +540,11 @@ func IoctlSetInt(fd int, req uint, value int) (err error) {
 	return ioctl(fd, req, uintptr(value))
 	return ioctl(fd, req, uintptr(value))
 }
 }
 
 
-func IoctlSetWinsize(fd int, req uint, value *Winsize) (err error) {
+func ioctlSetWinsize(fd int, req uint, value *Winsize) (err error) {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
-func IoctlSetTermios(fd int, req uint, value *Termios) (err error) {
+func ioctlSetTermios(fd int, req uint, value *Termios) (err error) {
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
 }
 }
 
 
@@ -595,6 +599,7 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
 //sys	Dup(fd int) (nfd int, err error)
 //sys	Dup(fd int) (nfd int, err error)
 //sys	Dup2(oldfd int, newfd int) (err error)
 //sys	Dup2(oldfd int, newfd int) (err error)
 //sys	Exit(code int)
 //sys	Exit(code int)
+//sys	Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
 //sys	Fchdir(fd int) (err error)
 //sys	Fchdir(fd int) (err error)
 //sys	Fchmod(fd int, mode uint32) (err error)
 //sys	Fchmod(fd int, mode uint32) (err error)
 //sys	Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
 //sys	Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)

+ 3 - 3
vendor/golang.org/x/sys/unix/syscall_unix.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 
 package unix
 package unix
 
 
@@ -219,7 +219,7 @@ func Getpeername(fd int) (sa Sockaddr, err error) {
 	if err = getpeername(fd, &rsa, &len); err != nil {
 	if err = getpeername(fd, &rsa, &len); err != nil {
 		return
 		return
 	}
 	}
-	return anyToSockaddr(&rsa)
+	return anyToSockaddr(fd, &rsa)
 }
 }
 
 
 func GetsockoptByte(fd, level, opt int) (value byte, err error) {
 func GetsockoptByte(fd, level, opt int) (value byte, err error) {
@@ -291,7 +291,7 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
 		return
 		return
 	}
 	}
 	if rsa.Addr.Family != AF_UNSPEC {
 	if rsa.Addr.Family != AF_UNSPEC {
-		from, err = anyToSockaddr(&rsa)
+		from, err = anyToSockaddr(fd, &rsa)
 	}
 	}
 	return
 	return
 }
 }

+ 1 - 1
vendor/golang.org/x/sys/unix/timestruct.go

@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 // license that can be found in the LICENSE file.
 
 
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 
 package unix
 package unix
 
 

+ 229 - 0
vendor/golang.org/x/sys/unix/types_aix.go

@@ -0,0 +1,229 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+// +build aix
+
+/*
+Input to cgo -godefs.  See also mkerrors.sh and mkall.sh
+*/
+
+// +godefs map struct_in_addr [4]byte /* in_addr */
+// +godefs map struct_in6_addr [16]byte /* in6_addr */
+
+package unix
+
+/*
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/limits.h>
+#include <sys/un.h>
+#include <utime.h>
+#include <sys/utsname.h>
+#include <sys/poll.h>
+
+#include <termios.h>
+
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <netinet/in.h>
+#include <netinet/icmp6.h>
+
+
+#include <dirent.h>
+#include <fcntl.h>
+#include <gcrypt.h>
+
+enum {
+	sizeofPtr = sizeof(void*),
+};
+
+union sockaddr_all {
+	struct sockaddr s1;     // this one gets used for fields
+	struct sockaddr_in s2;  // these pad it out
+	struct sockaddr_in6 s3;
+	struct sockaddr_un s4;
+	struct sockaddr_dl s5;
+};
+
+struct sockaddr_any {
+	struct sockaddr addr;
+	char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
+};
+
+*/
+import "C"
+
+// Machine characteristics; for internal use.
+
+const (
+	sizeofPtr      = C.sizeofPtr
+	sizeofShort    = C.sizeof_short
+	sizeofInt      = C.sizeof_int
+	sizeofLong     = C.sizeof_long
+	sizeofLongLong = C.sizeof_longlong
+	PathMax        = C.PATH_MAX
+)
+
+// Basic types
+
+type (
+	_C_short     C.short
+	_C_int       C.int
+	_C_long      C.long
+	_C_long_long C.longlong
+)
+
+type off64 C.off64_t
+type off C.off_t
+type Mode_t C.mode_t
+
+// Time
+
+type Timespec C.struct_timespec
+
+type StTimespec C.struct_st_timespec
+
+type Timeval C.struct_timeval
+
+type Timeval32 C.struct_timeval32
+
+type Timex C.struct_timex
+
+type Time_t C.time_t
+
+type Tms C.struct_tms
+
+type Utimbuf C.struct_utimbuf
+
+type Timezone C.struct_timezone
+
+// Processes
+
+type Rusage C.struct_rusage
+
+type Rlimit C.struct_rlimit64
+
+type Pid_t C.pid_t
+
+type _Gid_t C.gid_t
+
+type dev_t C.dev_t
+
+// Files
+
+type Stat_t C.struct_stat
+
+type StatxTimestamp C.struct_statx_timestamp
+
+type Statx_t C.struct_statx
+
+type Dirent C.struct_dirent
+
+// Sockets
+
+type RawSockaddrInet4 C.struct_sockaddr_in
+
+type RawSockaddrInet6 C.struct_sockaddr_in6
+
+type RawSockaddrUnix C.struct_sockaddr_un
+
+type RawSockaddr C.struct_sockaddr
+
+type RawSockaddrAny C.struct_sockaddr_any
+
+type _Socklen C.socklen_t
+
+type Cmsghdr C.struct_cmsghdr
+
+type ICMPv6Filter C.struct_icmp6_filter
+
+type Iovec C.struct_iovec
+
+type IPMreq C.struct_ip_mreq
+
+type IPv6Mreq C.struct_ipv6_mreq
+
+type IPv6MTUInfo C.struct_ip6_mtuinfo
+
+type Linger C.struct_linger
+
+type Msghdr C.struct_msghdr
+
+const (
+	SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
+	SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
+	SizeofSockaddrAny   = C.sizeof_struct_sockaddr_any
+	SizeofSockaddrUnix  = C.sizeof_struct_sockaddr_un
+	SizeofLinger        = C.sizeof_struct_linger
+	SizeofIPMreq        = C.sizeof_struct_ip_mreq
+	SizeofIPv6Mreq      = C.sizeof_struct_ipv6_mreq
+	SizeofIPv6MTUInfo   = C.sizeof_struct_ip6_mtuinfo
+	SizeofMsghdr        = C.sizeof_struct_msghdr
+	SizeofCmsghdr       = C.sizeof_struct_cmsghdr
+	SizeofICMPv6Filter  = C.sizeof_struct_icmp6_filter
+)
+
+// Routing and interface messages
+
+const (
+	SizeofIfMsghdr = C.sizeof_struct_if_msghdr
+)
+
+type IfMsgHdr C.struct_if_msghdr
+
+// Misc
+
+type FdSet C.fd_set
+
+type Utsname C.struct_utsname
+
+type Ustat_t C.struct_ustat
+
+type Sigset_t C.sigset_t
+
+const (
+	AT_FDCWD            = C.AT_FDCWD
+	AT_REMOVEDIR        = C.AT_REMOVEDIR
+	AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
+)
+
+// Terminal handling
+
+type Termios C.struct_termios
+
+type Termio C.struct_termio
+
+type Winsize C.struct_winsize
+
+//poll
+
+type PollFd struct {
+	Fd      int32
+	Events  uint16
+	Revents uint16
+}
+
+const (
+	POLLERR    = C.POLLERR
+	POLLHUP    = C.POLLHUP
+	POLLIN     = C.POLLIN
+	POLLNVAL   = C.POLLNVAL
+	POLLOUT    = C.POLLOUT
+	POLLPRI    = C.POLLPRI
+	POLLRDBAND = C.POLLRDBAND
+	POLLRDNORM = C.POLLRDNORM
+	POLLWRBAND = C.POLLWRBAND
+	POLLWRNORM = C.POLLWRNORM
+)
+
+//flock_t
+
+type Flock_t C.struct_flock64
+
+// Statfs
+
+type Statfs_t C.struct_statfs
+
+const RNDGETENTCNT = 0x80045200

+ 0 - 17
vendor/golang.org/x/sys/unix/types_dragonfly.go

@@ -100,23 +100,6 @@ type _Gid_t C.gid_t
 
 
 // Files
 // Files
 
 
-const ( // Directory mode bits
-	S_IFMT   = C.S_IFMT
-	S_IFIFO  = C.S_IFIFO
-	S_IFCHR  = C.S_IFCHR
-	S_IFDIR  = C.S_IFDIR
-	S_IFBLK  = C.S_IFBLK
-	S_IFREG  = C.S_IFREG
-	S_IFLNK  = C.S_IFLNK
-	S_IFSOCK = C.S_IFSOCK
-	S_ISUID  = C.S_ISUID
-	S_ISGID  = C.S_ISGID
-	S_ISVTX  = C.S_ISVTX
-	S_IRUSR  = C.S_IRUSR
-	S_IWUSR  = C.S_IWUSR
-	S_IXUSR  = C.S_IXUSR
-)
-
 type Stat_t C.struct_stat
 type Stat_t C.struct_stat
 
 
 type Statfs_t C.struct_statfs
 type Statfs_t C.struct_statfs

+ 0 - 17
vendor/golang.org/x/sys/unix/types_freebsd.go

@@ -189,23 +189,6 @@ type _Gid_t C.gid_t
 
 
 // Files
 // Files
 
 
-const ( // Directory mode bits
-	S_IFMT   = C.S_IFMT
-	S_IFIFO  = C.S_IFIFO
-	S_IFCHR  = C.S_IFCHR
-	S_IFDIR  = C.S_IFDIR
-	S_IFBLK  = C.S_IFBLK
-	S_IFREG  = C.S_IFREG
-	S_IFLNK  = C.S_IFLNK
-	S_IFSOCK = C.S_IFSOCK
-	S_ISUID  = C.S_ISUID
-	S_ISGID  = C.S_ISGID
-	S_ISVTX  = C.S_ISVTX
-	S_IRUSR  = C.S_IRUSR
-	S_IWUSR  = C.S_IWUSR
-	S_IXUSR  = C.S_IXUSR
-)
-
 type Stat_t C.struct_stat8
 type Stat_t C.struct_stat8
 
 
 type Statfs_t C.struct_statfs
 type Statfs_t C.struct_statfs

+ 0 - 17
vendor/golang.org/x/sys/unix/types_openbsd.go

@@ -101,23 +101,6 @@ type _Gid_t C.gid_t
 
 
 // Files
 // Files
 
 
-const ( // Directory mode bits
-	S_IFMT   = C.S_IFMT
-	S_IFIFO  = C.S_IFIFO
-	S_IFCHR  = C.S_IFCHR
-	S_IFDIR  = C.S_IFDIR
-	S_IFBLK  = C.S_IFBLK
-	S_IFREG  = C.S_IFREG
-	S_IFLNK  = C.S_IFLNK
-	S_IFSOCK = C.S_IFSOCK
-	S_ISUID  = C.S_ISUID
-	S_ISGID  = C.S_ISGID
-	S_ISVTX  = C.S_ISVTX
-	S_IRUSR  = C.S_IRUSR
-	S_IWUSR  = C.S_IWUSR
-	S_IXUSR  = C.S_IXUSR
-)
-
 type Stat_t C.struct_stat
 type Stat_t C.struct_stat
 
 
 type Statfs_t C.struct_statfs
 type Statfs_t C.struct_statfs

+ 0 - 17
vendor/golang.org/x/sys/unix/types_solaris.go

@@ -118,23 +118,6 @@ type _Gid_t C.gid_t
 
 
 // Files
 // Files
 
 
-const ( // Directory mode bits
-	S_IFMT   = C.S_IFMT
-	S_IFIFO  = C.S_IFIFO
-	S_IFCHR  = C.S_IFCHR
-	S_IFDIR  = C.S_IFDIR
-	S_IFBLK  = C.S_IFBLK
-	S_IFREG  = C.S_IFREG
-	S_IFLNK  = C.S_IFLNK
-	S_IFSOCK = C.S_IFSOCK
-	S_ISUID  = C.S_ISUID
-	S_ISGID  = C.S_ISGID
-	S_ISVTX  = C.S_ISVTX
-	S_IRUSR  = C.S_IRUSR
-	S_IWUSR  = C.S_IWUSR
-	S_IXUSR  = C.S_IXUSR
-)
-
 type Stat_t C.struct_stat
 type Stat_t C.struct_stat
 
 
 type Flock_t C.struct_flock
 type Flock_t C.struct_flock

+ 231 - 0
vendor/golang.org/x/sys/unix/xattr_bsd.go

@@ -0,0 +1,231 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build freebsd netbsd
+
+package unix
+
+import (
+	"strings"
+	"unsafe"
+)
+
+// Derive extattr namespace and attribute name
+
+func xattrnamespace(fullattr string) (ns int, attr string, err error) {
+	s := strings.IndexByte(fullattr, '.')
+	if s == -1 {
+		return -1, "", ENOATTR
+	}
+
+	namespace := fullattr[0:s]
+	attr = fullattr[s+1:]
+
+	switch namespace {
+	case "user":
+		return EXTATTR_NAMESPACE_USER, attr, nil
+	case "system":
+		return EXTATTR_NAMESPACE_SYSTEM, attr, nil
+	default:
+		return -1, "", ENOATTR
+	}
+}
+
+func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {
+	if len(dest) > idx {
+		return unsafe.Pointer(&dest[idx])
+	} else {
+		return unsafe.Pointer(_zero)
+	}
+}
+
+// FreeBSD and NetBSD implement their own syscalls to handle extended attributes
+
+func Getxattr(file string, attr string, dest []byte) (sz int, err error) {
+	d := initxattrdest(dest, 0)
+	destsize := len(dest)
+
+	nsid, a, err := xattrnamespace(attr)
+	if err != nil {
+		return -1, err
+	}
+
+	return ExtattrGetFile(file, nsid, a, uintptr(d), destsize)
+}
+
+func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
+	d := initxattrdest(dest, 0)
+	destsize := len(dest)
+
+	nsid, a, err := xattrnamespace(attr)
+	if err != nil {
+		return -1, err
+	}
+
+	return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize)
+}
+
+func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {
+	d := initxattrdest(dest, 0)
+	destsize := len(dest)
+
+	nsid, a, err := xattrnamespace(attr)
+	if err != nil {
+		return -1, err
+	}
+
+	return ExtattrGetLink(link, nsid, a, uintptr(d), destsize)
+}
+
+// flags are unused on FreeBSD
+
+func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
+	d := unsafe.Pointer(&data[0])
+	datasiz := len(data)
+
+	nsid, a, err := xattrnamespace(attr)
+	if err != nil {
+		return
+	}
+
+	_, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz)
+	return
+}
+
+func Setxattr(file string, attr string, data []byte, flags int) (err error) {
+	d := unsafe.Pointer(&data[0])
+	datasiz := len(data)
+
+	nsid, a, err := xattrnamespace(attr)
+	if err != nil {
+		return
+	}
+
+	_, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz)
+	return
+}
+
+func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
+	d := unsafe.Pointer(&data[0])
+	datasiz := len(data)
+
+	nsid, a, err := xattrnamespace(attr)
+	if err != nil {
+		return
+	}
+
+	_, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz)
+	return
+}
+
+func Removexattr(file string, attr string) (err error) {
+	nsid, a, err := xattrnamespace(attr)
+	if err != nil {
+		return
+	}
+
+	err = ExtattrDeleteFile(file, nsid, a)
+	return
+}
+
+func Fremovexattr(fd int, attr string) (err error) {
+	nsid, a, err := xattrnamespace(attr)
+	if err != nil {
+		return
+	}
+
+	err = ExtattrDeleteFd(fd, nsid, a)
+	return
+}
+
+func Lremovexattr(link string, attr string) (err error) {
+	nsid, a, err := xattrnamespace(attr)
+	if err != nil {
+		return
+	}
+
+	err = ExtattrDeleteLink(link, nsid, a)
+	return
+}
+
+func Listxattr(file string, dest []byte) (sz int, err error) {
+	d := initxattrdest(dest, 0)
+	destsiz := len(dest)
+
+	// FreeBSD won't allow you to list xattrs from multiple namespaces
+	s := 0
+	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
+		stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
+
+		/* Errors accessing system attrs are ignored so that
+		 * we can implement the Linux-like behavior of omitting errors that
+		 * we don't have read permissions on
+		 *
+		 * Linux will still error if we ask for user attributes on a file that
+		 * we don't have read permissions on, so don't ignore those errors
+		 */
+		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+			continue
+		} else if e != nil {
+			return s, e
+		}
+
+		s += stmp
+		destsiz -= s
+		if destsiz < 0 {
+			destsiz = 0
+		}
+		d = initxattrdest(dest, s)
+	}
+
+	return s, nil
+}
+
+func Flistxattr(fd int, dest []byte) (sz int, err error) {
+	d := initxattrdest(dest, 0)
+	destsiz := len(dest)
+
+	s := 0
+	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
+		stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
+		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+			continue
+		} else if e != nil {
+			return s, e
+		}
+
+		s += stmp
+		destsiz -= s
+		if destsiz < 0 {
+			destsiz = 0
+		}
+		d = initxattrdest(dest, s)
+	}
+
+	return s, nil
+}
+
+func Llistxattr(link string, dest []byte) (sz int, err error) {
+	d := initxattrdest(dest, 0)
+	destsiz := len(dest)
+
+	s := 0
+	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
+		stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
+		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+			continue
+		} else if e != nil {
+			return s, e
+		}
+
+		s += stmp
+		destsiz -= s
+		if destsiz < 0 {
+			destsiz = 0
+		}
+		d = initxattrdest(dest, s)
+	}
+
+	return s, nil
+}

+ 1360 - 0
vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go

@@ -0,0 +1,1360 @@
+// mkerrors.sh -maix32
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build ppc,aix
+
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs -- -maix32 _const.go
+
+package unix
+
+import "syscall"
+
+const (
+	AF_APPLETALK                  = 0x10
+	AF_BYPASS                     = 0x19
+	AF_CCITT                      = 0xa
+	AF_CHAOS                      = 0x5
+	AF_DATAKIT                    = 0x9
+	AF_DECnet                     = 0xc
+	AF_DLI                        = 0xd
+	AF_ECMA                       = 0x8
+	AF_HYLINK                     = 0xf
+	AF_IMPLINK                    = 0x3
+	AF_INET                       = 0x2
+	AF_INET6                      = 0x18
+	AF_INTF                       = 0x14
+	AF_ISO                        = 0x7
+	AF_LAT                        = 0xe
+	AF_LINK                       = 0x12
+	AF_LOCAL                      = 0x1
+	AF_MAX                        = 0x1e
+	AF_NDD                        = 0x17
+	AF_NETWARE                    = 0x16
+	AF_NS                         = 0x6
+	AF_OSI                        = 0x7
+	AF_PUP                        = 0x4
+	AF_RIF                        = 0x15
+	AF_ROUTE                      = 0x11
+	AF_SNA                        = 0xb
+	AF_UNIX                       = 0x1
+	AF_UNSPEC                     = 0x0
+	ALTWERASE                     = 0x400000
+	ARPHRD_802_3                  = 0x6
+	ARPHRD_802_5                  = 0x6
+	ARPHRD_ETHER                  = 0x1
+	ARPHRD_FDDI                   = 0x1
+	B0                            = 0x0
+	B110                          = 0x3
+	B1200                         = 0x9
+	B134                          = 0x4
+	B150                          = 0x5
+	B1800                         = 0xa
+	B19200                        = 0xe
+	B200                          = 0x6
+	B2400                         = 0xb
+	B300                          = 0x7
+	B38400                        = 0xf
+	B4800                         = 0xc
+	B50                           = 0x1
+	B600                          = 0x8
+	B75                           = 0x2
+	B9600                         = 0xd
+	BRKINT                        = 0x2
+	BS0                           = 0x0
+	BS1                           = 0x1000
+	BSDLY                         = 0x1000
+	CAP_AACCT                     = 0x6
+	CAP_ARM_APPLICATION           = 0x5
+	CAP_BYPASS_RAC_VMM            = 0x3
+	CAP_CLEAR                     = 0x0
+	CAP_CREDENTIALS               = 0x7
+	CAP_EFFECTIVE                 = 0x1
+	CAP_EWLM_AGENT                = 0x4
+	CAP_INHERITABLE               = 0x2
+	CAP_MAXIMUM                   = 0x7
+	CAP_NUMA_ATTACH               = 0x2
+	CAP_PERMITTED                 = 0x3
+	CAP_PROPAGATE                 = 0x1
+	CAP_PROPOGATE                 = 0x1
+	CAP_SET                       = 0x1
+	CBAUD                         = 0xf
+	CFLUSH                        = 0xf
+	CIBAUD                        = 0xf0000
+	CLOCAL                        = 0x800
+	CLOCK_MONOTONIC               = 0xa
+	CLOCK_PROCESS_CPUTIME_ID      = 0xb
+	CLOCK_REALTIME                = 0x9
+	CLOCK_THREAD_CPUTIME_ID       = 0xc
+	CR0                           = 0x0
+	CR1                           = 0x100
+	CR2                           = 0x200
+	CR3                           = 0x300
+	CRDLY                         = 0x300
+	CREAD                         = 0x80
+	CS5                           = 0x0
+	CS6                           = 0x10
+	CS7                           = 0x20
+	CS8                           = 0x30
+	CSIOCGIFCONF                  = -0x3ff796dc
+	CSIZE                         = 0x30
+	CSMAP_DIR                     = "/usr/lib/nls/csmap/"
+	CSTART                        = '\021'
+	CSTOP                         = '\023'
+	CSTOPB                        = 0x40
+	CSUSP                         = 0x1a
+	ECHO                          = 0x8
+	ECHOCTL                       = 0x20000
+	ECHOE                         = 0x10
+	ECHOK                         = 0x20
+	ECHOKE                        = 0x80000
+	ECHONL                        = 0x40
+	ECHOPRT                       = 0x40000
+	ECH_ICMPID                    = 0x2
+	ETHERNET_CSMACD               = 0x6
+	EVENP                         = 0x80
+	EXCONTINUE                    = 0x0
+	EXDLOK                        = 0x3
+	EXIO                          = 0x2
+	EXPGIO                        = 0x0
+	EXRESUME                      = 0x2
+	EXRETURN                      = 0x1
+	EXSIG                         = 0x4
+	EXTA                          = 0xe
+	EXTB                          = 0xf
+	EXTRAP                        = 0x1
+	EYEC_RTENTRYA                 = 0x257274656e747241
+	EYEC_RTENTRYF                 = 0x257274656e747246
+	E_ACC                         = 0x0
+	FD_CLOEXEC                    = 0x1
+	FD_SETSIZE                    = 0xfffe
+	FF0                           = 0x0
+	FF1                           = 0x2000
+	FFDLY                         = 0x2000
+	FLUSHBAND                     = 0x40
+	FLUSHLOW                      = 0x8
+	FLUSHO                        = 0x100000
+	FLUSHR                        = 0x1
+	FLUSHRW                       = 0x3
+	FLUSHW                        = 0x2
+	F_CLOSEM                      = 0xa
+	F_DUP2FD                      = 0xe
+	F_DUPFD                       = 0x0
+	F_GETFD                       = 0x1
+	F_GETFL                       = 0x3
+	F_GETLK                       = 0x5
+	F_GETLK64                     = 0xb
+	F_GETOWN                      = 0x8
+	F_LOCK                        = 0x1
+	F_OK                          = 0x0
+	F_RDLCK                       = 0x1
+	F_SETFD                       = 0x2
+	F_SETFL                       = 0x4
+	F_SETLK                       = 0x6
+	F_SETLK64                     = 0xc
+	F_SETLKW                      = 0x7
+	F_SETLKW64                    = 0xd
+	F_SETOWN                      = 0x9
+	F_TEST                        = 0x3
+	F_TLOCK                       = 0x2
+	F_TSTLK                       = 0xf
+	F_ULOCK                       = 0x0
+	F_UNLCK                       = 0x3
+	F_WRLCK                       = 0x2
+	HUPCL                         = 0x400
+	IBSHIFT                       = 0x10
+	ICANON                        = 0x2
+	ICMP6_FILTER                  = 0x26
+	ICMP6_SEC_SEND_DEL            = 0x46
+	ICMP6_SEC_SEND_GET            = 0x47
+	ICMP6_SEC_SEND_SET            = 0x44
+	ICMP6_SEC_SEND_SET_CGA_ADDR   = 0x45
+	ICRNL                         = 0x100
+	IEXTEN                        = 0x200000
+	IFA_FIRSTALIAS                = 0x2000
+	IFA_ROUTE                     = 0x1
+	IFF_64BIT                     = 0x4000000
+	IFF_ALLCAST                   = 0x20000
+	IFF_ALLMULTI                  = 0x200
+	IFF_BPF                       = 0x8000000
+	IFF_BRIDGE                    = 0x40000
+	IFF_BROADCAST                 = 0x2
+	IFF_CANTCHANGE                = 0x80c52
+	IFF_CHECKSUM_OFFLOAD          = 0x10000000
+	IFF_D1                        = 0x8000
+	IFF_D2                        = 0x4000
+	IFF_D3                        = 0x2000
+	IFF_D4                        = 0x1000
+	IFF_DEBUG                     = 0x4
+	IFF_DEVHEALTH                 = 0x4000
+	IFF_DO_HW_LOOPBACK            = 0x10000
+	IFF_GROUP_ROUTING             = 0x2000000
+	IFF_IFBUFMGT                  = 0x800000
+	IFF_LINK0                     = 0x100000
+	IFF_LINK1                     = 0x200000
+	IFF_LINK2                     = 0x400000
+	IFF_LOOPBACK                  = 0x8
+	IFF_MULTICAST                 = 0x80000
+	IFF_NOARP                     = 0x80
+	IFF_NOECHO                    = 0x800
+	IFF_NOTRAILERS                = 0x20
+	IFF_OACTIVE                   = 0x400
+	IFF_POINTOPOINT               = 0x10
+	IFF_PROMISC                   = 0x100
+	IFF_PSEG                      = 0x40000000
+	IFF_RUNNING                   = 0x40
+	IFF_SIMPLEX                   = 0x800
+	IFF_SNAP                      = 0x8000
+	IFF_TCP_DISABLE_CKSUM         = 0x20000000
+	IFF_TCP_NOCKSUM               = 0x1000000
+	IFF_UP                        = 0x1
+	IFF_VIPA                      = 0x80000000
+	IFNAMSIZ                      = 0x10
+	IFO_FLUSH                     = 0x1
+	IFT_1822                      = 0x2
+	IFT_AAL5                      = 0x31
+	IFT_ARCNET                    = 0x23
+	IFT_ARCNETPLUS                = 0x24
+	IFT_ATM                       = 0x25
+	IFT_CEPT                      = 0x13
+	IFT_CLUSTER                   = 0x3e
+	IFT_DS3                       = 0x1e
+	IFT_EON                       = 0x19
+	IFT_ETHER                     = 0x6
+	IFT_FCS                       = 0x3a
+	IFT_FDDI                      = 0xf
+	IFT_FRELAY                    = 0x20
+	IFT_FRELAYDCE                 = 0x2c
+	IFT_GIFTUNNEL                 = 0x3c
+	IFT_HDH1822                   = 0x3
+	IFT_HF                        = 0x3d
+	IFT_HIPPI                     = 0x2f
+	IFT_HSSI                      = 0x2e
+	IFT_HY                        = 0xe
+	IFT_IB                        = 0xc7
+	IFT_ISDNBASIC                 = 0x14
+	IFT_ISDNPRIMARY               = 0x15
+	IFT_ISO88022LLC               = 0x29
+	IFT_ISO88023                  = 0x7
+	IFT_ISO88024                  = 0x8
+	IFT_ISO88025                  = 0x9
+	IFT_ISO88026                  = 0xa
+	IFT_LAPB                      = 0x10
+	IFT_LOCALTALK                 = 0x2a
+	IFT_LOOP                      = 0x18
+	IFT_MIOX25                    = 0x26
+	IFT_MODEM                     = 0x30
+	IFT_NSIP                      = 0x1b
+	IFT_OTHER                     = 0x1
+	IFT_P10                       = 0xc
+	IFT_P80                       = 0xd
+	IFT_PARA                      = 0x22
+	IFT_PPP                       = 0x17
+	IFT_PROPMUX                   = 0x36
+	IFT_PROPVIRTUAL               = 0x35
+	IFT_PTPSERIAL                 = 0x16
+	IFT_RS232                     = 0x21
+	IFT_SDLC                      = 0x11
+	IFT_SIP                       = 0x1f
+	IFT_SLIP                      = 0x1c
+	IFT_SMDSDXI                   = 0x2b
+	IFT_SMDSICIP                  = 0x34
+	IFT_SN                        = 0x38
+	IFT_SONET                     = 0x27
+	IFT_SONETPATH                 = 0x32
+	IFT_SONETVT                   = 0x33
+	IFT_SP                        = 0x39
+	IFT_STARLAN                   = 0xb
+	IFT_T1                        = 0x12
+	IFT_TUNNEL                    = 0x3b
+	IFT_ULTRA                     = 0x1d
+	IFT_V35                       = 0x2d
+	IFT_VIPA                      = 0x37
+	IFT_X25                       = 0x5
+	IFT_X25DDN                    = 0x4
+	IFT_X25PLE                    = 0x28
+	IFT_XETHER                    = 0x1a
+	IGNBRK                        = 0x1
+	IGNCR                         = 0x80
+	IGNPAR                        = 0x4
+	IMAXBEL                       = 0x10000
+	INLCR                         = 0x40
+	INPCK                         = 0x10
+	IN_CLASSA_HOST                = 0xffffff
+	IN_CLASSA_MAX                 = 0x80
+	IN_CLASSA_NET                 = 0xff000000
+	IN_CLASSA_NSHIFT              = 0x18
+	IN_CLASSB_HOST                = 0xffff
+	IN_CLASSB_MAX                 = 0x10000
+	IN_CLASSB_NET                 = 0xffff0000
+	IN_CLASSB_NSHIFT              = 0x10
+	IN_CLASSC_HOST                = 0xff
+	IN_CLASSC_NET                 = 0xffffff00
+	IN_CLASSC_NSHIFT              = 0x8
+	IN_CLASSD_HOST                = 0xfffffff
+	IN_CLASSD_NET                 = 0xf0000000
+	IN_CLASSD_NSHIFT              = 0x1c
+	IN_LOOPBACKNET                = 0x7f
+	IN_USE                        = 0x1
+	IPPROTO_AH                    = 0x33
+	IPPROTO_BIP                   = 0x53
+	IPPROTO_DSTOPTS               = 0x3c
+	IPPROTO_EGP                   = 0x8
+	IPPROTO_EON                   = 0x50
+	IPPROTO_ESP                   = 0x32
+	IPPROTO_FRAGMENT              = 0x2c
+	IPPROTO_GGP                   = 0x3
+	IPPROTO_GIF                   = 0x8c
+	IPPROTO_GRE                   = 0x2f
+	IPPROTO_HOPOPTS               = 0x0
+	IPPROTO_ICMP                  = 0x1
+	IPPROTO_ICMPV6                = 0x3a
+	IPPROTO_IDP                   = 0x16
+	IPPROTO_IGMP                  = 0x2
+	IPPROTO_IP                    = 0x0
+	IPPROTO_IPIP                  = 0x4
+	IPPROTO_IPV6                  = 0x29
+	IPPROTO_LOCAL                 = 0x3f
+	IPPROTO_MAX                   = 0x100
+	IPPROTO_MH                    = 0x87
+	IPPROTO_NONE                  = 0x3b
+	IPPROTO_PUP                   = 0xc
+	IPPROTO_QOS                   = 0x2d
+	IPPROTO_RAW                   = 0xff
+	IPPROTO_ROUTING               = 0x2b
+	IPPROTO_RSVP                  = 0x2e
+	IPPROTO_SCTP                  = 0x84
+	IPPROTO_TCP                   = 0x6
+	IPPROTO_TP                    = 0x1d
+	IPPROTO_UDP                   = 0x11
+	IPV6_ADDRFORM                 = 0x16
+	IPV6_ADDR_PREFERENCES         = 0x4a
+	IPV6_ADD_MEMBERSHIP           = 0xc
+	IPV6_AIXRAWSOCKET             = 0x39
+	IPV6_CHECKSUM                 = 0x27
+	IPV6_DONTFRAG                 = 0x2d
+	IPV6_DROP_MEMBERSHIP          = 0xd
+	IPV6_DSTOPTS                  = 0x36
+	IPV6_FLOWINFO_FLOWLABEL       = 0xffffff
+	IPV6_FLOWINFO_PRIFLOW         = 0xfffffff
+	IPV6_FLOWINFO_PRIORITY        = 0xf000000
+	IPV6_FLOWINFO_SRFLAG          = 0x10000000
+	IPV6_FLOWINFO_VERSION         = 0xf0000000
+	IPV6_HOPLIMIT                 = 0x28
+	IPV6_HOPOPTS                  = 0x34
+	IPV6_JOIN_GROUP               = 0xc
+	IPV6_LEAVE_GROUP              = 0xd
+	IPV6_MIPDSTOPTS               = 0x36
+	IPV6_MULTICAST_HOPS           = 0xa
+	IPV6_MULTICAST_IF             = 0x9
+	IPV6_MULTICAST_LOOP           = 0xb
+	IPV6_NEXTHOP                  = 0x30
+	IPV6_NOPROBE                  = 0x1c
+	IPV6_PATHMTU                  = 0x2e
+	IPV6_PKTINFO                  = 0x21
+	IPV6_PKTOPTIONS               = 0x24
+	IPV6_PRIORITY_10              = 0xa000000
+	IPV6_PRIORITY_11              = 0xb000000
+	IPV6_PRIORITY_12              = 0xc000000
+	IPV6_PRIORITY_13              = 0xd000000
+	IPV6_PRIORITY_14              = 0xe000000
+	IPV6_PRIORITY_15              = 0xf000000
+	IPV6_PRIORITY_8               = 0x8000000
+	IPV6_PRIORITY_9               = 0x9000000
+	IPV6_PRIORITY_BULK            = 0x4000000
+	IPV6_PRIORITY_CONTROL         = 0x7000000
+	IPV6_PRIORITY_FILLER          = 0x1000000
+	IPV6_PRIORITY_INTERACTIVE     = 0x6000000
+	IPV6_PRIORITY_RESERVED1       = 0x3000000
+	IPV6_PRIORITY_RESERVED2       = 0x5000000
+	IPV6_PRIORITY_UNATTENDED      = 0x2000000
+	IPV6_PRIORITY_UNCHARACTERIZED = 0x0
+	IPV6_RECVDSTOPTS              = 0x38
+	IPV6_RECVHOPLIMIT             = 0x29
+	IPV6_RECVHOPOPTS              = 0x35
+	IPV6_RECVHOPS                 = 0x22
+	IPV6_RECVIF                   = 0x1e
+	IPV6_RECVPATHMTU              = 0x2f
+	IPV6_RECVPKTINFO              = 0x23
+	IPV6_RECVRTHDR                = 0x33
+	IPV6_RECVSRCRT                = 0x1d
+	IPV6_RECVTCLASS               = 0x2a
+	IPV6_RTHDR                    = 0x32
+	IPV6_RTHDRDSTOPTS             = 0x37
+	IPV6_RTHDR_TYPE_0             = 0x0
+	IPV6_RTHDR_TYPE_2             = 0x2
+	IPV6_SENDIF                   = 0x1f
+	IPV6_SRFLAG_LOOSE             = 0x0
+	IPV6_SRFLAG_STRICT            = 0x10000000
+	IPV6_TCLASS                   = 0x2b
+	IPV6_TOKEN_LENGTH             = 0x40
+	IPV6_UNICAST_HOPS             = 0x4
+	IPV6_USE_MIN_MTU              = 0x2c
+	IPV6_V6ONLY                   = 0x25
+	IPV6_VERSION                  = 0x60000000
+	IP_ADDRFORM                   = 0x16
+	IP_ADD_MEMBERSHIP             = 0xc
+	IP_ADD_SOURCE_MEMBERSHIP      = 0x3c
+	IP_BLOCK_SOURCE               = 0x3a
+	IP_BROADCAST_IF               = 0x10
+	IP_CACHE_LINE_SIZE            = 0x80
+	IP_DEFAULT_MULTICAST_LOOP     = 0x1
+	IP_DEFAULT_MULTICAST_TTL      = 0x1
+	IP_DF                         = 0x4000
+	IP_DHCPMODE                   = 0x11
+	IP_DONTFRAG                   = 0x19
+	IP_DROP_MEMBERSHIP            = 0xd
+	IP_DROP_SOURCE_MEMBERSHIP     = 0x3d
+	IP_FINDPMTU                   = 0x1a
+	IP_HDRINCL                    = 0x2
+	IP_INC_MEMBERSHIPS            = 0x14
+	IP_INIT_MEMBERSHIP            = 0x14
+	IP_MAXPACKET                  = 0xffff
+	IP_MF                         = 0x2000
+	IP_MSS                        = 0x240
+	IP_MULTICAST_HOPS             = 0xa
+	IP_MULTICAST_IF               = 0x9
+	IP_MULTICAST_LOOP             = 0xb
+	IP_MULTICAST_TTL              = 0xa
+	IP_OPT                        = 0x1b
+	IP_OPTIONS                    = 0x1
+	IP_PMTUAGE                    = 0x1b
+	IP_RECVDSTADDR                = 0x7
+	IP_RECVIF                     = 0x14
+	IP_RECVIFINFO                 = 0xf
+	IP_RECVINTERFACE              = 0x20
+	IP_RECVMACHDR                 = 0xe
+	IP_RECVOPTS                   = 0x5
+	IP_RECVRETOPTS                = 0x6
+	IP_RECVTTL                    = 0x22
+	IP_RETOPTS                    = 0x8
+	IP_SOURCE_FILTER              = 0x48
+	IP_TOS                        = 0x3
+	IP_TTL                        = 0x4
+	IP_UNBLOCK_SOURCE             = 0x3b
+	IP_UNICAST_HOPS               = 0x4
+	ISIG                          = 0x1
+	ISTRIP                        = 0x20
+	IUCLC                         = 0x800
+	IXANY                         = 0x1000
+	IXOFF                         = 0x400
+	IXON                          = 0x200
+	I_FLUSH                       = 0x20005305
+	LNOFLSH                       = 0x8000
+	LOCK_EX                       = 0x2
+	LOCK_NB                       = 0x4
+	LOCK_SH                       = 0x1
+	LOCK_UN                       = 0x8
+	MADV_DONTNEED                 = 0x4
+	MADV_NORMAL                   = 0x0
+	MADV_RANDOM                   = 0x1
+	MADV_SEQUENTIAL               = 0x2
+	MADV_SPACEAVAIL               = 0x5
+	MADV_WILLNEED                 = 0x3
+	MAP_ANON                      = 0x10
+	MAP_ANONYMOUS                 = 0x10
+	MAP_FILE                      = 0x0
+	MAP_FIXED                     = 0x100
+	MAP_PRIVATE                   = 0x2
+	MAP_SHARED                    = 0x1
+	MAP_TYPE                      = 0xf0
+	MAP_VARIABLE                  = 0x0
+	MCL_CURRENT                   = 0x100
+	MCL_FUTURE                    = 0x200
+	MSG_ANY                       = 0x4
+	MSG_ARGEXT                    = 0x400
+	MSG_BAND                      = 0x2
+	MSG_COMPAT                    = 0x8000
+	MSG_CTRUNC                    = 0x20
+	MSG_DONTROUTE                 = 0x4
+	MSG_EOR                       = 0x8
+	MSG_HIPRI                     = 0x1
+	MSG_MAXIOVLEN                 = 0x10
+	MSG_MPEG2                     = 0x80
+	MSG_NONBLOCK                  = 0x4000
+	MSG_NOSIGNAL                  = 0x100
+	MSG_OOB                       = 0x1
+	MSG_PEEK                      = 0x2
+	MSG_TRUNC                     = 0x10
+	MSG_WAITALL                   = 0x40
+	MSG_WAITFORONE                = 0x200
+	MS_ASYNC                      = 0x10
+	MS_EINTR                      = 0x80
+	MS_INVALIDATE                 = 0x40
+	MS_PER_SEC                    = 0x3e8
+	MS_SYNC                       = 0x20
+	NL0                           = 0x0
+	NL1                           = 0x4000
+	NL2                           = 0x8000
+	NL3                           = 0xc000
+	NLDLY                         = 0x4000
+	NOFLSH                        = 0x80
+	NOFLUSH                       = 0x80000000
+	OCRNL                         = 0x8
+	OFDEL                         = 0x80
+	OFILL                         = 0x40
+	OLCUC                         = 0x2
+	ONLCR                         = 0x4
+	ONLRET                        = 0x20
+	ONOCR                         = 0x10
+	ONOEOT                        = 0x80000
+	OPOST                         = 0x1
+	OXTABS                        = 0x40000
+	O_ACCMODE                     = 0x23
+	O_APPEND                      = 0x8
+	O_CIO                         = 0x80
+	O_CIOR                        = 0x800000000
+	O_CLOEXEC                     = 0x800000
+	O_CREAT                       = 0x100
+	O_DEFER                       = 0x2000
+	O_DELAY                       = 0x4000
+	O_DIRECT                      = 0x8000000
+	O_DIRECTORY                   = 0x80000
+	O_DSYNC                       = 0x400000
+	O_EFSOFF                      = 0x400000000
+	O_EFSON                       = 0x200000000
+	O_EXCL                        = 0x400
+	O_EXEC                        = 0x20
+	O_LARGEFILE                   = 0x4000000
+	O_NDELAY                      = 0x8000
+	O_NOCACHE                     = 0x100000
+	O_NOCTTY                      = 0x800
+	O_NOFOLLOW                    = 0x1000000
+	O_NONBLOCK                    = 0x4
+	O_NONE                        = 0x3
+	O_NSHARE                      = 0x10000
+	O_RAW                         = 0x100000000
+	O_RDONLY                      = 0x0
+	O_RDWR                        = 0x2
+	O_RSHARE                      = 0x1000
+	O_RSYNC                       = 0x200000
+	O_SEARCH                      = 0x20
+	O_SNAPSHOT                    = 0x40
+	O_SYNC                        = 0x10
+	O_TRUNC                       = 0x200
+	O_TTY_INIT                    = 0x0
+	O_WRONLY                      = 0x1
+	PARENB                        = 0x100
+	PAREXT                        = 0x100000
+	PARMRK                        = 0x8
+	PARODD                        = 0x200
+	PENDIN                        = 0x20000000
+	PRIO_PGRP                     = 0x1
+	PRIO_PROCESS                  = 0x0
+	PRIO_USER                     = 0x2
+	PROT_EXEC                     = 0x4
+	PROT_NONE                     = 0x0
+	PROT_READ                     = 0x1
+	PROT_WRITE                    = 0x2
+	PR_64BIT                      = 0x20
+	PR_ADDR                       = 0x2
+	PR_ARGEXT                     = 0x400
+	PR_ATOMIC                     = 0x1
+	PR_CONNREQUIRED               = 0x4
+	PR_FASTHZ                     = 0x5
+	PR_INP                        = 0x40
+	PR_INTRLEVEL                  = 0x8000
+	PR_MLS                        = 0x100
+	PR_MLS_1_LABEL                = 0x200
+	PR_NOEOR                      = 0x4000
+	PR_RIGHTS                     = 0x10
+	PR_SLOWHZ                     = 0x2
+	PR_WANTRCVD                   = 0x8
+	RLIMIT_AS                     = 0x6
+	RLIMIT_CORE                   = 0x4
+	RLIMIT_CPU                    = 0x0
+	RLIMIT_DATA                   = 0x2
+	RLIMIT_FSIZE                  = 0x1
+	RLIMIT_NOFILE                 = 0x7
+	RLIMIT_NPROC                  = 0x9
+	RLIMIT_RSS                    = 0x5
+	RLIMIT_STACK                  = 0x3
+	RLIM_INFINITY                 = 0x7fffffff
+	RTAX_AUTHOR                   = 0x6
+	RTAX_BRD                      = 0x7
+	RTAX_DST                      = 0x0
+	RTAX_GATEWAY                  = 0x1
+	RTAX_GENMASK                  = 0x3
+	RTAX_IFA                      = 0x5
+	RTAX_IFP                      = 0x4
+	RTAX_MAX                      = 0x8
+	RTAX_NETMASK                  = 0x2
+	RTA_AUTHOR                    = 0x40
+	RTA_BRD                       = 0x80
+	RTA_DOWNSTREAM                = 0x100
+	RTA_DST                       = 0x1
+	RTA_GATEWAY                   = 0x2
+	RTA_GENMASK                   = 0x8
+	RTA_IFA                       = 0x20
+	RTA_IFP                       = 0x10
+	RTA_NETMASK                   = 0x4
+	RTC_IA64                      = 0x3
+	RTC_POWER                     = 0x1
+	RTC_POWER_PC                  = 0x2
+	RTF_ACTIVE_DGD                = 0x1000000
+	RTF_BCE                       = 0x80000
+	RTF_BLACKHOLE                 = 0x1000
+	RTF_BROADCAST                 = 0x400000
+	RTF_BUL                       = 0x2000
+	RTF_CLONE                     = 0x10000
+	RTF_CLONED                    = 0x20000
+	RTF_CLONING                   = 0x100
+	RTF_DONE                      = 0x40
+	RTF_DYNAMIC                   = 0x10
+	RTF_FREE_IN_PROG              = 0x4000000
+	RTF_GATEWAY                   = 0x2
+	RTF_HOST                      = 0x4
+	RTF_LLINFO                    = 0x400
+	RTF_LOCAL                     = 0x200000
+	RTF_MASK                      = 0x80
+	RTF_MODIFIED                  = 0x20
+	RTF_MULTICAST                 = 0x800000
+	RTF_PERMANENT6                = 0x8000000
+	RTF_PINNED                    = 0x100000
+	RTF_PROTO1                    = 0x8000
+	RTF_PROTO2                    = 0x4000
+	RTF_PROTO3                    = 0x40000
+	RTF_REJECT                    = 0x8
+	RTF_SMALLMTU                  = 0x40000
+	RTF_STATIC                    = 0x800
+	RTF_STOPSRCH                  = 0x2000000
+	RTF_UNREACHABLE               = 0x10000000
+	RTF_UP                        = 0x1
+	RTF_XRESOLVE                  = 0x200
+	RTM_ADD                       = 0x1
+	RTM_CHANGE                    = 0x3
+	RTM_DELADDR                   = 0xd
+	RTM_DELETE                    = 0x2
+	RTM_EXPIRE                    = 0xf
+	RTM_GET                       = 0x4
+	RTM_GETNEXT                   = 0x11
+	RTM_IFINFO                    = 0xe
+	RTM_LOCK                      = 0x8
+	RTM_LOSING                    = 0x5
+	RTM_MISS                      = 0x7
+	RTM_NEWADDR                   = 0xc
+	RTM_OLDADD                    = 0x9
+	RTM_OLDDEL                    = 0xa
+	RTM_REDIRECT                  = 0x6
+	RTM_RESOLVE                   = 0xb
+	RTM_RTLOST                    = 0x10
+	RTM_RTTUNIT                   = 0xf4240
+	RTM_SAMEADDR                  = 0x12
+	RTM_SET                       = 0x13
+	RTM_VERSION                   = 0x2
+	RTM_VERSION_GR                = 0x4
+	RTM_VERSION_GR_COMPAT         = 0x3
+	RTM_VERSION_POLICY            = 0x5
+	RTM_VERSION_POLICY_EXT        = 0x6
+	RTM_VERSION_POLICY_PRFN       = 0x7
+	RTV_EXPIRE                    = 0x4
+	RTV_HOPCOUNT                  = 0x2
+	RTV_MTU                       = 0x1
+	RTV_RPIPE                     = 0x8
+	RTV_RTT                       = 0x40
+	RTV_RTTVAR                    = 0x80
+	RTV_SPIPE                     = 0x10
+	RTV_SSTHRESH                  = 0x20
+	RUSAGE_CHILDREN               = -0x1
+	RUSAGE_SELF                   = 0x0
+	RUSAGE_THREAD                 = 0x1
+	SCM_RIGHTS                    = 0x1
+	SHUT_RD                       = 0x0
+	SHUT_RDWR                     = 0x2
+	SHUT_WR                       = 0x1
+	SIGMAX64                      = 0xff
+	SIGQUEUE_MAX                  = 0x20
+	SIOCADDIFVIPA                 = 0x20006942
+	SIOCADDMTU                    = -0x7ffb9690
+	SIOCADDMULTI                  = -0x7fdf96cf
+	SIOCADDNETID                  = -0x7fd796a9
+	SIOCADDRT                     = -0x7fcf8df6
+	SIOCAIFADDR                   = -0x7fbf96e6
+	SIOCATMARK                    = 0x40047307
+	SIOCDARP                      = -0x7fb396e0
+	SIOCDELIFVIPA                 = 0x20006943
+	SIOCDELMTU                    = -0x7ffb968f
+	SIOCDELMULTI                  = -0x7fdf96ce
+	SIOCDELPMTU                   = -0x7fd78ff6
+	SIOCDELRT                     = -0x7fcf8df5
+	SIOCDIFADDR                   = -0x7fd796e7
+	SIOCDNETOPT                   = -0x3ffe9680
+	SIOCDX25XLATE                 = -0x7fd7969b
+	SIOCFIFADDR                   = -0x7fdf966d
+	SIOCGARP                      = -0x3fb396da
+	SIOCGETMTUS                   = 0x2000696f
+	SIOCGETSGCNT                  = -0x3feb8acc
+	SIOCGETVIFCNT                 = -0x3feb8acd
+	SIOCGHIWAT                    = 0x40047301
+	SIOCGIFADDR                   = -0x3fd796df
+	SIOCGIFADDRS                  = 0x2000698c
+	SIOCGIFBAUDRATE               = -0x3fd79693
+	SIOCGIFBRDADDR                = -0x3fd796dd
+	SIOCGIFCONF                   = -0x3ff796bb
+	SIOCGIFCONFGLOB               = -0x3ff79670
+	SIOCGIFDSTADDR                = -0x3fd796de
+	SIOCGIFFLAGS                  = -0x3fd796ef
+	SIOCGIFGIDLIST                = 0x20006968
+	SIOCGIFHWADDR                 = -0x3fab966b
+	SIOCGIFMETRIC                 = -0x3fd796e9
+	SIOCGIFMTU                    = -0x3fd796aa
+	SIOCGIFNETMASK                = -0x3fd796db
+	SIOCGIFOPTIONS                = -0x3fd796d6
+	SIOCGISNO                     = -0x3fd79695
+	SIOCGLOADF                    = -0x3ffb967e
+	SIOCGLOWAT                    = 0x40047303
+	SIOCGNETOPT                   = -0x3ffe96a5
+	SIOCGNETOPT1                  = -0x3fdf967f
+	SIOCGNMTUS                    = 0x2000696e
+	SIOCGPGRP                     = 0x40047309
+	SIOCGSIZIFCONF                = 0x4004696a
+	SIOCGSRCFILTER                = -0x3fe796cb
+	SIOCGTUNEPHASE                = -0x3ffb9676
+	SIOCGX25XLATE                 = -0x3fd7969c
+	SIOCIFATTACH                  = -0x7fdf9699
+	SIOCIFDETACH                  = -0x7fdf969a
+	SIOCIFGETPKEY                 = -0x7fdf969b
+	SIOCIF_ATM_DARP               = -0x7fdf9683
+	SIOCIF_ATM_DUMPARP            = -0x7fdf9685
+	SIOCIF_ATM_GARP               = -0x7fdf9682
+	SIOCIF_ATM_IDLE               = -0x7fdf9686
+	SIOCIF_ATM_SARP               = -0x7fdf9681
+	SIOCIF_ATM_SNMPARP            = -0x7fdf9687
+	SIOCIF_ATM_SVC                = -0x7fdf9684
+	SIOCIF_ATM_UBR                = -0x7fdf9688
+	SIOCIF_DEVHEALTH              = -0x7ffb966c
+	SIOCIF_IB_ARP_INCOMP          = -0x7fdf9677
+	SIOCIF_IB_ARP_TIMER           = -0x7fdf9678
+	SIOCIF_IB_CLEAR_PINFO         = -0x3fdf966f
+	SIOCIF_IB_DEL_ARP             = -0x7fdf967f
+	SIOCIF_IB_DEL_PINFO           = -0x3fdf9670
+	SIOCIF_IB_DUMP_ARP            = -0x7fdf9680
+	SIOCIF_IB_GET_ARP             = -0x7fdf967e
+	SIOCIF_IB_GET_INFO            = -0x3f879675
+	SIOCIF_IB_GET_STATS           = -0x3f879672
+	SIOCIF_IB_NOTIFY_ADDR_REM     = -0x3f87966a
+	SIOCIF_IB_RESET_STATS         = -0x3f879671
+	SIOCIF_IB_RESIZE_CQ           = -0x7fdf9679
+	SIOCIF_IB_SET_ARP             = -0x7fdf967d
+	SIOCIF_IB_SET_PKEY            = -0x7fdf967c
+	SIOCIF_IB_SET_PORT            = -0x7fdf967b
+	SIOCIF_IB_SET_QKEY            = -0x7fdf9676
+	SIOCIF_IB_SET_QSIZE           = -0x7fdf967a
+	SIOCLISTIFVIPA                = 0x20006944
+	SIOCSARP                      = -0x7fb396e2
+	SIOCSHIWAT                    = 0x80047300
+	SIOCSIFADDR                   = -0x7fd796f4
+	SIOCSIFADDRORI                = -0x7fdb9673
+	SIOCSIFBRDADDR                = -0x7fd796ed
+	SIOCSIFDSTADDR                = -0x7fd796f2
+	SIOCSIFFLAGS                  = -0x7fd796f0
+	SIOCSIFGIDLIST                = 0x20006969
+	SIOCSIFMETRIC                 = -0x7fd796e8
+	SIOCSIFMTU                    = -0x7fd796a8
+	SIOCSIFNETDUMP                = -0x7fd796e4
+	SIOCSIFNETMASK                = -0x7fd796ea
+	SIOCSIFOPTIONS                = -0x7fd796d7
+	SIOCSIFSUBCHAN                = -0x7fd796e5
+	SIOCSISNO                     = -0x7fd79694
+	SIOCSLOADF                    = -0x3ffb967d
+	SIOCSLOWAT                    = 0x80047302
+	SIOCSNETOPT                   = -0x7ffe96a6
+	SIOCSPGRP                     = 0x80047308
+	SIOCSX25XLATE                 = -0x7fd7969d
+	SOCK_CONN_DGRAM               = 0x6
+	SOCK_DGRAM                    = 0x2
+	SOCK_RAW                      = 0x3
+	SOCK_RDM                      = 0x4
+	SOCK_SEQPACKET                = 0x5
+	SOCK_STREAM                   = 0x1
+	SOL_SOCKET                    = 0xffff
+	SOMAXCONN                     = 0x400
+	SO_ACCEPTCONN                 = 0x2
+	SO_AUDIT                      = 0x8000
+	SO_BROADCAST                  = 0x20
+	SO_CKSUMRECV                  = 0x800
+	SO_DEBUG                      = 0x1
+	SO_DONTROUTE                  = 0x10
+	SO_ERROR                      = 0x1007
+	SO_KEEPALIVE                  = 0x8
+	SO_KERNACCEPT                 = 0x2000
+	SO_LINGER                     = 0x80
+	SO_NOMULTIPATH                = 0x4000
+	SO_NOREUSEADDR                = 0x1000
+	SO_OOBINLINE                  = 0x100
+	SO_PEERID                     = 0x1009
+	SO_RCVBUF                     = 0x1002
+	SO_RCVLOWAT                   = 0x1004
+	SO_RCVTIMEO                   = 0x1006
+	SO_REUSEADDR                  = 0x4
+	SO_REUSEPORT                  = 0x200
+	SO_SNDBUF                     = 0x1001
+	SO_SNDLOWAT                   = 0x1003
+	SO_SNDTIMEO                   = 0x1005
+	SO_TIMESTAMPNS                = 0x100a
+	SO_TYPE                       = 0x1008
+	SO_USELOOPBACK                = 0x40
+	SO_USE_IFBUFS                 = 0x400
+	S_BANDURG                     = 0x400
+	S_EMODFMT                     = 0x3c000000
+	S_ENFMT                       = 0x400
+	S_ERROR                       = 0x100
+	S_HANGUP                      = 0x200
+	S_HIPRI                       = 0x2
+	S_ICRYPTO                     = 0x80000
+	S_IEXEC                       = 0x40
+	S_IFBLK                       = 0x6000
+	S_IFCHR                       = 0x2000
+	S_IFDIR                       = 0x4000
+	S_IFIFO                       = 0x1000
+	S_IFJOURNAL                   = 0x10000
+	S_IFLNK                       = 0xa000
+	S_IFMPX                       = 0x2200
+	S_IFMT                        = 0xf000
+	S_IFPDIR                      = 0x4000000
+	S_IFPSDIR                     = 0x8000000
+	S_IFPSSDIR                    = 0xc000000
+	S_IFREG                       = 0x8000
+	S_IFSOCK                      = 0xc000
+	S_IFSYSEA                     = 0x30000000
+	S_INPUT                       = 0x1
+	S_IREAD                       = 0x100
+	S_IRGRP                       = 0x20
+	S_IROTH                       = 0x4
+	S_IRUSR                       = 0x100
+	S_IRWXG                       = 0x38
+	S_IRWXO                       = 0x7
+	S_IRWXU                       = 0x1c0
+	S_ISGID                       = 0x400
+	S_ISUID                       = 0x800
+	S_ISVTX                       = 0x200
+	S_ITCB                        = 0x1000000
+	S_ITP                         = 0x800000
+	S_IWGRP                       = 0x10
+	S_IWOTH                       = 0x2
+	S_IWRITE                      = 0x80
+	S_IWUSR                       = 0x80
+	S_IXACL                       = 0x2000000
+	S_IXATTR                      = 0x40000
+	S_IXGRP                       = 0x8
+	S_IXINTERFACE                 = 0x100000
+	S_IXMOD                       = 0x40000000
+	S_IXOTH                       = 0x1
+	S_IXUSR                       = 0x40
+	S_MSG                         = 0x8
+	S_OUTPUT                      = 0x4
+	S_RDBAND                      = 0x20
+	S_RDNORM                      = 0x10
+	S_RESERVED1                   = 0x20000
+	S_RESERVED2                   = 0x200000
+	S_RESERVED3                   = 0x400000
+	S_RESERVED4                   = 0x80000000
+	S_RESFMT1                     = 0x10000000
+	S_RESFMT10                    = 0x34000000
+	S_RESFMT11                    = 0x38000000
+	S_RESFMT12                    = 0x3c000000
+	S_RESFMT2                     = 0x14000000
+	S_RESFMT3                     = 0x18000000
+	S_RESFMT4                     = 0x1c000000
+	S_RESFMT5                     = 0x20000000
+	S_RESFMT6                     = 0x24000000
+	S_RESFMT7                     = 0x28000000
+	S_RESFMT8                     = 0x2c000000
+	S_WRBAND                      = 0x80
+	S_WRNORM                      = 0x40
+	TAB0                          = 0x0
+	TAB1                          = 0x400
+	TAB2                          = 0x800
+	TAB3                          = 0xc00
+	TABDLY                        = 0xc00
+	TCIFLUSH                      = 0x0
+	TCIOFF                        = 0x2
+	TCIOFLUSH                     = 0x2
+	TCION                         = 0x3
+	TCOFLUSH                      = 0x1
+	TCOOFF                        = 0x0
+	TCOON                         = 0x1
+	TCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800
+	TCP_ACLADD                    = 0x23
+	TCP_ACLBIND                   = 0x26
+	TCP_ACLCLEAR                  = 0x22
+	TCP_ACLDEL                    = 0x24
+	TCP_ACLDENY                   = 0x8
+	TCP_ACLFLUSH                  = 0x21
+	TCP_ACLGID                    = 0x1
+	TCP_ACLLS                     = 0x25
+	TCP_ACLSUBNET                 = 0x4
+	TCP_ACLUID                    = 0x2
+	TCP_CWND_DF                   = 0x16
+	TCP_CWND_IF                   = 0x15
+	TCP_DELAY_ACK_FIN             = 0x2
+	TCP_DELAY_ACK_SYN             = 0x1
+	TCP_FASTNAME                  = 0x101080a
+	TCP_KEEPCNT                   = 0x13
+	TCP_KEEPIDLE                  = 0x11
+	TCP_KEEPINTVL                 = 0x12
+	TCP_LSPRIV                    = 0x29
+	TCP_LUID                      = 0x20
+	TCP_MAXBURST                  = 0x8
+	TCP_MAXDF                     = 0x64
+	TCP_MAXIF                     = 0x64
+	TCP_MAXSEG                    = 0x2
+	TCP_MAXWIN                    = 0xffff
+	TCP_MAXWINDOWSCALE            = 0xe
+	TCP_MAX_SACK                  = 0x4
+	TCP_MSS                       = 0x5b4
+	TCP_NODELAY                   = 0x1
+	TCP_NODELAYACK                = 0x14
+	TCP_NOREDUCE_CWND_EXIT_FRXMT  = 0x19
+	TCP_NOREDUCE_CWND_IN_FRXMT    = 0x18
+	TCP_NOTENTER_SSTART           = 0x17
+	TCP_OPT                       = 0x19
+	TCP_RFC1323                   = 0x4
+	TCP_SETPRIV                   = 0x27
+	TCP_STDURG                    = 0x10
+	TCP_TIMESTAMP_OPTLEN          = 0xc
+	TCP_UNSETPRIV                 = 0x28
+	TCSAFLUSH                     = 0x2
+	TIOCCBRK                      = 0x2000747a
+	TIOCCDTR                      = 0x20007478
+	TIOCCONS                      = 0x80047462
+	TIOCEXCL                      = 0x2000740d
+	TIOCFLUSH                     = 0x80047410
+	TIOCGETC                      = 0x40067412
+	TIOCGETD                      = 0x40047400
+	TIOCGETP                      = 0x40067408
+	TIOCGLTC                      = 0x40067474
+	TIOCGPGRP                     = 0x40047477
+	TIOCGSID                      = 0x40047448
+	TIOCGSIZE                     = 0x40087468
+	TIOCGWINSZ                    = 0x40087468
+	TIOCHPCL                      = 0x20007402
+	TIOCLBIC                      = 0x8004747e
+	TIOCLBIS                      = 0x8004747f
+	TIOCLGET                      = 0x4004747c
+	TIOCLSET                      = 0x8004747d
+	TIOCMBIC                      = 0x8004746b
+	TIOCMBIS                      = 0x8004746c
+	TIOCMGET                      = 0x4004746a
+	TIOCMIWAIT                    = 0x80047464
+	TIOCMODG                      = 0x40047403
+	TIOCMODS                      = 0x80047404
+	TIOCMSET                      = 0x8004746d
+	TIOCM_CAR                     = 0x40
+	TIOCM_CD                      = 0x40
+	TIOCM_CTS                     = 0x20
+	TIOCM_DSR                     = 0x100
+	TIOCM_DTR                     = 0x2
+	TIOCM_LE                      = 0x1
+	TIOCM_RI                      = 0x80
+	TIOCM_RNG                     = 0x80
+	TIOCM_RTS                     = 0x4
+	TIOCM_SR                      = 0x10
+	TIOCM_ST                      = 0x8
+	TIOCNOTTY                     = 0x20007471
+	TIOCNXCL                      = 0x2000740e
+	TIOCOUTQ                      = 0x40047473
+	TIOCPKT                       = 0x80047470
+	TIOCPKT_DATA                  = 0x0
+	TIOCPKT_DOSTOP                = 0x20
+	TIOCPKT_FLUSHREAD             = 0x1
+	TIOCPKT_FLUSHWRITE            = 0x2
+	TIOCPKT_NOSTOP                = 0x10
+	TIOCPKT_START                 = 0x8
+	TIOCPKT_STOP                  = 0x4
+	TIOCREMOTE                    = 0x80047469
+	TIOCSBRK                      = 0x2000747b
+	TIOCSDTR                      = 0x20007479
+	TIOCSETC                      = 0x80067411
+	TIOCSETD                      = 0x80047401
+	TIOCSETN                      = 0x8006740a
+	TIOCSETP                      = 0x80067409
+	TIOCSLTC                      = 0x80067475
+	TIOCSPGRP                     = 0x80047476
+	TIOCSSIZE                     = 0x80087467
+	TIOCSTART                     = 0x2000746e
+	TIOCSTI                       = 0x80017472
+	TIOCSTOP                      = 0x2000746f
+	TIOCSWINSZ                    = 0x80087467
+	TIOCUCNTL                     = 0x80047466
+	TOSTOP                        = 0x10000
+	UTIME_NOW                     = -0x2
+	UTIME_OMIT                    = -0x3
+	VDISCRD                       = 0xc
+	VDSUSP                        = 0xa
+	VEOF                          = 0x4
+	VEOL                          = 0x5
+	VEOL2                         = 0x6
+	VERASE                        = 0x2
+	VINTR                         = 0x0
+	VKILL                         = 0x3
+	VLNEXT                        = 0xe
+	VMIN                          = 0x4
+	VQUIT                         = 0x1
+	VREPRINT                      = 0xb
+	VSTART                        = 0x7
+	VSTOP                         = 0x8
+	VSTRT                         = 0x7
+	VSUSP                         = 0x9
+	VT0                           = 0x0
+	VT1                           = 0x8000
+	VTDELAY                       = 0x2000
+	VTDLY                         = 0x8000
+	VTIME                         = 0x5
+	VWERSE                        = 0xd
+	WPARSTART                     = 0x1
+	WPARSTOP                      = 0x2
+	WPARTTYNAME                   = "Global"
+	XCASE                         = 0x4
+	XTABS                         = 0xc00
+	_FDATAFLUSH                   = 0x2000000000
+)
+
+// Errors
+const (
+	E2BIG           = syscall.Errno(0x7)
+	EACCES          = syscall.Errno(0xd)
+	EADDRINUSE      = syscall.Errno(0x43)
+	EADDRNOTAVAIL   = syscall.Errno(0x44)
+	EAFNOSUPPORT    = syscall.Errno(0x42)
+	EAGAIN          = syscall.Errno(0xb)
+	EALREADY        = syscall.Errno(0x38)
+	EBADF           = syscall.Errno(0x9)
+	EBADMSG         = syscall.Errno(0x78)
+	EBUSY           = syscall.Errno(0x10)
+	ECANCELED       = syscall.Errno(0x75)
+	ECHILD          = syscall.Errno(0xa)
+	ECHRNG          = syscall.Errno(0x25)
+	ECLONEME        = syscall.Errno(0x52)
+	ECONNABORTED    = syscall.Errno(0x48)
+	ECONNREFUSED    = syscall.Errno(0x4f)
+	ECONNRESET      = syscall.Errno(0x49)
+	ECORRUPT        = syscall.Errno(0x59)
+	EDEADLK         = syscall.Errno(0x2d)
+	EDESTADDREQ     = syscall.Errno(0x3a)
+	EDESTADDRREQ    = syscall.Errno(0x3a)
+	EDIST           = syscall.Errno(0x35)
+	EDOM            = syscall.Errno(0x21)
+	EDQUOT          = syscall.Errno(0x58)
+	EEXIST          = syscall.Errno(0x11)
+	EFAULT          = syscall.Errno(0xe)
+	EFBIG           = syscall.Errno(0x1b)
+	EFORMAT         = syscall.Errno(0x30)
+	EHOSTDOWN       = syscall.Errno(0x50)
+	EHOSTUNREACH    = syscall.Errno(0x51)
+	EIDRM           = syscall.Errno(0x24)
+	EILSEQ          = syscall.Errno(0x74)
+	EINPROGRESS     = syscall.Errno(0x37)
+	EINTR           = syscall.Errno(0x4)
+	EINVAL          = syscall.Errno(0x16)
+	EIO             = syscall.Errno(0x5)
+	EISCONN         = syscall.Errno(0x4b)
+	EISDIR          = syscall.Errno(0x15)
+	EL2HLT          = syscall.Errno(0x2c)
+	EL2NSYNC        = syscall.Errno(0x26)
+	EL3HLT          = syscall.Errno(0x27)
+	EL3RST          = syscall.Errno(0x28)
+	ELNRNG          = syscall.Errno(0x29)
+	ELOOP           = syscall.Errno(0x55)
+	EMEDIA          = syscall.Errno(0x6e)
+	EMFILE          = syscall.Errno(0x18)
+	EMLINK          = syscall.Errno(0x1f)
+	EMSGSIZE        = syscall.Errno(0x3b)
+	EMULTIHOP       = syscall.Errno(0x7d)
+	ENAMETOOLONG    = syscall.Errno(0x56)
+	ENETDOWN        = syscall.Errno(0x45)
+	ENETRESET       = syscall.Errno(0x47)
+	ENETUNREACH     = syscall.Errno(0x46)
+	ENFILE          = syscall.Errno(0x17)
+	ENOATTR         = syscall.Errno(0x70)
+	ENOBUFS         = syscall.Errno(0x4a)
+	ENOCONNECT      = syscall.Errno(0x32)
+	ENOCSI          = syscall.Errno(0x2b)
+	ENODATA         = syscall.Errno(0x7a)
+	ENODEV          = syscall.Errno(0x13)
+	ENOENT          = syscall.Errno(0x2)
+	ENOEXEC         = syscall.Errno(0x8)
+	ENOLCK          = syscall.Errno(0x31)
+	ENOLINK         = syscall.Errno(0x7e)
+	ENOMEM          = syscall.Errno(0xc)
+	ENOMSG          = syscall.Errno(0x23)
+	ENOPROTOOPT     = syscall.Errno(0x3d)
+	ENOSPC          = syscall.Errno(0x1c)
+	ENOSR           = syscall.Errno(0x76)
+	ENOSTR          = syscall.Errno(0x7b)
+	ENOSYS          = syscall.Errno(0x6d)
+	ENOTBLK         = syscall.Errno(0xf)
+	ENOTCONN        = syscall.Errno(0x4c)
+	ENOTDIR         = syscall.Errno(0x14)
+	ENOTEMPTY       = syscall.Errno(0x11)
+	ENOTREADY       = syscall.Errno(0x2e)
+	ENOTRECOVERABLE = syscall.Errno(0x5e)
+	ENOTRUST        = syscall.Errno(0x72)
+	ENOTSOCK        = syscall.Errno(0x39)
+	ENOTSUP         = syscall.Errno(0x7c)
+	ENOTTY          = syscall.Errno(0x19)
+	ENXIO           = syscall.Errno(0x6)
+	EOPNOTSUPP      = syscall.Errno(0x40)
+	EOVERFLOW       = syscall.Errno(0x7f)
+	EOWNERDEAD      = syscall.Errno(0x5f)
+	EPERM           = syscall.Errno(0x1)
+	EPFNOSUPPORT    = syscall.Errno(0x41)
+	EPIPE           = syscall.Errno(0x20)
+	EPROCLIM        = syscall.Errno(0x53)
+	EPROTO          = syscall.Errno(0x79)
+	EPROTONOSUPPORT = syscall.Errno(0x3e)
+	EPROTOTYPE      = syscall.Errno(0x3c)
+	ERANGE          = syscall.Errno(0x22)
+	EREMOTE         = syscall.Errno(0x5d)
+	ERESTART        = syscall.Errno(0x52)
+	EROFS           = syscall.Errno(0x1e)
+	ESAD            = syscall.Errno(0x71)
+	ESHUTDOWN       = syscall.Errno(0x4d)
+	ESOCKTNOSUPPORT = syscall.Errno(0x3f)
+	ESOFT           = syscall.Errno(0x6f)
+	ESPIPE          = syscall.Errno(0x1d)
+	ESRCH           = syscall.Errno(0x3)
+	ESTALE          = syscall.Errno(0x34)
+	ESYSERROR       = syscall.Errno(0x5a)
+	ETIME           = syscall.Errno(0x77)
+	ETIMEDOUT       = syscall.Errno(0x4e)
+	ETOOMANYREFS    = syscall.Errno(0x73)
+	ETXTBSY         = syscall.Errno(0x1a)
+	EUNATCH         = syscall.Errno(0x2a)
+	EUSERS          = syscall.Errno(0x54)
+	EWOULDBLOCK     = syscall.Errno(0xb)
+	EWRPROTECT      = syscall.Errno(0x2f)
+	EXDEV           = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+	SIGABRT     = syscall.Signal(0x6)
+	SIGAIO      = syscall.Signal(0x17)
+	SIGALRM     = syscall.Signal(0xe)
+	SIGALRM1    = syscall.Signal(0x26)
+	SIGBUS      = syscall.Signal(0xa)
+	SIGCAPI     = syscall.Signal(0x31)
+	SIGCHLD     = syscall.Signal(0x14)
+	SIGCLD      = syscall.Signal(0x14)
+	SIGCONT     = syscall.Signal(0x13)
+	SIGCPUFAIL  = syscall.Signal(0x3b)
+	SIGDANGER   = syscall.Signal(0x21)
+	SIGEMT      = syscall.Signal(0x7)
+	SIGFPE      = syscall.Signal(0x8)
+	SIGGRANT    = syscall.Signal(0x3c)
+	SIGHUP      = syscall.Signal(0x1)
+	SIGILL      = syscall.Signal(0x4)
+	SIGINT      = syscall.Signal(0x2)
+	SIGIO       = syscall.Signal(0x17)
+	SIGIOINT    = syscall.Signal(0x10)
+	SIGIOT      = syscall.Signal(0x6)
+	SIGKAP      = syscall.Signal(0x3c)
+	SIGKILL     = syscall.Signal(0x9)
+	SIGLOST     = syscall.Signal(0x6)
+	SIGMAX      = syscall.Signal(0x3f)
+	SIGMAX32    = syscall.Signal(0x3f)
+	SIGMIGRATE  = syscall.Signal(0x23)
+	SIGMSG      = syscall.Signal(0x1b)
+	SIGPIPE     = syscall.Signal(0xd)
+	SIGPOLL     = syscall.Signal(0x17)
+	SIGPRE      = syscall.Signal(0x24)
+	SIGPROF     = syscall.Signal(0x20)
+	SIGPTY      = syscall.Signal(0x17)
+	SIGPWR      = syscall.Signal(0x1d)
+	SIGQUIT     = syscall.Signal(0x3)
+	SIGRECONFIG = syscall.Signal(0x3a)
+	SIGRETRACT  = syscall.Signal(0x3d)
+	SIGSAK      = syscall.Signal(0x3f)
+	SIGSEGV     = syscall.Signal(0xb)
+	SIGSOUND    = syscall.Signal(0x3e)
+	SIGSTOP     = syscall.Signal(0x11)
+	SIGSYS      = syscall.Signal(0xc)
+	SIGSYSERROR = syscall.Signal(0x30)
+	SIGTALRM    = syscall.Signal(0x26)
+	SIGTERM     = syscall.Signal(0xf)
+	SIGTRAP     = syscall.Signal(0x5)
+	SIGTSTP     = syscall.Signal(0x12)
+	SIGTTIN     = syscall.Signal(0x15)
+	SIGTTOU     = syscall.Signal(0x16)
+	SIGURG      = syscall.Signal(0x10)
+	SIGUSR1     = syscall.Signal(0x1e)
+	SIGUSR2     = syscall.Signal(0x1f)
+	SIGVIRT     = syscall.Signal(0x25)
+	SIGVTALRM   = syscall.Signal(0x22)
+	SIGWAITING  = syscall.Signal(0x27)
+	SIGWINCH    = syscall.Signal(0x1c)
+	SIGXCPU     = syscall.Signal(0x18)
+	SIGXFSZ     = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+	num  syscall.Errno
+	name string
+	desc string
+}{
+	{1, "EPERM", "not owner"},
+	{2, "ENOENT", "no such file or directory"},
+	{3, "ESRCH", "no such process"},
+	{4, "EINTR", "interrupted system call"},
+	{5, "EIO", "I/O error"},
+	{6, "ENXIO", "no such device or address"},
+	{7, "E2BIG", "arg list too long"},
+	{8, "ENOEXEC", "exec format error"},
+	{9, "EBADF", "bad file number"},
+	{10, "ECHILD", "no child processes"},
+	{11, "EWOULDBLOCK", "resource temporarily unavailable"},
+	{12, "ENOMEM", "not enough space"},
+	{13, "EACCES", "permission denied"},
+	{14, "EFAULT", "bad address"},
+	{15, "ENOTBLK", "block device required"},
+	{16, "EBUSY", "device busy"},
+	{17, "ENOTEMPTY", "file exists"},
+	{18, "EXDEV", "cross-device link"},
+	{19, "ENODEV", "no such device"},
+	{20, "ENOTDIR", "not a directory"},
+	{21, "EISDIR", "is a directory"},
+	{22, "EINVAL", "invalid argument"},
+	{23, "ENFILE", "file table overflow"},
+	{24, "EMFILE", "too many open files"},
+	{25, "ENOTTY", "not a typewriter"},
+	{26, "ETXTBSY", "text file busy"},
+	{27, "EFBIG", "file too large"},
+	{28, "ENOSPC", "no space left on device"},
+	{29, "ESPIPE", "illegal seek"},
+	{30, "EROFS", "read-only file system"},
+	{31, "EMLINK", "too many links"},
+	{32, "EPIPE", "broken pipe"},
+	{33, "EDOM", "argument out of domain"},
+	{34, "ERANGE", "result too large"},
+	{35, "ENOMSG", "no message of desired type"},
+	{36, "EIDRM", "identifier removed"},
+	{37, "ECHRNG", "channel number out of range"},
+	{38, "EL2NSYNC", "level 2 not synchronized"},
+	{39, "EL3HLT", "level 3 halted"},
+	{40, "EL3RST", "level 3 reset"},
+	{41, "ELNRNG", "link number out of range"},
+	{42, "EUNATCH", "protocol driver not attached"},
+	{43, "ENOCSI", "no CSI structure available"},
+	{44, "EL2HLT", "level 2 halted"},
+	{45, "EDEADLK", "deadlock condition if locked"},
+	{46, "ENOTREADY", "device not ready"},
+	{47, "EWRPROTECT", "write-protected media"},
+	{48, "EFORMAT", "unformatted or incompatible media"},
+	{49, "ENOLCK", "no locks available"},
+	{50, "ENOCONNECT", "cannot Establish Connection"},
+	{52, "ESTALE", "missing file or filesystem"},
+	{53, "EDIST", "requests blocked by Administrator"},
+	{55, "EINPROGRESS", "operation now in progress"},
+	{56, "EALREADY", "operation already in progress"},
+	{57, "ENOTSOCK", "socket operation on non-socket"},
+	{58, "EDESTADDREQ", "destination address required"},
+	{59, "EMSGSIZE", "message too long"},
+	{60, "EPROTOTYPE", "protocol wrong type for socket"},
+	{61, "ENOPROTOOPT", "protocol not available"},
+	{62, "EPROTONOSUPPORT", "protocol not supported"},
+	{63, "ESOCKTNOSUPPORT", "socket type not supported"},
+	{64, "EOPNOTSUPP", "operation not supported on socket"},
+	{65, "EPFNOSUPPORT", "protocol family not supported"},
+	{66, "EAFNOSUPPORT", "addr family not supported by protocol"},
+	{67, "EADDRINUSE", "address already in use"},
+	{68, "EADDRNOTAVAIL", "can't assign requested address"},
+	{69, "ENETDOWN", "network is down"},
+	{70, "ENETUNREACH", "network is unreachable"},
+	{71, "ENETRESET", "network dropped connection on reset"},
+	{72, "ECONNABORTED", "software caused connection abort"},
+	{73, "ECONNRESET", "connection reset by peer"},
+	{74, "ENOBUFS", "no buffer space available"},
+	{75, "EISCONN", "socket is already connected"},
+	{76, "ENOTCONN", "socket is not connected"},
+	{77, "ESHUTDOWN", "can't send after socket shutdown"},
+	{78, "ETIMEDOUT", "connection timed out"},
+	{79, "ECONNREFUSED", "connection refused"},
+	{80, "EHOSTDOWN", "host is down"},
+	{81, "EHOSTUNREACH", "no route to host"},
+	{82, "ERESTART", "restart the system call"},
+	{83, "EPROCLIM", "too many processes"},
+	{84, "EUSERS", "too many users"},
+	{85, "ELOOP", "too many levels of symbolic links"},
+	{86, "ENAMETOOLONG", "file name too long"},
+	{88, "EDQUOT", "disk quota exceeded"},
+	{89, "ECORRUPT", "invalid file system control data detected"},
+	{90, "ESYSERROR", "for future use "},
+	{93, "EREMOTE", "item is not local to host"},
+	{94, "ENOTRECOVERABLE", "state not recoverable "},
+	{95, "EOWNERDEAD", "previous owner died "},
+	{109, "ENOSYS", "function not implemented"},
+	{110, "EMEDIA", "media surface error"},
+	{111, "ESOFT", "I/O completed, but needs relocation"},
+	{112, "ENOATTR", "no attribute found"},
+	{113, "ESAD", "security Authentication Denied"},
+	{114, "ENOTRUST", "not a Trusted Program"},
+	{115, "ETOOMANYREFS", "too many references: can't splice"},
+	{116, "EILSEQ", "invalid wide character"},
+	{117, "ECANCELED", "asynchronous I/O cancelled"},
+	{118, "ENOSR", "out of STREAMS resources"},
+	{119, "ETIME", "system call timed out"},
+	{120, "EBADMSG", "next message has wrong type"},
+	{121, "EPROTO", "error in protocol"},
+	{122, "ENODATA", "no message on stream head read q"},
+	{123, "ENOSTR", "fd not associated with a stream"},
+	{124, "ENOTSUP", "unsupported attribute value"},
+	{125, "EMULTIHOP", "multihop is not allowed"},
+	{126, "ENOLINK", "the server link has been severed"},
+	{127, "EOVERFLOW", "value too large to be stored in data type"},
+}
+
+// Signal table
+var signalList = [...]struct {
+	num  syscall.Signal
+	name string
+	desc string
+}{
+	{1, "SIGHUP", "hangup"},
+	{2, "SIGINT", "interrupt"},
+	{3, "SIGQUIT", "quit"},
+	{4, "SIGILL", "illegal instruction"},
+	{5, "SIGTRAP", "trace/BPT trap"},
+	{6, "SIGIOT", "IOT/Abort trap"},
+	{7, "SIGEMT", "EMT trap"},
+	{8, "SIGFPE", "floating point exception"},
+	{9, "SIGKILL", "killed"},
+	{10, "SIGBUS", "bus error"},
+	{11, "SIGSEGV", "segmentation fault"},
+	{12, "SIGSYS", "bad system call"},
+	{13, "SIGPIPE", "broken pipe"},
+	{14, "SIGALRM", "alarm clock"},
+	{15, "SIGTERM", "terminated"},
+	{16, "SIGURG", "urgent I/O condition"},
+	{17, "SIGSTOP", "stopped (signal)"},
+	{18, "SIGTSTP", "stopped"},
+	{19, "SIGCONT", "continued"},
+	{20, "SIGCHLD", "child exited"},
+	{21, "SIGTTIN", "stopped (tty input)"},
+	{22, "SIGTTOU", "stopped (tty output)"},
+	{23, "SIGIO", "I/O possible/complete"},
+	{24, "SIGXCPU", "cputime limit exceeded"},
+	{25, "SIGXFSZ", "filesize limit exceeded"},
+	{27, "SIGMSG", "input device data"},
+	{28, "SIGWINCH", "window size changes"},
+	{29, "SIGPWR", "power-failure"},
+	{30, "SIGUSR1", "user defined signal 1"},
+	{31, "SIGUSR2", "user defined signal 2"},
+	{32, "SIGPROF", "profiling timer expired"},
+	{33, "SIGDANGER", "paging space low"},
+	{34, "SIGVTALRM", "virtual timer expired"},
+	{35, "SIGMIGRATE", "signal 35"},
+	{36, "SIGPRE", "signal 36"},
+	{37, "SIGVIRT", "signal 37"},
+	{38, "SIGTALRM", "signal 38"},
+	{39, "SIGWAITING", "signal 39"},
+	{48, "SIGSYSERROR", "signal 48"},
+	{49, "SIGCAPI", "signal 49"},
+	{58, "SIGRECONFIG", "signal 58"},
+	{59, "SIGCPUFAIL", "CPU Failure Predicted"},
+	{60, "SIGKAP", "monitor mode granted"},
+	{61, "SIGRETRACT", "monitor mode retracted"},
+	{62, "SIGSOUND", "sound completed"},
+	{63, "SIGSAK", "secure attention"},
+}

+ 1361 - 0
vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go

@@ -0,0 +1,1361 @@
+// mkerrors.sh -maix64
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+// +build ppc64,aix
+
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs -- -maix64 _const.go
+
+package unix
+
+import "syscall"
+
+const (
+	AF_APPLETALK                  = 0x10
+	AF_BYPASS                     = 0x19
+	AF_CCITT                      = 0xa
+	AF_CHAOS                      = 0x5
+	AF_DATAKIT                    = 0x9
+	AF_DECnet                     = 0xc
+	AF_DLI                        = 0xd
+	AF_ECMA                       = 0x8
+	AF_HYLINK                     = 0xf
+	AF_IMPLINK                    = 0x3
+	AF_INET                       = 0x2
+	AF_INET6                      = 0x18
+	AF_INTF                       = 0x14
+	AF_ISO                        = 0x7
+	AF_LAT                        = 0xe
+	AF_LINK                       = 0x12
+	AF_LOCAL                      = 0x1
+	AF_MAX                        = 0x1e
+	AF_NDD                        = 0x17
+	AF_NETWARE                    = 0x16
+	AF_NS                         = 0x6
+	AF_OSI                        = 0x7
+	AF_PUP                        = 0x4
+	AF_RIF                        = 0x15
+	AF_ROUTE                      = 0x11
+	AF_SNA                        = 0xb
+	AF_UNIX                       = 0x1
+	AF_UNSPEC                     = 0x0
+	ALTWERASE                     = 0x400000
+	ARPHRD_802_3                  = 0x6
+	ARPHRD_802_5                  = 0x6
+	ARPHRD_ETHER                  = 0x1
+	ARPHRD_FDDI                   = 0x1
+	B0                            = 0x0
+	B110                          = 0x3
+	B1200                         = 0x9
+	B134                          = 0x4
+	B150                          = 0x5
+	B1800                         = 0xa
+	B19200                        = 0xe
+	B200                          = 0x6
+	B2400                         = 0xb
+	B300                          = 0x7
+	B38400                        = 0xf
+	B4800                         = 0xc
+	B50                           = 0x1
+	B600                          = 0x8
+	B75                           = 0x2
+	B9600                         = 0xd
+	BRKINT                        = 0x2
+	BS0                           = 0x0
+	BS1                           = 0x1000
+	BSDLY                         = 0x1000
+	CAP_AACCT                     = 0x6
+	CAP_ARM_APPLICATION           = 0x5
+	CAP_BYPASS_RAC_VMM            = 0x3
+	CAP_CLEAR                     = 0x0
+	CAP_CREDENTIALS               = 0x7
+	CAP_EFFECTIVE                 = 0x1
+	CAP_EWLM_AGENT                = 0x4
+	CAP_INHERITABLE               = 0x2
+	CAP_MAXIMUM                   = 0x7
+	CAP_NUMA_ATTACH               = 0x2
+	CAP_PERMITTED                 = 0x3
+	CAP_PROPAGATE                 = 0x1
+	CAP_PROPOGATE                 = 0x1
+	CAP_SET                       = 0x1
+	CBAUD                         = 0xf
+	CFLUSH                        = 0xf
+	CIBAUD                        = 0xf0000
+	CLOCAL                        = 0x800
+	CLOCK_MONOTONIC               = 0xa
+	CLOCK_PROCESS_CPUTIME_ID      = 0xb
+	CLOCK_REALTIME                = 0x9
+	CLOCK_THREAD_CPUTIME_ID       = 0xc
+	CR0                           = 0x0
+	CR1                           = 0x100
+	CR2                           = 0x200
+	CR3                           = 0x300
+	CRDLY                         = 0x300
+	CREAD                         = 0x80
+	CS5                           = 0x0
+	CS6                           = 0x10
+	CS7                           = 0x20
+	CS8                           = 0x30
+	CSIOCGIFCONF                  = -0x3fef96dc
+	CSIZE                         = 0x30
+	CSMAP_DIR                     = "/usr/lib/nls/csmap/"
+	CSTART                        = '\021'
+	CSTOP                         = '\023'
+	CSTOPB                        = 0x40
+	CSUSP                         = 0x1a
+	ECHO                          = 0x8
+	ECHOCTL                       = 0x20000
+	ECHOE                         = 0x10
+	ECHOK                         = 0x20
+	ECHOKE                        = 0x80000
+	ECHONL                        = 0x40
+	ECHOPRT                       = 0x40000
+	ECH_ICMPID                    = 0x2
+	ETHERNET_CSMACD               = 0x6
+	EVENP                         = 0x80
+	EXCONTINUE                    = 0x0
+	EXDLOK                        = 0x3
+	EXIO                          = 0x2
+	EXPGIO                        = 0x0
+	EXRESUME                      = 0x2
+	EXRETURN                      = 0x1
+	EXSIG                         = 0x4
+	EXTA                          = 0xe
+	EXTB                          = 0xf
+	EXTRAP                        = 0x1
+	EYEC_RTENTRYA                 = 0x257274656e747241
+	EYEC_RTENTRYF                 = 0x257274656e747246
+	E_ACC                         = 0x0
+	FD_CLOEXEC                    = 0x1
+	FD_SETSIZE                    = 0xfffe
+	FF0                           = 0x0
+	FF1                           = 0x2000
+	FFDLY                         = 0x2000
+	FLUSHBAND                     = 0x40
+	FLUSHLOW                      = 0x8
+	FLUSHO                        = 0x100000
+	FLUSHR                        = 0x1
+	FLUSHRW                       = 0x3
+	FLUSHW                        = 0x2
+	F_CLOSEM                      = 0xa
+	F_DUP2FD                      = 0xe
+	F_DUPFD                       = 0x0
+	F_GETFD                       = 0x1
+	F_GETFL                       = 0x3
+	F_GETLK                       = 0xb
+	F_GETLK64                     = 0xb
+	F_GETOWN                      = 0x8
+	F_LOCK                        = 0x1
+	F_OK                          = 0x0
+	F_RDLCK                       = 0x1
+	F_SETFD                       = 0x2
+	F_SETFL                       = 0x4
+	F_SETLK                       = 0xc
+	F_SETLK64                     = 0xc
+	F_SETLKW                      = 0xd
+	F_SETLKW64                    = 0xd
+	F_SETOWN                      = 0x9
+	F_TEST                        = 0x3
+	F_TLOCK                       = 0x2
+	F_TSTLK                       = 0xf
+	F_ULOCK                       = 0x0
+	F_UNLCK                       = 0x3
+	F_WRLCK                       = 0x2
+	HUPCL                         = 0x400
+	IBSHIFT                       = 0x10
+	ICANON                        = 0x2
+	ICMP6_FILTER                  = 0x26
+	ICMP6_SEC_SEND_DEL            = 0x46
+	ICMP6_SEC_SEND_GET            = 0x47
+	ICMP6_SEC_SEND_SET            = 0x44
+	ICMP6_SEC_SEND_SET_CGA_ADDR   = 0x45
+	ICRNL                         = 0x100
+	IEXTEN                        = 0x200000
+	IFA_FIRSTALIAS                = 0x2000
+	IFA_ROUTE                     = 0x1
+	IFF_64BIT                     = 0x4000000
+	IFF_ALLCAST                   = 0x20000
+	IFF_ALLMULTI                  = 0x200
+	IFF_BPF                       = 0x8000000
+	IFF_BRIDGE                    = 0x40000
+	IFF_BROADCAST                 = 0x2
+	IFF_CANTCHANGE                = 0x80c52
+	IFF_CHECKSUM_OFFLOAD          = 0x10000000
+	IFF_D1                        = 0x8000
+	IFF_D2                        = 0x4000
+	IFF_D3                        = 0x2000
+	IFF_D4                        = 0x1000
+	IFF_DEBUG                     = 0x4
+	IFF_DEVHEALTH                 = 0x4000
+	IFF_DO_HW_LOOPBACK            = 0x10000
+	IFF_GROUP_ROUTING             = 0x2000000
+	IFF_IFBUFMGT                  = 0x800000
+	IFF_LINK0                     = 0x100000
+	IFF_LINK1                     = 0x200000
+	IFF_LINK2                     = 0x400000
+	IFF_LOOPBACK                  = 0x8
+	IFF_MULTICAST                 = 0x80000
+	IFF_NOARP                     = 0x80
+	IFF_NOECHO                    = 0x800
+	IFF_NOTRAILERS                = 0x20
+	IFF_OACTIVE                   = 0x400
+	IFF_POINTOPOINT               = 0x10
+	IFF_PROMISC                   = 0x100
+	IFF_PSEG                      = 0x40000000
+	IFF_RUNNING                   = 0x40
+	IFF_SIMPLEX                   = 0x800
+	IFF_SNAP                      = 0x8000
+	IFF_TCP_DISABLE_CKSUM         = 0x20000000
+	IFF_TCP_NOCKSUM               = 0x1000000
+	IFF_UP                        = 0x1
+	IFF_VIPA                      = 0x80000000
+	IFNAMSIZ                      = 0x10
+	IFO_FLUSH                     = 0x1
+	IFT_1822                      = 0x2
+	IFT_AAL5                      = 0x31
+	IFT_ARCNET                    = 0x23
+	IFT_ARCNETPLUS                = 0x24
+	IFT_ATM                       = 0x25
+	IFT_CEPT                      = 0x13
+	IFT_CLUSTER                   = 0x3e
+	IFT_DS3                       = 0x1e
+	IFT_EON                       = 0x19
+	IFT_ETHER                     = 0x6
+	IFT_FCS                       = 0x3a
+	IFT_FDDI                      = 0xf
+	IFT_FRELAY                    = 0x20
+	IFT_FRELAYDCE                 = 0x2c
+	IFT_GIFTUNNEL                 = 0x3c
+	IFT_HDH1822                   = 0x3
+	IFT_HF                        = 0x3d
+	IFT_HIPPI                     = 0x2f
+	IFT_HSSI                      = 0x2e
+	IFT_HY                        = 0xe
+	IFT_IB                        = 0xc7
+	IFT_ISDNBASIC                 = 0x14
+	IFT_ISDNPRIMARY               = 0x15
+	IFT_ISO88022LLC               = 0x29
+	IFT_ISO88023                  = 0x7
+	IFT_ISO88024                  = 0x8
+	IFT_ISO88025                  = 0x9
+	IFT_ISO88026                  = 0xa
+	IFT_LAPB                      = 0x10
+	IFT_LOCALTALK                 = 0x2a
+	IFT_LOOP                      = 0x18
+	IFT_MIOX25                    = 0x26
+	IFT_MODEM                     = 0x30
+	IFT_NSIP                      = 0x1b
+	IFT_OTHER                     = 0x1
+	IFT_P10                       = 0xc
+	IFT_P80                       = 0xd
+	IFT_PARA                      = 0x22
+	IFT_PPP                       = 0x17
+	IFT_PROPMUX                   = 0x36
+	IFT_PROPVIRTUAL               = 0x35
+	IFT_PTPSERIAL                 = 0x16
+	IFT_RS232                     = 0x21
+	IFT_SDLC                      = 0x11
+	IFT_SIP                       = 0x1f
+	IFT_SLIP                      = 0x1c
+	IFT_SMDSDXI                   = 0x2b
+	IFT_SMDSICIP                  = 0x34
+	IFT_SN                        = 0x38
+	IFT_SONET                     = 0x27
+	IFT_SONETPATH                 = 0x32
+	IFT_SONETVT                   = 0x33
+	IFT_SP                        = 0x39
+	IFT_STARLAN                   = 0xb
+	IFT_T1                        = 0x12
+	IFT_TUNNEL                    = 0x3b
+	IFT_ULTRA                     = 0x1d
+	IFT_V35                       = 0x2d
+	IFT_VIPA                      = 0x37
+	IFT_X25                       = 0x5
+	IFT_X25DDN                    = 0x4
+	IFT_X25PLE                    = 0x28
+	IFT_XETHER                    = 0x1a
+	IGNBRK                        = 0x1
+	IGNCR                         = 0x80
+	IGNPAR                        = 0x4
+	IMAXBEL                       = 0x10000
+	INLCR                         = 0x40
+	INPCK                         = 0x10
+	IN_CLASSA_HOST                = 0xffffff
+	IN_CLASSA_MAX                 = 0x80
+	IN_CLASSA_NET                 = 0xff000000
+	IN_CLASSA_NSHIFT              = 0x18
+	IN_CLASSB_HOST                = 0xffff
+	IN_CLASSB_MAX                 = 0x10000
+	IN_CLASSB_NET                 = 0xffff0000
+	IN_CLASSB_NSHIFT              = 0x10
+	IN_CLASSC_HOST                = 0xff
+	IN_CLASSC_NET                 = 0xffffff00
+	IN_CLASSC_NSHIFT              = 0x8
+	IN_CLASSD_HOST                = 0xfffffff
+	IN_CLASSD_NET                 = 0xf0000000
+	IN_CLASSD_NSHIFT              = 0x1c
+	IN_LOOPBACKNET                = 0x7f
+	IN_USE                        = 0x1
+	IPPROTO_AH                    = 0x33
+	IPPROTO_BIP                   = 0x53
+	IPPROTO_DSTOPTS               = 0x3c
+	IPPROTO_EGP                   = 0x8
+	IPPROTO_EON                   = 0x50
+	IPPROTO_ESP                   = 0x32
+	IPPROTO_FRAGMENT              = 0x2c
+	IPPROTO_GGP                   = 0x3
+	IPPROTO_GIF                   = 0x8c
+	IPPROTO_GRE                   = 0x2f
+	IPPROTO_HOPOPTS               = 0x0
+	IPPROTO_ICMP                  = 0x1
+	IPPROTO_ICMPV6                = 0x3a
+	IPPROTO_IDP                   = 0x16
+	IPPROTO_IGMP                  = 0x2
+	IPPROTO_IP                    = 0x0
+	IPPROTO_IPIP                  = 0x4
+	IPPROTO_IPV6                  = 0x29
+	IPPROTO_LOCAL                 = 0x3f
+	IPPROTO_MAX                   = 0x100
+	IPPROTO_MH                    = 0x87
+	IPPROTO_NONE                  = 0x3b
+	IPPROTO_PUP                   = 0xc
+	IPPROTO_QOS                   = 0x2d
+	IPPROTO_RAW                   = 0xff
+	IPPROTO_ROUTING               = 0x2b
+	IPPROTO_RSVP                  = 0x2e
+	IPPROTO_SCTP                  = 0x84
+	IPPROTO_TCP                   = 0x6
+	IPPROTO_TP                    = 0x1d
+	IPPROTO_UDP                   = 0x11
+	IPV6_ADDRFORM                 = 0x16
+	IPV6_ADDR_PREFERENCES         = 0x4a
+	IPV6_ADD_MEMBERSHIP           = 0xc
+	IPV6_AIXRAWSOCKET             = 0x39
+	IPV6_CHECKSUM                 = 0x27
+	IPV6_DONTFRAG                 = 0x2d
+	IPV6_DROP_MEMBERSHIP          = 0xd
+	IPV6_DSTOPTS                  = 0x36
+	IPV6_FLOWINFO_FLOWLABEL       = 0xffffff
+	IPV6_FLOWINFO_PRIFLOW         = 0xfffffff
+	IPV6_FLOWINFO_PRIORITY        = 0xf000000
+	IPV6_FLOWINFO_SRFLAG          = 0x10000000
+	IPV6_FLOWINFO_VERSION         = 0xf0000000
+	IPV6_HOPLIMIT                 = 0x28
+	IPV6_HOPOPTS                  = 0x34
+	IPV6_JOIN_GROUP               = 0xc
+	IPV6_LEAVE_GROUP              = 0xd
+	IPV6_MIPDSTOPTS               = 0x36
+	IPV6_MULTICAST_HOPS           = 0xa
+	IPV6_MULTICAST_IF             = 0x9
+	IPV6_MULTICAST_LOOP           = 0xb
+	IPV6_NEXTHOP                  = 0x30
+	IPV6_NOPROBE                  = 0x1c
+	IPV6_PATHMTU                  = 0x2e
+	IPV6_PKTINFO                  = 0x21
+	IPV6_PKTOPTIONS               = 0x24
+	IPV6_PRIORITY_10              = 0xa000000
+	IPV6_PRIORITY_11              = 0xb000000
+	IPV6_PRIORITY_12              = 0xc000000
+	IPV6_PRIORITY_13              = 0xd000000
+	IPV6_PRIORITY_14              = 0xe000000
+	IPV6_PRIORITY_15              = 0xf000000
+	IPV6_PRIORITY_8               = 0x8000000
+	IPV6_PRIORITY_9               = 0x9000000
+	IPV6_PRIORITY_BULK            = 0x4000000
+	IPV6_PRIORITY_CONTROL         = 0x7000000
+	IPV6_PRIORITY_FILLER          = 0x1000000
+	IPV6_PRIORITY_INTERACTIVE     = 0x6000000
+	IPV6_PRIORITY_RESERVED1       = 0x3000000
+	IPV6_PRIORITY_RESERVED2       = 0x5000000
+	IPV6_PRIORITY_UNATTENDED      = 0x2000000
+	IPV6_PRIORITY_UNCHARACTERIZED = 0x0
+	IPV6_RECVDSTOPTS              = 0x38
+	IPV6_RECVHOPLIMIT             = 0x29
+	IPV6_RECVHOPOPTS              = 0x35
+	IPV6_RECVHOPS                 = 0x22
+	IPV6_RECVIF                   = 0x1e
+	IPV6_RECVPATHMTU              = 0x2f
+	IPV6_RECVPKTINFO              = 0x23
+	IPV6_RECVRTHDR                = 0x33
+	IPV6_RECVSRCRT                = 0x1d
+	IPV6_RECVTCLASS               = 0x2a
+	IPV6_RTHDR                    = 0x32
+	IPV6_RTHDRDSTOPTS             = 0x37
+	IPV6_RTHDR_TYPE_0             = 0x0
+	IPV6_RTHDR_TYPE_2             = 0x2
+	IPV6_SENDIF                   = 0x1f
+	IPV6_SRFLAG_LOOSE             = 0x0
+	IPV6_SRFLAG_STRICT            = 0x10000000
+	IPV6_TCLASS                   = 0x2b
+	IPV6_TOKEN_LENGTH             = 0x40
+	IPV6_UNICAST_HOPS             = 0x4
+	IPV6_USE_MIN_MTU              = 0x2c
+	IPV6_V6ONLY                   = 0x25
+	IPV6_VERSION                  = 0x60000000
+	IP_ADDRFORM                   = 0x16
+	IP_ADD_MEMBERSHIP             = 0xc
+	IP_ADD_SOURCE_MEMBERSHIP      = 0x3c
+	IP_BLOCK_SOURCE               = 0x3a
+	IP_BROADCAST_IF               = 0x10
+	IP_CACHE_LINE_SIZE            = 0x80
+	IP_DEFAULT_MULTICAST_LOOP     = 0x1
+	IP_DEFAULT_MULTICAST_TTL      = 0x1
+	IP_DF                         = 0x4000
+	IP_DHCPMODE                   = 0x11
+	IP_DONTFRAG                   = 0x19
+	IP_DROP_MEMBERSHIP            = 0xd
+	IP_DROP_SOURCE_MEMBERSHIP     = 0x3d
+	IP_FINDPMTU                   = 0x1a
+	IP_HDRINCL                    = 0x2
+	IP_INC_MEMBERSHIPS            = 0x14
+	IP_INIT_MEMBERSHIP            = 0x14
+	IP_MAXPACKET                  = 0xffff
+	IP_MF                         = 0x2000
+	IP_MSS                        = 0x240
+	IP_MULTICAST_HOPS             = 0xa
+	IP_MULTICAST_IF               = 0x9
+	IP_MULTICAST_LOOP             = 0xb
+	IP_MULTICAST_TTL              = 0xa
+	IP_OPT                        = 0x1b
+	IP_OPTIONS                    = 0x1
+	IP_PMTUAGE                    = 0x1b
+	IP_RECVDSTADDR                = 0x7
+	IP_RECVIF                     = 0x14
+	IP_RECVIFINFO                 = 0xf
+	IP_RECVINTERFACE              = 0x20
+	IP_RECVMACHDR                 = 0xe
+	IP_RECVOPTS                   = 0x5
+	IP_RECVRETOPTS                = 0x6
+	IP_RECVTTL                    = 0x22
+	IP_RETOPTS                    = 0x8
+	IP_SOURCE_FILTER              = 0x48
+	IP_TOS                        = 0x3
+	IP_TTL                        = 0x4
+	IP_UNBLOCK_SOURCE             = 0x3b
+	IP_UNICAST_HOPS               = 0x4
+	ISIG                          = 0x1
+	ISTRIP                        = 0x20
+	IUCLC                         = 0x800
+	IXANY                         = 0x1000
+	IXOFF                         = 0x400
+	IXON                          = 0x200
+	I_FLUSH                       = 0x20005305
+	LNOFLSH                       = 0x8000
+	LOCK_EX                       = 0x2
+	LOCK_NB                       = 0x4
+	LOCK_SH                       = 0x1
+	LOCK_UN                       = 0x8
+	MADV_DONTNEED                 = 0x4
+	MADV_NORMAL                   = 0x0
+	MADV_RANDOM                   = 0x1
+	MADV_SEQUENTIAL               = 0x2
+	MADV_SPACEAVAIL               = 0x5
+	MADV_WILLNEED                 = 0x3
+	MAP_ANON                      = 0x10
+	MAP_ANONYMOUS                 = 0x10
+	MAP_FILE                      = 0x0
+	MAP_FIXED                     = 0x100
+	MAP_PRIVATE                   = 0x2
+	MAP_SHARED                    = 0x1
+	MAP_TYPE                      = 0xf0
+	MAP_VARIABLE                  = 0x0
+	MCL_CURRENT                   = 0x100
+	MCL_FUTURE                    = 0x200
+	MSG_ANY                       = 0x4
+	MSG_ARGEXT                    = 0x400
+	MSG_BAND                      = 0x2
+	MSG_COMPAT                    = 0x8000
+	MSG_CTRUNC                    = 0x20
+	MSG_DONTROUTE                 = 0x4
+	MSG_EOR                       = 0x8
+	MSG_HIPRI                     = 0x1
+	MSG_MAXIOVLEN                 = 0x10
+	MSG_MPEG2                     = 0x80
+	MSG_NONBLOCK                  = 0x4000
+	MSG_NOSIGNAL                  = 0x100
+	MSG_OOB                       = 0x1
+	MSG_PEEK                      = 0x2
+	MSG_TRUNC                     = 0x10
+	MSG_WAITALL                   = 0x40
+	MSG_WAITFORONE                = 0x200
+	MS_ASYNC                      = 0x10
+	MS_EINTR                      = 0x80
+	MS_INVALIDATE                 = 0x40
+	MS_PER_SEC                    = 0x3e8
+	MS_SYNC                       = 0x20
+	NL0                           = 0x0
+	NL1                           = 0x4000
+	NL2                           = 0x8000
+	NL3                           = 0xc000
+	NLDLY                         = 0x4000
+	NOFLSH                        = 0x80
+	NOFLUSH                       = 0x80000000
+	OCRNL                         = 0x8
+	OFDEL                         = 0x80
+	OFILL                         = 0x40
+	OLCUC                         = 0x2
+	ONLCR                         = 0x4
+	ONLRET                        = 0x20
+	ONOCR                         = 0x10
+	ONOEOT                        = 0x80000
+	OPOST                         = 0x1
+	OXTABS                        = 0x40000
+	O_ACCMODE                     = 0x23
+	O_APPEND                      = 0x8
+	O_CIO                         = 0x80
+	O_CIOR                        = 0x800000000
+	O_CLOEXEC                     = 0x800000
+	O_CREAT                       = 0x100
+	O_DEFER                       = 0x2000
+	O_DELAY                       = 0x4000
+	O_DIRECT                      = 0x8000000
+	O_DIRECTORY                   = 0x80000
+	O_DSYNC                       = 0x400000
+	O_EFSOFF                      = 0x400000000
+	O_EFSON                       = 0x200000000
+	O_EXCL                        = 0x400
+	O_EXEC                        = 0x20
+	O_LARGEFILE                   = 0x4000000
+	O_NDELAY                      = 0x8000
+	O_NOCACHE                     = 0x100000
+	O_NOCTTY                      = 0x800
+	O_NOFOLLOW                    = 0x1000000
+	O_NONBLOCK                    = 0x4
+	O_NONE                        = 0x3
+	O_NSHARE                      = 0x10000
+	O_RAW                         = 0x100000000
+	O_RDONLY                      = 0x0
+	O_RDWR                        = 0x2
+	O_RSHARE                      = 0x1000
+	O_RSYNC                       = 0x200000
+	O_SEARCH                      = 0x20
+	O_SNAPSHOT                    = 0x40
+	O_SYNC                        = 0x10
+	O_TRUNC                       = 0x200
+	O_TTY_INIT                    = 0x0
+	O_WRONLY                      = 0x1
+	PARENB                        = 0x100
+	PAREXT                        = 0x100000
+	PARMRK                        = 0x8
+	PARODD                        = 0x200
+	PENDIN                        = 0x20000000
+	PRIO_PGRP                     = 0x1
+	PRIO_PROCESS                  = 0x0
+	PRIO_USER                     = 0x2
+	PROT_EXEC                     = 0x4
+	PROT_NONE                     = 0x0
+	PROT_READ                     = 0x1
+	PROT_WRITE                    = 0x2
+	PR_64BIT                      = 0x20
+	PR_ADDR                       = 0x2
+	PR_ARGEXT                     = 0x400
+	PR_ATOMIC                     = 0x1
+	PR_CONNREQUIRED               = 0x4
+	PR_FASTHZ                     = 0x5
+	PR_INP                        = 0x40
+	PR_INTRLEVEL                  = 0x8000
+	PR_MLS                        = 0x100
+	PR_MLS_1_LABEL                = 0x200
+	PR_NOEOR                      = 0x4000
+	PR_RIGHTS                     = 0x10
+	PR_SLOWHZ                     = 0x2
+	PR_WANTRCVD                   = 0x8
+	RLIMIT_AS                     = 0x6
+	RLIMIT_CORE                   = 0x4
+	RLIMIT_CPU                    = 0x0
+	RLIMIT_DATA                   = 0x2
+	RLIMIT_FSIZE                  = 0x1
+	RLIMIT_NOFILE                 = 0x7
+	RLIMIT_NPROC                  = 0x9
+	RLIMIT_RSS                    = 0x5
+	RLIMIT_STACK                  = 0x3
+	RLIM_INFINITY                 = 0x7fffffffffffffff
+	RTAX_AUTHOR                   = 0x6
+	RTAX_BRD                      = 0x7
+	RTAX_DST                      = 0x0
+	RTAX_GATEWAY                  = 0x1
+	RTAX_GENMASK                  = 0x3
+	RTAX_IFA                      = 0x5
+	RTAX_IFP                      = 0x4
+	RTAX_MAX                      = 0x8
+	RTAX_NETMASK                  = 0x2
+	RTA_AUTHOR                    = 0x40
+	RTA_BRD                       = 0x80
+	RTA_DOWNSTREAM                = 0x100
+	RTA_DST                       = 0x1
+	RTA_GATEWAY                   = 0x2
+	RTA_GENMASK                   = 0x8
+	RTA_IFA                       = 0x20
+	RTA_IFP                       = 0x10
+	RTA_NETMASK                   = 0x4
+	RTC_IA64                      = 0x3
+	RTC_POWER                     = 0x1
+	RTC_POWER_PC                  = 0x2
+	RTF_ACTIVE_DGD                = 0x1000000
+	RTF_BCE                       = 0x80000
+	RTF_BLACKHOLE                 = 0x1000
+	RTF_BROADCAST                 = 0x400000
+	RTF_BUL                       = 0x2000
+	RTF_CLONE                     = 0x10000
+	RTF_CLONED                    = 0x20000
+	RTF_CLONING                   = 0x100
+	RTF_DONE                      = 0x40
+	RTF_DYNAMIC                   = 0x10
+	RTF_FREE_IN_PROG              = 0x4000000
+	RTF_GATEWAY                   = 0x2
+	RTF_HOST                      = 0x4
+	RTF_LLINFO                    = 0x400
+	RTF_LOCAL                     = 0x200000
+	RTF_MASK                      = 0x80
+	RTF_MODIFIED                  = 0x20
+	RTF_MULTICAST                 = 0x800000
+	RTF_PERMANENT6                = 0x8000000
+	RTF_PINNED                    = 0x100000
+	RTF_PROTO1                    = 0x8000
+	RTF_PROTO2                    = 0x4000
+	RTF_PROTO3                    = 0x40000
+	RTF_REJECT                    = 0x8
+	RTF_SMALLMTU                  = 0x40000
+	RTF_STATIC                    = 0x800
+	RTF_STOPSRCH                  = 0x2000000
+	RTF_UNREACHABLE               = 0x10000000
+	RTF_UP                        = 0x1
+	RTF_XRESOLVE                  = 0x200
+	RTM_ADD                       = 0x1
+	RTM_CHANGE                    = 0x3
+	RTM_DELADDR                   = 0xd
+	RTM_DELETE                    = 0x2
+	RTM_EXPIRE                    = 0xf
+	RTM_GET                       = 0x4
+	RTM_GETNEXT                   = 0x11
+	RTM_IFINFO                    = 0xe
+	RTM_LOCK                      = 0x8
+	RTM_LOSING                    = 0x5
+	RTM_MISS                      = 0x7
+	RTM_NEWADDR                   = 0xc
+	RTM_OLDADD                    = 0x9
+	RTM_OLDDEL                    = 0xa
+	RTM_REDIRECT                  = 0x6
+	RTM_RESOLVE                   = 0xb
+	RTM_RTLOST                    = 0x10
+	RTM_RTTUNIT                   = 0xf4240
+	RTM_SAMEADDR                  = 0x12
+	RTM_SET                       = 0x13
+	RTM_VERSION                   = 0x2
+	RTM_VERSION_GR                = 0x4
+	RTM_VERSION_GR_COMPAT         = 0x3
+	RTM_VERSION_POLICY            = 0x5
+	RTM_VERSION_POLICY_EXT        = 0x6
+	RTM_VERSION_POLICY_PRFN       = 0x7
+	RTV_EXPIRE                    = 0x4
+	RTV_HOPCOUNT                  = 0x2
+	RTV_MTU                       = 0x1
+	RTV_RPIPE                     = 0x8
+	RTV_RTT                       = 0x40
+	RTV_RTTVAR                    = 0x80
+	RTV_SPIPE                     = 0x10
+	RTV_SSTHRESH                  = 0x20
+	RUSAGE_CHILDREN               = -0x1
+	RUSAGE_SELF                   = 0x0
+	RUSAGE_THREAD                 = 0x1
+	SCM_RIGHTS                    = 0x1
+	SHUT_RD                       = 0x0
+	SHUT_RDWR                     = 0x2
+	SHUT_WR                       = 0x1
+	SIGMAX64                      = 0xff
+	SIGQUEUE_MAX                  = 0x20
+	SIOCADDIFVIPA                 = 0x20006942
+	SIOCADDMTU                    = -0x7ffb9690
+	SIOCADDMULTI                  = -0x7fdf96cf
+	SIOCADDNETID                  = -0x7fd796a9
+	SIOCADDRT                     = -0x7fc78df6
+	SIOCAIFADDR                   = -0x7fbf96e6
+	SIOCATMARK                    = 0x40047307
+	SIOCDARP                      = -0x7fb396e0
+	SIOCDELIFVIPA                 = 0x20006943
+	SIOCDELMTU                    = -0x7ffb968f
+	SIOCDELMULTI                  = -0x7fdf96ce
+	SIOCDELPMTU                   = -0x7fd78ff6
+	SIOCDELRT                     = -0x7fc78df5
+	SIOCDIFADDR                   = -0x7fd796e7
+	SIOCDNETOPT                   = -0x3ffe9680
+	SIOCDX25XLATE                 = -0x7fd7969b
+	SIOCFIFADDR                   = -0x7fdf966d
+	SIOCGARP                      = -0x3fb396da
+	SIOCGETMTUS                   = 0x2000696f
+	SIOCGETSGCNT                  = -0x3feb8acc
+	SIOCGETVIFCNT                 = -0x3feb8acd
+	SIOCGHIWAT                    = 0x40047301
+	SIOCGIFADDR                   = -0x3fd796df
+	SIOCGIFADDRS                  = 0x2000698c
+	SIOCGIFBAUDRATE               = -0x3fd79693
+	SIOCGIFBRDADDR                = -0x3fd796dd
+	SIOCGIFCONF                   = -0x3fef96bb
+	SIOCGIFCONFGLOB               = -0x3fef9670
+	SIOCGIFDSTADDR                = -0x3fd796de
+	SIOCGIFFLAGS                  = -0x3fd796ef
+	SIOCGIFGIDLIST                = 0x20006968
+	SIOCGIFHWADDR                 = -0x3fab966b
+	SIOCGIFMETRIC                 = -0x3fd796e9
+	SIOCGIFMTU                    = -0x3fd796aa
+	SIOCGIFNETMASK                = -0x3fd796db
+	SIOCGIFOPTIONS                = -0x3fd796d6
+	SIOCGISNO                     = -0x3fd79695
+	SIOCGLOADF                    = -0x3ffb967e
+	SIOCGLOWAT                    = 0x40047303
+	SIOCGNETOPT                   = -0x3ffe96a5
+	SIOCGNETOPT1                  = -0x3fdf967f
+	SIOCGNMTUS                    = 0x2000696e
+	SIOCGPGRP                     = 0x40047309
+	SIOCGSIZIFCONF                = 0x4004696a
+	SIOCGSRCFILTER                = -0x3fe796cb
+	SIOCGTUNEPHASE                = -0x3ffb9676
+	SIOCGX25XLATE                 = -0x3fd7969c
+	SIOCIFATTACH                  = -0x7fdf9699
+	SIOCIFDETACH                  = -0x7fdf969a
+	SIOCIFGETPKEY                 = -0x7fdf969b
+	SIOCIF_ATM_DARP               = -0x7fdf9683
+	SIOCIF_ATM_DUMPARP            = -0x7fdf9685
+	SIOCIF_ATM_GARP               = -0x7fdf9682
+	SIOCIF_ATM_IDLE               = -0x7fdf9686
+	SIOCIF_ATM_SARP               = -0x7fdf9681
+	SIOCIF_ATM_SNMPARP            = -0x7fdf9687
+	SIOCIF_ATM_SVC                = -0x7fdf9684
+	SIOCIF_ATM_UBR                = -0x7fdf9688
+	SIOCIF_DEVHEALTH              = -0x7ffb966c
+	SIOCIF_IB_ARP_INCOMP          = -0x7fdf9677
+	SIOCIF_IB_ARP_TIMER           = -0x7fdf9678
+	SIOCIF_IB_CLEAR_PINFO         = -0x3fdf966f
+	SIOCIF_IB_DEL_ARP             = -0x7fdf967f
+	SIOCIF_IB_DEL_PINFO           = -0x3fdf9670
+	SIOCIF_IB_DUMP_ARP            = -0x7fdf9680
+	SIOCIF_IB_GET_ARP             = -0x7fdf967e
+	SIOCIF_IB_GET_INFO            = -0x3f879675
+	SIOCIF_IB_GET_STATS           = -0x3f879672
+	SIOCIF_IB_NOTIFY_ADDR_REM     = -0x3f87966a
+	SIOCIF_IB_RESET_STATS         = -0x3f879671
+	SIOCIF_IB_RESIZE_CQ           = -0x7fdf9679
+	SIOCIF_IB_SET_ARP             = -0x7fdf967d
+	SIOCIF_IB_SET_PKEY            = -0x7fdf967c
+	SIOCIF_IB_SET_PORT            = -0x7fdf967b
+	SIOCIF_IB_SET_QKEY            = -0x7fdf9676
+	SIOCIF_IB_SET_QSIZE           = -0x7fdf967a
+	SIOCLISTIFVIPA                = 0x20006944
+	SIOCSARP                      = -0x7fb396e2
+	SIOCSHIWAT                    = 0xffffffff80047300
+	SIOCSIFADDR                   = -0x7fd796f4
+	SIOCSIFADDRORI                = -0x7fdb9673
+	SIOCSIFBRDADDR                = -0x7fd796ed
+	SIOCSIFDSTADDR                = -0x7fd796f2
+	SIOCSIFFLAGS                  = -0x7fd796f0
+	SIOCSIFGIDLIST                = 0x20006969
+	SIOCSIFMETRIC                 = -0x7fd796e8
+	SIOCSIFMTU                    = -0x7fd796a8
+	SIOCSIFNETDUMP                = -0x7fd796e4
+	SIOCSIFNETMASK                = -0x7fd796ea
+	SIOCSIFOPTIONS                = -0x7fd796d7
+	SIOCSIFSUBCHAN                = -0x7fd796e5
+	SIOCSISNO                     = -0x7fd79694
+	SIOCSLOADF                    = -0x3ffb967d
+	SIOCSLOWAT                    = 0xffffffff80047302
+	SIOCSNETOPT                   = -0x7ffe96a6
+	SIOCSPGRP                     = 0xffffffff80047308
+	SIOCSX25XLATE                 = -0x7fd7969d
+	SOCK_CONN_DGRAM               = 0x6
+	SOCK_DGRAM                    = 0x2
+	SOCK_RAW                      = 0x3
+	SOCK_RDM                      = 0x4
+	SOCK_SEQPACKET                = 0x5
+	SOCK_STREAM                   = 0x1
+	SOL_SOCKET                    = 0xffff
+	SOMAXCONN                     = 0x400
+	SO_ACCEPTCONN                 = 0x2
+	SO_AUDIT                      = 0x8000
+	SO_BROADCAST                  = 0x20
+	SO_CKSUMRECV                  = 0x800
+	SO_DEBUG                      = 0x1
+	SO_DONTROUTE                  = 0x10
+	SO_ERROR                      = 0x1007
+	SO_KEEPALIVE                  = 0x8
+	SO_KERNACCEPT                 = 0x2000
+	SO_LINGER                     = 0x80
+	SO_NOMULTIPATH                = 0x4000
+	SO_NOREUSEADDR                = 0x1000
+	SO_OOBINLINE                  = 0x100
+	SO_PEERID                     = 0x1009
+	SO_RCVBUF                     = 0x1002
+	SO_RCVLOWAT                   = 0x1004
+	SO_RCVTIMEO                   = 0x1006
+	SO_REUSEADDR                  = 0x4
+	SO_REUSEPORT                  = 0x200
+	SO_SNDBUF                     = 0x1001
+	SO_SNDLOWAT                   = 0x1003
+	SO_SNDTIMEO                   = 0x1005
+	SO_TIMESTAMPNS                = 0x100a
+	SO_TYPE                       = 0x1008
+	SO_USELOOPBACK                = 0x40
+	SO_USE_IFBUFS                 = 0x400
+	S_BANDURG                     = 0x400
+	S_EMODFMT                     = 0x3c000000
+	S_ENFMT                       = 0x400
+	S_ERROR                       = 0x100
+	S_HANGUP                      = 0x200
+	S_HIPRI                       = 0x2
+	S_ICRYPTO                     = 0x80000
+	S_IEXEC                       = 0x40
+	S_IFBLK                       = 0x6000
+	S_IFCHR                       = 0x2000
+	S_IFDIR                       = 0x4000
+	S_IFIFO                       = 0x1000
+	S_IFJOURNAL                   = 0x10000
+	S_IFLNK                       = 0xa000
+	S_IFMPX                       = 0x2200
+	S_IFMT                        = 0xf000
+	S_IFPDIR                      = 0x4000000
+	S_IFPSDIR                     = 0x8000000
+	S_IFPSSDIR                    = 0xc000000
+	S_IFREG                       = 0x8000
+	S_IFSOCK                      = 0xc000
+	S_IFSYSEA                     = 0x30000000
+	S_INPUT                       = 0x1
+	S_IREAD                       = 0x100
+	S_IRGRP                       = 0x20
+	S_IROTH                       = 0x4
+	S_IRUSR                       = 0x100
+	S_IRWXG                       = 0x38
+	S_IRWXO                       = 0x7
+	S_IRWXU                       = 0x1c0
+	S_ISGID                       = 0x400
+	S_ISUID                       = 0x800
+	S_ISVTX                       = 0x200
+	S_ITCB                        = 0x1000000
+	S_ITP                         = 0x800000
+	S_IWGRP                       = 0x10
+	S_IWOTH                       = 0x2
+	S_IWRITE                      = 0x80
+	S_IWUSR                       = 0x80
+	S_IXACL                       = 0x2000000
+	S_IXATTR                      = 0x40000
+	S_IXGRP                       = 0x8
+	S_IXINTERFACE                 = 0x100000
+	S_IXMOD                       = 0x40000000
+	S_IXOTH                       = 0x1
+	S_IXUSR                       = 0x40
+	S_MSG                         = 0x8
+	S_OUTPUT                      = 0x4
+	S_RDBAND                      = 0x20
+	S_RDNORM                      = 0x10
+	S_RESERVED1                   = 0x20000
+	S_RESERVED2                   = 0x200000
+	S_RESERVED3                   = 0x400000
+	S_RESERVED4                   = 0x80000000
+	S_RESFMT1                     = 0x10000000
+	S_RESFMT10                    = 0x34000000
+	S_RESFMT11                    = 0x38000000
+	S_RESFMT12                    = 0x3c000000
+	S_RESFMT2                     = 0x14000000
+	S_RESFMT3                     = 0x18000000
+	S_RESFMT4                     = 0x1c000000
+	S_RESFMT5                     = 0x20000000
+	S_RESFMT6                     = 0x24000000
+	S_RESFMT7                     = 0x28000000
+	S_RESFMT8                     = 0x2c000000
+	S_WRBAND                      = 0x80
+	S_WRNORM                      = 0x40
+	TAB0                          = 0x0
+	TAB1                          = 0x400
+	TAB2                          = 0x800
+	TAB3                          = 0xc00
+	TABDLY                        = 0xc00
+	TCIFLUSH                      = 0x0
+	TCIOFF                        = 0x2
+	TCIOFLUSH                     = 0x2
+	TCION                         = 0x3
+	TCOFLUSH                      = 0x1
+	TCOOFF                        = 0x0
+	TCOON                         = 0x1
+	TCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800
+	TCP_ACLADD                    = 0x23
+	TCP_ACLBIND                   = 0x26
+	TCP_ACLCLEAR                  = 0x22
+	TCP_ACLDEL                    = 0x24
+	TCP_ACLDENY                   = 0x8
+	TCP_ACLFLUSH                  = 0x21
+	TCP_ACLGID                    = 0x1
+	TCP_ACLLS                     = 0x25
+	TCP_ACLSUBNET                 = 0x4
+	TCP_ACLUID                    = 0x2
+	TCP_CWND_DF                   = 0x16
+	TCP_CWND_IF                   = 0x15
+	TCP_DELAY_ACK_FIN             = 0x2
+	TCP_DELAY_ACK_SYN             = 0x1
+	TCP_FASTNAME                  = 0x101080a
+	TCP_KEEPCNT                   = 0x13
+	TCP_KEEPIDLE                  = 0x11
+	TCP_KEEPINTVL                 = 0x12
+	TCP_LSPRIV                    = 0x29
+	TCP_LUID                      = 0x20
+	TCP_MAXBURST                  = 0x8
+	TCP_MAXDF                     = 0x64
+	TCP_MAXIF                     = 0x64
+	TCP_MAXSEG                    = 0x2
+	TCP_MAXWIN                    = 0xffff
+	TCP_MAXWINDOWSCALE            = 0xe
+	TCP_MAX_SACK                  = 0x4
+	TCP_MSS                       = 0x5b4
+	TCP_NODELAY                   = 0x1
+	TCP_NODELAYACK                = 0x14
+	TCP_NOREDUCE_CWND_EXIT_FRXMT  = 0x19
+	TCP_NOREDUCE_CWND_IN_FRXMT    = 0x18
+	TCP_NOTENTER_SSTART           = 0x17
+	TCP_OPT                       = 0x19
+	TCP_RFC1323                   = 0x4
+	TCP_SETPRIV                   = 0x27
+	TCP_STDURG                    = 0x10
+	TCP_TIMESTAMP_OPTLEN          = 0xc
+	TCP_UNSETPRIV                 = 0x28
+	TCSAFLUSH                     = 0x2
+	TIOCCBRK                      = 0x2000747a
+	TIOCCDTR                      = 0x20007478
+	TIOCCONS                      = 0xffffffff80047462
+	TIOCEXCL                      = 0x2000740d
+	TIOCFLUSH                     = 0xffffffff80047410
+	TIOCGETC                      = 0x40067412
+	TIOCGETD                      = 0x40047400
+	TIOCGETP                      = 0x40067408
+	TIOCGLTC                      = 0x40067474
+	TIOCGPGRP                     = 0x40047477
+	TIOCGSID                      = 0x40047448
+	TIOCGSIZE                     = 0x40087468
+	TIOCGWINSZ                    = 0x40087468
+	TIOCHPCL                      = 0x20007402
+	TIOCLBIC                      = 0xffffffff8004747e
+	TIOCLBIS                      = 0xffffffff8004747f
+	TIOCLGET                      = 0x4004747c
+	TIOCLSET                      = 0xffffffff8004747d
+	TIOCMBIC                      = 0xffffffff8004746b
+	TIOCMBIS                      = 0xffffffff8004746c
+	TIOCMGET                      = 0x4004746a
+	TIOCMIWAIT                    = 0xffffffff80047464
+	TIOCMODG                      = 0x40047403
+	TIOCMODS                      = 0xffffffff80047404
+	TIOCMSET                      = 0xffffffff8004746d
+	TIOCM_CAR                     = 0x40
+	TIOCM_CD                      = 0x40
+	TIOCM_CTS                     = 0x20
+	TIOCM_DSR                     = 0x100
+	TIOCM_DTR                     = 0x2
+	TIOCM_LE                      = 0x1
+	TIOCM_RI                      = 0x80
+	TIOCM_RNG                     = 0x80
+	TIOCM_RTS                     = 0x4
+	TIOCM_SR                      = 0x10
+	TIOCM_ST                      = 0x8
+	TIOCNOTTY                     = 0x20007471
+	TIOCNXCL                      = 0x2000740e
+	TIOCOUTQ                      = 0x40047473
+	TIOCPKT                       = 0xffffffff80047470
+	TIOCPKT_DATA                  = 0x0
+	TIOCPKT_DOSTOP                = 0x20
+	TIOCPKT_FLUSHREAD             = 0x1
+	TIOCPKT_FLUSHWRITE            = 0x2
+	TIOCPKT_NOSTOP                = 0x10
+	TIOCPKT_START                 = 0x8
+	TIOCPKT_STOP                  = 0x4
+	TIOCREMOTE                    = 0xffffffff80047469
+	TIOCSBRK                      = 0x2000747b
+	TIOCSDTR                      = 0x20007479
+	TIOCSETC                      = 0xffffffff80067411
+	TIOCSETD                      = 0xffffffff80047401
+	TIOCSETN                      = 0xffffffff8006740a
+	TIOCSETP                      = 0xffffffff80067409
+	TIOCSLTC                      = 0xffffffff80067475
+	TIOCSPGRP                     = 0xffffffff80047476
+	TIOCSSIZE                     = 0xffffffff80087467
+	TIOCSTART                     = 0x2000746e
+	TIOCSTI                       = 0xffffffff80017472
+	TIOCSTOP                      = 0x2000746f
+	TIOCSWINSZ                    = 0xffffffff80087467
+	TIOCUCNTL                     = 0xffffffff80047466
+	TOSTOP                        = 0x10000
+	UTIME_NOW                     = -0x2
+	UTIME_OMIT                    = -0x3
+	VDISCRD                       = 0xc
+	VDSUSP                        = 0xa
+	VEOF                          = 0x4
+	VEOL                          = 0x5
+	VEOL2                         = 0x6
+	VERASE                        = 0x2
+	VINTR                         = 0x0
+	VKILL                         = 0x3
+	VLNEXT                        = 0xe
+	VMIN                          = 0x4
+	VQUIT                         = 0x1
+	VREPRINT                      = 0xb
+	VSTART                        = 0x7
+	VSTOP                         = 0x8
+	VSTRT                         = 0x7
+	VSUSP                         = 0x9
+	VT0                           = 0x0
+	VT1                           = 0x8000
+	VTDELAY                       = 0x2000
+	VTDLY                         = 0x8000
+	VTIME                         = 0x5
+	VWERSE                        = 0xd
+	WPARSTART                     = 0x1
+	WPARSTOP                      = 0x2
+	WPARTTYNAME                   = "Global"
+	XCASE                         = 0x4
+	XTABS                         = 0xc00
+	_FDATAFLUSH                   = 0x2000000000
+)
+
+// Errors
+const (
+	E2BIG           = syscall.Errno(0x7)
+	EACCES          = syscall.Errno(0xd)
+	EADDRINUSE      = syscall.Errno(0x43)
+	EADDRNOTAVAIL   = syscall.Errno(0x44)
+	EAFNOSUPPORT    = syscall.Errno(0x42)
+	EAGAIN          = syscall.Errno(0xb)
+	EALREADY        = syscall.Errno(0x38)
+	EBADF           = syscall.Errno(0x9)
+	EBADMSG         = syscall.Errno(0x78)
+	EBUSY           = syscall.Errno(0x10)
+	ECANCELED       = syscall.Errno(0x75)
+	ECHILD          = syscall.Errno(0xa)
+	ECHRNG          = syscall.Errno(0x25)
+	ECLONEME        = syscall.Errno(0x52)
+	ECONNABORTED    = syscall.Errno(0x48)
+	ECONNREFUSED    = syscall.Errno(0x4f)
+	ECONNRESET      = syscall.Errno(0x49)
+	ECORRUPT        = syscall.Errno(0x59)
+	EDEADLK         = syscall.Errno(0x2d)
+	EDESTADDREQ     = syscall.Errno(0x3a)
+	EDESTADDRREQ    = syscall.Errno(0x3a)
+	EDIST           = syscall.Errno(0x35)
+	EDOM            = syscall.Errno(0x21)
+	EDQUOT          = syscall.Errno(0x58)
+	EEXIST          = syscall.Errno(0x11)
+	EFAULT          = syscall.Errno(0xe)
+	EFBIG           = syscall.Errno(0x1b)
+	EFORMAT         = syscall.Errno(0x30)
+	EHOSTDOWN       = syscall.Errno(0x50)
+	EHOSTUNREACH    = syscall.Errno(0x51)
+	EIDRM           = syscall.Errno(0x24)
+	EILSEQ          = syscall.Errno(0x74)
+	EINPROGRESS     = syscall.Errno(0x37)
+	EINTR           = syscall.Errno(0x4)
+	EINVAL          = syscall.Errno(0x16)
+	EIO             = syscall.Errno(0x5)
+	EISCONN         = syscall.Errno(0x4b)
+	EISDIR          = syscall.Errno(0x15)
+	EL2HLT          = syscall.Errno(0x2c)
+	EL2NSYNC        = syscall.Errno(0x26)
+	EL3HLT          = syscall.Errno(0x27)
+	EL3RST          = syscall.Errno(0x28)
+	ELNRNG          = syscall.Errno(0x29)
+	ELOOP           = syscall.Errno(0x55)
+	EMEDIA          = syscall.Errno(0x6e)
+	EMFILE          = syscall.Errno(0x18)
+	EMLINK          = syscall.Errno(0x1f)
+	EMSGSIZE        = syscall.Errno(0x3b)
+	EMULTIHOP       = syscall.Errno(0x7d)
+	ENAMETOOLONG    = syscall.Errno(0x56)
+	ENETDOWN        = syscall.Errno(0x45)
+	ENETRESET       = syscall.Errno(0x47)
+	ENETUNREACH     = syscall.Errno(0x46)
+	ENFILE          = syscall.Errno(0x17)
+	ENOATTR         = syscall.Errno(0x70)
+	ENOBUFS         = syscall.Errno(0x4a)
+	ENOCONNECT      = syscall.Errno(0x32)
+	ENOCSI          = syscall.Errno(0x2b)
+	ENODATA         = syscall.Errno(0x7a)
+	ENODEV          = syscall.Errno(0x13)
+	ENOENT          = syscall.Errno(0x2)
+	ENOEXEC         = syscall.Errno(0x8)
+	ENOLCK          = syscall.Errno(0x31)
+	ENOLINK         = syscall.Errno(0x7e)
+	ENOMEM          = syscall.Errno(0xc)
+	ENOMSG          = syscall.Errno(0x23)
+	ENOPROTOOPT     = syscall.Errno(0x3d)
+	ENOSPC          = syscall.Errno(0x1c)
+	ENOSR           = syscall.Errno(0x76)
+	ENOSTR          = syscall.Errno(0x7b)
+	ENOSYS          = syscall.Errno(0x6d)
+	ENOTBLK         = syscall.Errno(0xf)
+	ENOTCONN        = syscall.Errno(0x4c)
+	ENOTDIR         = syscall.Errno(0x14)
+	ENOTEMPTY       = syscall.Errno(0x11)
+	ENOTREADY       = syscall.Errno(0x2e)
+	ENOTRECOVERABLE = syscall.Errno(0x5e)
+	ENOTRUST        = syscall.Errno(0x72)
+	ENOTSOCK        = syscall.Errno(0x39)
+	ENOTSUP         = syscall.Errno(0x7c)
+	ENOTTY          = syscall.Errno(0x19)
+	ENXIO           = syscall.Errno(0x6)
+	EOPNOTSUPP      = syscall.Errno(0x40)
+	EOVERFLOW       = syscall.Errno(0x7f)
+	EOWNERDEAD      = syscall.Errno(0x5f)
+	EPERM           = syscall.Errno(0x1)
+	EPFNOSUPPORT    = syscall.Errno(0x41)
+	EPIPE           = syscall.Errno(0x20)
+	EPROCLIM        = syscall.Errno(0x53)
+	EPROTO          = syscall.Errno(0x79)
+	EPROTONOSUPPORT = syscall.Errno(0x3e)
+	EPROTOTYPE      = syscall.Errno(0x3c)
+	ERANGE          = syscall.Errno(0x22)
+	EREMOTE         = syscall.Errno(0x5d)
+	ERESTART        = syscall.Errno(0x52)
+	EROFS           = syscall.Errno(0x1e)
+	ESAD            = syscall.Errno(0x71)
+	ESHUTDOWN       = syscall.Errno(0x4d)
+	ESOCKTNOSUPPORT = syscall.Errno(0x3f)
+	ESOFT           = syscall.Errno(0x6f)
+	ESPIPE          = syscall.Errno(0x1d)
+	ESRCH           = syscall.Errno(0x3)
+	ESTALE          = syscall.Errno(0x34)
+	ESYSERROR       = syscall.Errno(0x5a)
+	ETIME           = syscall.Errno(0x77)
+	ETIMEDOUT       = syscall.Errno(0x4e)
+	ETOOMANYREFS    = syscall.Errno(0x73)
+	ETXTBSY         = syscall.Errno(0x1a)
+	EUNATCH         = syscall.Errno(0x2a)
+	EUSERS          = syscall.Errno(0x54)
+	EWOULDBLOCK     = syscall.Errno(0xb)
+	EWRPROTECT      = syscall.Errno(0x2f)
+	EXDEV           = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+	SIGABRT     = syscall.Signal(0x6)
+	SIGAIO      = syscall.Signal(0x17)
+	SIGALRM     = syscall.Signal(0xe)
+	SIGALRM1    = syscall.Signal(0x26)
+	SIGBUS      = syscall.Signal(0xa)
+	SIGCAPI     = syscall.Signal(0x31)
+	SIGCHLD     = syscall.Signal(0x14)
+	SIGCLD      = syscall.Signal(0x14)
+	SIGCONT     = syscall.Signal(0x13)
+	SIGCPUFAIL  = syscall.Signal(0x3b)
+	SIGDANGER   = syscall.Signal(0x21)
+	SIGEMT      = syscall.Signal(0x7)
+	SIGFPE      = syscall.Signal(0x8)
+	SIGGRANT    = syscall.Signal(0x3c)
+	SIGHUP      = syscall.Signal(0x1)
+	SIGILL      = syscall.Signal(0x4)
+	SIGINT      = syscall.Signal(0x2)
+	SIGIO       = syscall.Signal(0x17)
+	SIGIOINT    = syscall.Signal(0x10)
+	SIGIOT      = syscall.Signal(0x6)
+	SIGKAP      = syscall.Signal(0x3c)
+	SIGKILL     = syscall.Signal(0x9)
+	SIGLOST     = syscall.Signal(0x6)
+	SIGMAX      = syscall.Signal(0xff)
+	SIGMAX32    = syscall.Signal(0x3f)
+	SIGMIGRATE  = syscall.Signal(0x23)
+	SIGMSG      = syscall.Signal(0x1b)
+	SIGPIPE     = syscall.Signal(0xd)
+	SIGPOLL     = syscall.Signal(0x17)
+	SIGPRE      = syscall.Signal(0x24)
+	SIGPROF     = syscall.Signal(0x20)
+	SIGPTY      = syscall.Signal(0x17)
+	SIGPWR      = syscall.Signal(0x1d)
+	SIGQUIT     = syscall.Signal(0x3)
+	SIGRECONFIG = syscall.Signal(0x3a)
+	SIGRETRACT  = syscall.Signal(0x3d)
+	SIGSAK      = syscall.Signal(0x3f)
+	SIGSEGV     = syscall.Signal(0xb)
+	SIGSOUND    = syscall.Signal(0x3e)
+	SIGSTOP     = syscall.Signal(0x11)
+	SIGSYS      = syscall.Signal(0xc)
+	SIGSYSERROR = syscall.Signal(0x30)
+	SIGTALRM    = syscall.Signal(0x26)
+	SIGTERM     = syscall.Signal(0xf)
+	SIGTRAP     = syscall.Signal(0x5)
+	SIGTSTP     = syscall.Signal(0x12)
+	SIGTTIN     = syscall.Signal(0x15)
+	SIGTTOU     = syscall.Signal(0x16)
+	SIGURG      = syscall.Signal(0x10)
+	SIGUSR1     = syscall.Signal(0x1e)
+	SIGUSR2     = syscall.Signal(0x1f)
+	SIGVIRT     = syscall.Signal(0x25)
+	SIGVTALRM   = syscall.Signal(0x22)
+	SIGWAITING  = syscall.Signal(0x27)
+	SIGWINCH    = syscall.Signal(0x1c)
+	SIGXCPU     = syscall.Signal(0x18)
+	SIGXFSZ     = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+	num  syscall.Errno
+	name string
+	desc string
+}{
+	{1, "EPERM", "not owner"},
+	{2, "ENOENT", "no such file or directory"},
+	{3, "ESRCH", "no such process"},
+	{4, "EINTR", "interrupted system call"},
+	{5, "EIO", "I/O error"},
+	{6, "ENXIO", "no such device or address"},
+	{7, "E2BIG", "arg list too long"},
+	{8, "ENOEXEC", "exec format error"},
+	{9, "EBADF", "bad file number"},
+	{10, "ECHILD", "no child processes"},
+	{11, "EWOULDBLOCK", "resource temporarily unavailable"},
+	{12, "ENOMEM", "not enough space"},
+	{13, "EACCES", "permission denied"},
+	{14, "EFAULT", "bad address"},
+	{15, "ENOTBLK", "block device required"},
+	{16, "EBUSY", "device busy"},
+	{17, "ENOTEMPTY", "file exists"},
+	{18, "EXDEV", "cross-device link"},
+	{19, "ENODEV", "no such device"},
+	{20, "ENOTDIR", "not a directory"},
+	{21, "EISDIR", "is a directory"},
+	{22, "EINVAL", "invalid argument"},
+	{23, "ENFILE", "file table overflow"},
+	{24, "EMFILE", "too many open files"},
+	{25, "ENOTTY", "not a typewriter"},
+	{26, "ETXTBSY", "text file busy"},
+	{27, "EFBIG", "file too large"},
+	{28, "ENOSPC", "no space left on device"},
+	{29, "ESPIPE", "illegal seek"},
+	{30, "EROFS", "read-only file system"},
+	{31, "EMLINK", "too many links"},
+	{32, "EPIPE", "broken pipe"},
+	{33, "EDOM", "argument out of domain"},
+	{34, "ERANGE", "result too large"},
+	{35, "ENOMSG", "no message of desired type"},
+	{36, "EIDRM", "identifier removed"},
+	{37, "ECHRNG", "channel number out of range"},
+	{38, "EL2NSYNC", "level 2 not synchronized"},
+	{39, "EL3HLT", "level 3 halted"},
+	{40, "EL3RST", "level 3 reset"},
+	{41, "ELNRNG", "link number out of range"},
+	{42, "EUNATCH", "protocol driver not attached"},
+	{43, "ENOCSI", "no CSI structure available"},
+	{44, "EL2HLT", "level 2 halted"},
+	{45, "EDEADLK", "deadlock condition if locked"},
+	{46, "ENOTREADY", "device not ready"},
+	{47, "EWRPROTECT", "write-protected media"},
+	{48, "EFORMAT", "unformatted or incompatible media"},
+	{49, "ENOLCK", "no locks available"},
+	{50, "ENOCONNECT", "cannot Establish Connection"},
+	{52, "ESTALE", "missing file or filesystem"},
+	{53, "EDIST", "requests blocked by Administrator"},
+	{55, "EINPROGRESS", "operation now in progress"},
+	{56, "EALREADY", "operation already in progress"},
+	{57, "ENOTSOCK", "socket operation on non-socket"},
+	{58, "EDESTADDREQ", "destination address required"},
+	{59, "EMSGSIZE", "message too long"},
+	{60, "EPROTOTYPE", "protocol wrong type for socket"},
+	{61, "ENOPROTOOPT", "protocol not available"},
+	{62, "EPROTONOSUPPORT", "protocol not supported"},
+	{63, "ESOCKTNOSUPPORT", "socket type not supported"},
+	{64, "EOPNOTSUPP", "operation not supported on socket"},
+	{65, "EPFNOSUPPORT", "protocol family not supported"},
+	{66, "EAFNOSUPPORT", "addr family not supported by protocol"},
+	{67, "EADDRINUSE", "address already in use"},
+	{68, "EADDRNOTAVAIL", "can't assign requested address"},
+	{69, "ENETDOWN", "network is down"},
+	{70, "ENETUNREACH", "network is unreachable"},
+	{71, "ENETRESET", "network dropped connection on reset"},
+	{72, "ECONNABORTED", "software caused connection abort"},
+	{73, "ECONNRESET", "connection reset by peer"},
+	{74, "ENOBUFS", "no buffer space available"},
+	{75, "EISCONN", "socket is already connected"},
+	{76, "ENOTCONN", "socket is not connected"},
+	{77, "ESHUTDOWN", "can't send after socket shutdown"},
+	{78, "ETIMEDOUT", "connection timed out"},
+	{79, "ECONNREFUSED", "connection refused"},
+	{80, "EHOSTDOWN", "host is down"},
+	{81, "EHOSTUNREACH", "no route to host"},
+	{82, "ERESTART", "restart the system call"},
+	{83, "EPROCLIM", "too many processes"},
+	{84, "EUSERS", "too many users"},
+	{85, "ELOOP", "too many levels of symbolic links"},
+	{86, "ENAMETOOLONG", "file name too long"},
+	{88, "EDQUOT", "disk quota exceeded"},
+	{89, "ECORRUPT", "invalid file system control data detected"},
+	{90, "ESYSERROR", "for future use "},
+	{93, "EREMOTE", "item is not local to host"},
+	{94, "ENOTRECOVERABLE", "state not recoverable "},
+	{95, "EOWNERDEAD", "previous owner died "},
+	{109, "ENOSYS", "function not implemented"},
+	{110, "EMEDIA", "media surface error"},
+	{111, "ESOFT", "I/O completed, but needs relocation"},
+	{112, "ENOATTR", "no attribute found"},
+	{113, "ESAD", "security Authentication Denied"},
+	{114, "ENOTRUST", "not a Trusted Program"},
+	{115, "ETOOMANYREFS", "too many references: can't splice"},
+	{116, "EILSEQ", "invalid wide character"},
+	{117, "ECANCELED", "asynchronous I/O cancelled"},
+	{118, "ENOSR", "out of STREAMS resources"},
+	{119, "ETIME", "system call timed out"},
+	{120, "EBADMSG", "next message has wrong type"},
+	{121, "EPROTO", "error in protocol"},
+	{122, "ENODATA", "no message on stream head read q"},
+	{123, "ENOSTR", "fd not associated with a stream"},
+	{124, "ENOTSUP", "unsupported attribute value"},
+	{125, "EMULTIHOP", "multihop is not allowed"},
+	{126, "ENOLINK", "the server link has been severed"},
+	{127, "EOVERFLOW", "value too large to be stored in data type"},
+}
+
+// Signal table
+var signalList = [...]struct {
+	num  syscall.Signal
+	name string
+	desc string
+}{
+	{1, "SIGHUP", "hangup"},
+	{2, "SIGINT", "interrupt"},
+	{3, "SIGQUIT", "quit"},
+	{4, "SIGILL", "illegal instruction"},
+	{5, "SIGTRAP", "trace/BPT trap"},
+	{6, "SIGIOT", "IOT/Abort trap"},
+	{7, "SIGEMT", "EMT trap"},
+	{8, "SIGFPE", "floating point exception"},
+	{9, "SIGKILL", "killed"},
+	{10, "SIGBUS", "bus error"},
+	{11, "SIGSEGV", "segmentation fault"},
+	{12, "SIGSYS", "bad system call"},
+	{13, "SIGPIPE", "broken pipe"},
+	{14, "SIGALRM", "alarm clock"},
+	{15, "SIGTERM", "terminated"},
+	{16, "SIGURG", "urgent I/O condition"},
+	{17, "SIGSTOP", "stopped (signal)"},
+	{18, "SIGTSTP", "stopped"},
+	{19, "SIGCONT", "continued"},
+	{20, "SIGCHLD", "child exited"},
+	{21, "SIGTTIN", "stopped (tty input)"},
+	{22, "SIGTTOU", "stopped (tty output)"},
+	{23, "SIGIO", "I/O possible/complete"},
+	{24, "SIGXCPU", "cputime limit exceeded"},
+	{25, "SIGXFSZ", "filesize limit exceeded"},
+	{27, "SIGMSG", "input device data"},
+	{28, "SIGWINCH", "window size changes"},
+	{29, "SIGPWR", "power-failure"},
+	{30, "SIGUSR1", "user defined signal 1"},
+	{31, "SIGUSR2", "user defined signal 2"},
+	{32, "SIGPROF", "profiling timer expired"},
+	{33, "SIGDANGER", "paging space low"},
+	{34, "SIGVTALRM", "virtual timer expired"},
+	{35, "SIGMIGRATE", "signal 35"},
+	{36, "SIGPRE", "signal 36"},
+	{37, "SIGVIRT", "signal 37"},
+	{38, "SIGTALRM", "signal 38"},
+	{39, "SIGWAITING", "signal 39"},
+	{48, "SIGSYSERROR", "signal 48"},
+	{49, "SIGCAPI", "signal 49"},
+	{58, "SIGRECONFIG", "signal 58"},
+	{59, "SIGCPUFAIL", "CPU Failure Predicted"},
+	{60, "SIGGRANT", "monitor mode granted"},
+	{61, "SIGRETRACT", "monitor mode retracted"},
+	{62, "SIGSOUND", "sound completed"},
+	{63, "SIGMAX32", "secure attention"},
+	{255, "SIGMAX", "signal 255"},
+}

+ 31 - 1
vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go

@@ -3,7 +3,7 @@
 
 
 // +build amd64,dragonfly
 // +build amd64,dragonfly
 
 
-// Created by cgo -godefs - DO NOT EDIT
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
 // cgo -godefs -- -m64 _const.go
 // cgo -godefs -- -m64 _const.go
 
 
 package unix
 package unix
@@ -1168,6 +1168,36 @@ const (
 	SO_TIMESTAMP                      = 0x400
 	SO_TIMESTAMP                      = 0x400
 	SO_TYPE                           = 0x1008
 	SO_TYPE                           = 0x1008
 	SO_USELOOPBACK                    = 0x40
 	SO_USELOOPBACK                    = 0x40
+	S_BLKSIZE                         = 0x200
+	S_IEXEC                           = 0x40
+	S_IFBLK                           = 0x6000
+	S_IFCHR                           = 0x2000
+	S_IFDB                            = 0x9000
+	S_IFDIR                           = 0x4000
+	S_IFIFO                           = 0x1000
+	S_IFLNK                           = 0xa000
+	S_IFMT                            = 0xf000
+	S_IFREG                           = 0x8000
+	S_IFSOCK                          = 0xc000
+	S_IFWHT                           = 0xe000
+	S_IREAD                           = 0x100
+	S_IRGRP                           = 0x20
+	S_IROTH                           = 0x4
+	S_IRUSR                           = 0x100
+	S_IRWXG                           = 0x38
+	S_IRWXO                           = 0x7
+	S_IRWXU                           = 0x1c0
+	S_ISGID                           = 0x400
+	S_ISTXT                           = 0x200
+	S_ISUID                           = 0x800
+	S_ISVTX                           = 0x200
+	S_IWGRP                           = 0x10
+	S_IWOTH                           = 0x2
+	S_IWRITE                          = 0x80
+	S_IWUSR                           = 0x80
+	S_IXGRP                           = 0x8
+	S_IXOTH                           = 0x1
+	S_IXUSR                           = 0x40
 	TCIFLUSH                          = 0x1
 	TCIFLUSH                          = 0x1
 	TCIOFF                            = 0x3
 	TCIOFF                            = 0x3
 	TCIOFLUSH                         = 0x3
 	TCIOFLUSH                         = 0x3

+ 29 - 0
vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go

@@ -1345,6 +1345,35 @@ const (
 	SO_USELOOPBACK                 = 0x40
 	SO_USELOOPBACK                 = 0x40
 	SO_USER_COOKIE                 = 0x1015
 	SO_USER_COOKIE                 = 0x1015
 	SO_VENDOR                      = 0x80000000
 	SO_VENDOR                      = 0x80000000
+	S_BLKSIZE                      = 0x200
+	S_IEXEC                        = 0x40
+	S_IFBLK                        = 0x6000
+	S_IFCHR                        = 0x2000
+	S_IFDIR                        = 0x4000
+	S_IFIFO                        = 0x1000
+	S_IFLNK                        = 0xa000
+	S_IFMT                         = 0xf000
+	S_IFREG                        = 0x8000
+	S_IFSOCK                       = 0xc000
+	S_IFWHT                        = 0xe000
+	S_IREAD                        = 0x100
+	S_IRGRP                        = 0x20
+	S_IROTH                        = 0x4
+	S_IRUSR                        = 0x100
+	S_IRWXG                        = 0x38
+	S_IRWXO                        = 0x7
+	S_IRWXU                        = 0x1c0
+	S_ISGID                        = 0x400
+	S_ISTXT                        = 0x200
+	S_ISUID                        = 0x800
+	S_ISVTX                        = 0x200
+	S_IWGRP                        = 0x10
+	S_IWOTH                        = 0x2
+	S_IWRITE                       = 0x80
+	S_IWUSR                        = 0x80
+	S_IXGRP                        = 0x8
+	S_IXOTH                        = 0x1
+	S_IXUSR                        = 0x40
 	TAB0                           = 0x0
 	TAB0                           = 0x0
 	TAB3                           = 0x4
 	TAB3                           = 0x4
 	TABDLY                         = 0x4
 	TABDLY                         = 0x4

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