aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-11-21 01:03:55 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-11-21 01:03:55 +0000
commit025f56b7d3061631ce5210520beb0cb7d2764e47 (patch)
tree6734a4acb537947bc8cccc8a177934bfa35084e6
parentb69d4d4542d718e9010a71f0b05e20422b3f0d40 (diff)
downloadgcc-025f56b7d3061631ce5210520beb0cb7d2764e47.zip
gcc-025f56b7d3061631ce5210520beb0cb7d2764e47.tar.gz
gcc-025f56b7d3061631ce5210520beb0cb7d2764e47.tar.bz2
mksysinfo: use type aliases for time struct field types
Also fix a case where grep wasn't redirecting to /dev/null. Fixes golang/go#35713 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/208160 From-SVN: r278539
-rw-r--r--gcc/go/gofrontend/MERGE2
-rwxr-xr-xlibgo/mksysinfo.sh14
2 files changed, 8 insertions, 8 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 4eab78b..7050d78 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-245904ac148f15db530fb8d50f526c47d08024c5
+9cc7092b84c38d77d98ed856f1f613a6ca27122d
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index 488b223..bd2ba32 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -436,8 +436,8 @@ fi
timeval=`grep '^type _timeval ' gen-sysinfo.go`
timeval_sec=`echo $timeval | sed -n -e 's/^.*tv_sec \([^ ]*\);.*$/\1/p'`
timeval_usec=`echo $timeval | sed -n -e 's/^.*tv_usec \([^ ]*\);.*$/\1/p'`
-echo "type Timeval_sec_t $timeval_sec" >> ${OUT}
-echo "type Timeval_usec_t $timeval_usec" >> ${OUT}
+echo "type Timeval_sec_t = $timeval_sec" >> ${OUT}
+echo "type Timeval_usec_t = $timeval_usec" >> ${OUT}
echo $timeval | \
sed -e 's/type _timeval /type Timeval /' \
-e 's/tv_sec *[a-zA-Z0-9_]*/Sec Timeval_sec_t/' \
@@ -449,8 +449,8 @@ if test "$timespec" = ""; then
fi
timespec_sec=`echo $timespec | sed -n -e 's/^.*tv_sec \([^ ]*\);.*$/\1/p'`
timespec_nsec=`echo $timespec | sed -n -e 's/^.*tv_nsec \([^ ]*\);.*$/\1/p'`
-echo "type Timespec_sec_t $timespec_sec" >> ${OUT}
-echo "type Timespec_nsec_t $timespec_nsec" >> ${OUT}
+echo "type Timespec_sec_t = $timespec_sec" >> ${OUT}
+echo "type Timespec_nsec_t = $timespec_nsec" >> ${OUT}
echo $timespec | \
sed -e 's/^type ___timespec /type Timespec /' \
-e 's/^type _timespec /type Timespec /' \
@@ -461,8 +461,8 @@ timestruc=`grep '^type _timestruc_t ' gen-sysinfo.go || true`
if test "$timestruc" != ""; then
timestruc_sec=`echo $timestruc | sed -n -e 's/^.*tv_sec \([^ ]*\);.*$/\1/p'`
timestruc_nsec=`echo $timestruc | sed -n -e 's/^.*tv_nsec \([^ ]*\);.*$/\1/p'`
- echo "type Timestruc_sec_t $timestruc_sec" >> ${OUT}
- echo "type Timestruc_nsec_t $timestruc_nsec" >> ${OUT}
+ echo "type Timestruc_sec_t = $timestruc_sec" >> ${OUT}
+ echo "type Timestruc_nsec_t = $timestruc_nsec" >> ${OUT}
echo $timestruc | \
sed -e 's/^type _timestruc_t /type Timestruc /' \
-e 's/tv_sec *[a-zA-Z0-9_]*/Sec Timestruc_sec_t/' \
@@ -1126,7 +1126,7 @@ statfs=`grep '^type _statfs64 ' gen-sysinfo.go || true`
if test "$statfs" = ""; then
statfs=`grep '^type _statfs ' gen-sysinfo.go || true`
fi
-if ! echo "$statfs" | grep f_flags; then
+if ! echo "$statfs" | grep f_flags >/dev/null 2>&1; then
statfs=`echo "$statfs" | sed -e 's/f_spare \[4+1\]\([^ ;]*\)/f_flags \1; f_spare [3+1]\1/'`
fi
echo "$statfs" | sed -e 's/type _statfs64/type Statfs_t/' \