"log"
"os"
"regexp"
+ "strings"
)
func main() {
re = regexp.MustCompile("Pad_cgo[A-Za-z0-9_]*")
s = re.ReplaceAllString(s, "_")
+ // We want to keep X__val in Fsid. Hide it and restore it later.
+ s = strings.Replace(s, "X__val", "MKPOSTFSIDVAL", 1)
+
// Replace other unwanted fields with blank identifiers.
re = regexp.MustCompile("X_[A-Za-z0-9_]*")
s = re.ReplaceAllString(s, "_")
+ // Restore X__val in Fsid.
+ s = strings.Replace(s, "MKPOSTFSIDVAL", "X__val", 1)
+
// Force the type of RawSockaddr.Data to [14]int8 to match
// the existing gccgo API.
re = regexp.MustCompile("(Data\\s+\\[14\\])uint8")