From a69222633cb440d6253927a4ce762a9084906dd6 Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 22 Apr 2012 19:26:01 +0000 Subject: mksysinfo: Define more structs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186683 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgo/mksysinfo.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'libgo') diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index e49056d0eb2..ed57ee14b63 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -785,6 +785,22 @@ grep '^type _rtattr ' gen-sysinfo.go | \ -e 's/rta_type/Type/' \ >> ${OUT} +# The in_pktinfo struct. +grep '^type _in_pktinfo ' gen-sysinfo.go | \ + sed -e 's/_in_pktinfo/Inet4Pktinfo/' \ + -e 's/ipi_ifindex/Ifindex/' \ + -e 's/ipi_spec_dst/Spec_dst/' \ + -e 's/ipi_addr/Addr/' \ + >> ${OUT} + +# The in6_pktinfo struct. +grep '^type _in6_pktinfo ' gen-sysinfo.go | \ + sed -e 's/_in6_pktinfo/Inet6Pktinfo/' \ + -e 's/ipi6_addr/Addr/' \ + -e 's/ipi6_ifindex/Ifindex/' \ + -e 's/_in6_addr/[16]byte/' \ + >> ${OUT} + # The termios struct. grep '^type _termios ' gen-sysinfo.go | \ sed -e 's/_termios/Termios/' \ @@ -962,6 +978,29 @@ grep '^type _sock_fprog ' gen-sysinfo.go | \ grep '^const _BPF_' gen-sysinfo.go | \ sed -e 's/^\(const \)_\(BPF_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} +# The GNU/Linux nlattr struct. +grep '^type _nlattr ' gen-sysinfo.go | \ + sed -e 's/_nlattr/NlAttr/' \ + -e 's/nla_len/Len/' \ + -e 's/nla_type/Type/' \ + >> ${OUT} + +# The GNU/Linux nlmsgerr struct. +grep '^type _nlmsgerr ' gen-sysinfo.go | \ + sed -e 's/_nlmsgerr/NlMsgerr/' \ + -e 's/error/Error/' \ + -e 's/msg/Msg/' \ + >> ${OUT} + +# The GNU/Linux rtnexthop struct. +grep '^type _rtnexthop ' gen-sysinfo.go | \ + sed -e 's/_rtnexthop/RtNexthop/' \ + -e 's/rtnh_len/Len/' \ + -e 's/rtnh_flags/Flags/' \ + -e 's/rtnh_hops/Hops/' \ + -e 's/rtnh_ifindex/Ifindex/' \ + >> ${OUT} + # The GNU/Linux netlink flags. grep '^const _NETLINK_' gen-sysinfo.go | \ sed -e 's/^\(const \)_\(NETLINK_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} @@ -970,6 +1009,17 @@ grep '^const _NETLINK_' gen-sysinfo.go | \ grep '^const _PACKET_' gen-sysinfo.go | \ sed -e 's/^\(const \)_\(PACKET_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} +# The GNU/Linux inotify_event struct. +grep '^type _inotify_event ' gen-sysinfo.go | \ + sed -e 's/_inotify_event/InotifyEvent/' \ + -e 's/wd/Wd/' \ + -e 's/mask/Mask/' \ + -e 's/cookie/Cookie/' \ + -e 's/len/Len/' \ + -e 's/name/Name/' \ + -e 's/\[\]/[0]/' \ + >> ${OUT} + # The Solaris 11 Update 1 _zone_net_addr_t struct. grep '^type _zone_net_addr_t ' gen-sysinfo.go | \ sed -e 's/_in6_addr/[16]byte/' \ -- cgit v1.2.1