OSDN Git Service

mksysinfo.sh: Fix handling of glibc 2.16 bits/resource.h.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Jul 2012 11:14:15 +0000 (11:14 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Jul 2012 11:14:15 +0000 (11:14 +0000)
From Jakub Jelinek.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@189373 138bc75d-0d04-0410-961f-82ee72b054a4

libgo/mksysinfo.sh

index 6fe0403..3955344 100755 (executable)
@@ -522,10 +522,10 @@ grep '^const _DT_' gen-sysinfo.go |
 # The rusage struct.
 rusage=`grep '^type _rusage struct' gen-sysinfo.go`
 if test "$rusage" != ""; then
-  rusage=`echo $rusage | sed -e 's/type _rusage struct //' -e 's/[{}]//g'`
-  rusage=`echo $rusage | sed -e 's/^ *//'`
   # Remove anonymous unions from GNU/Linux <bits/resource.h>.
   rusage=`echo $rusage | sed -e 's/Godump_[0-9]* struct {\([^}]*\)};/\1/g'`
+  rusage=`echo $rusage | sed -e 's/type _rusage struct //' -e 's/[{}]//g'`
+  rusage=`echo $rusage | sed -e 's/^ *//'`
   nrusage=
   while test -n "$rusage"; do
     field=`echo $rusage | sed -e 's/^\([^;]*\);.*$/\1/'`