diff options
author | techknowlogick <matti@mdranta.net> | 2019-06-18 22:14:15 -0400 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-06-19 10:14:15 +0800 |
commit | 33ad5548002156f7fb7779870571600c0a181c85 (patch) | |
tree | 9d4269a2ea00fec152f462ffddffbeffba64ba2f /vendor/golang.org/x/sys/unix/mkpost.go | |
parent | b209531959104cb6d5a8079ec567386720f3aaf3 (diff) | |
download | gitea-33ad5548002156f7fb7779870571600c0a181c85.tar.gz gitea-33ad5548002156f7fb7779870571600c0a181c85.zip |
update go-git to v4.12.0 - fixes #7248 (#7249)
Diffstat (limited to 'vendor/golang.org/x/sys/unix/mkpost.go')
-rw-r--r-- | vendor/golang.org/x/sys/unix/mkpost.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/mkpost.go b/vendor/golang.org/x/sys/unix/mkpost.go index 9feddd00c4..4d5b531b50 100644 --- a/vendor/golang.org/x/sys/unix/mkpost.go +++ b/vendor/golang.org/x/sys/unix/mkpost.go @@ -42,6 +42,13 @@ func main() { log.Fatal(err) } + if goos == "aix" { + // Replace type of Atim, Mtim and Ctim by Timespec in Stat_t + // to avoid having both StTimespec and Timespec. + sttimespec := regexp.MustCompile(`_Ctype_struct_st_timespec`) + b = sttimespec.ReplaceAll(b, []byte("Timespec")) + } + // Intentionally export __val fields in Fsid and Sigset_t valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__val(\s+\S+\s+)}`) b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$3}")) @@ -96,6 +103,15 @@ func main() { cgoCommandRegex := regexp.MustCompile(`(cgo -godefs .*)`) b = cgoCommandRegex.ReplaceAll(b, []byte(replacement)) + // Rename Stat_t time fields + if goos == "freebsd" && goarch == "386" { + // Hide Stat_t.[AMCB]tim_ext fields + renameStatTimeExtFieldsRegex := regexp.MustCompile(`[AMCB]tim_ext`) + b = renameStatTimeExtFieldsRegex.ReplaceAll(b, []byte("_")) + } + renameStatTimeFieldsRegex := regexp.MustCompile(`([AMCB])(?:irth)?time?(?:spec)?\s+(Timespec|StTimespec)`) + b = renameStatTimeFieldsRegex.ReplaceAll(b, []byte("${1}tim ${2}")) + // gofmt b, err = format.Source(b) if err != nil { |