mirror of
https://github.com/golang/sys.git
synced 2026-02-08 03:36:03 +03:00
unix: correctly rename Val member in Sigset_t on freebsd
The generated name X__bits should be changed to Val to match the type on Linux. This was done manually in CL 179099 when Sigset_t was added for freebsd. Modify mkpost.go to do it, so future changes won't revert the rename. Change-Id: I0ce135cbd8d03648a1576244d9c977b39c8f5889 Reviewed-on: https://go-review.googlesource.com/c/sys/+/183220 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
bf70e46780
commit
06bbe82148
@@ -50,8 +50,8 @@ func main() {
|
||||
}
|
||||
|
||||
// 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}"))
|
||||
valRegex := regexp.MustCompile(`type (Fsid|Sigset_t) struct {(\s+)X__(bits|val)(\s+\S+\s+)}`)
|
||||
b = valRegex.ReplaceAll(b, []byte("type $1 struct {${2}Val$4}"))
|
||||
|
||||
// Intentionally export __fds_bits field in FdSet
|
||||
fdSetRegex := regexp.MustCompile(`type (FdSet) struct {(\s+)X__fds_bits(\s+\S+\s+)}`)
|
||||
|
||||
Reference in New Issue
Block a user