From e947a5a4bfcb144a61cd752cc8ff2fef6b7b01cf Mon Sep 17 00:00:00 2001 From: ian Date: Tue, 13 Mar 2012 20:56:23 +0000 Subject: PR go/52557 mksysinfo: Fix handling of timex for ARM GNU/Linux. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185354 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgo/mksysinfo.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'libgo') diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index e5f3066e26a..6d33e6cfb70 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -834,7 +834,15 @@ fi | sed -e 's/type _statfs64/type Statfs_t/' \ >> ${OUT} # The timex struct. -grep '^type _timex ' gen-sysinfo.go | \ +timex=`grep '^type _timex ' gen-sysinfo.go || true` +if test "$timex" = ""; then + timex=`grep '^// type _timex ' gen-sysinfo.go || true` + if test "$timex" != ""; then + timex=`echo $timex | sed -e 's|// ||' -e 's/INVALID-bit-field/int32/g'` + fi +fi +if test "$timex" != ""; then + echo "$timex" | \ sed -e 's/_timex/Timex/' \ -e 's/modes/Modes/' \ -e 's/offset/Offset/' \ @@ -858,6 +866,7 @@ grep '^type _timex ' gen-sysinfo.go | \ -e 's/tai/Tai/' \ -e 's/_timeval/Timeval/' \ >> ${OUT} +fi # The rlimit struct. grep '^type _rlimit ' gen-sysinfo.go | \ -- cgit v1.2.1