diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-10 19:51:24 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-10 19:51:24 +0000 |
commit | bbb31a1d5c53076fec251945ae5a500a3e973275 (patch) | |
tree | 273fb8b6b872d8a995d3a0bc4552ee862e3691c4 /libgo/mksysinfo.sh | |
parent | 9a004410d9f64d658864a899ab911ae9a31c444c (diff) |
os, syscall: handle _st_timespec for AIX stat
Reviewed-on: https://go-review.googlesource.com/87197
From-SVN: r256450
Diffstat (limited to 'libgo/mksysinfo.sh')
-rwxr-xr-x | libgo/mksysinfo.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index c3495de72f6..35ce1410ac0 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -443,6 +443,12 @@ grep '^type _tms ' gen-sysinfo.go | \ -e 's/tms_cstime/Cstime/' \ >> ${OUT} +# AIX uses st_timespec struct for stat. +grep '^type _st_timespec ' gen-sysinfo.go | \ + sed -e 's/type _st_timespec /type StTimespec /' \ + -e 's/tv_sec/Sec/' \ + -e 's/tv_nsec/Nsec/' >> ${OUT} + # The stat type. # Prefer largefile variant if available. stat=`grep '^type _stat64 ' gen-sysinfo.go || true` @@ -467,7 +473,7 @@ fi | sed -e 's/type _stat64/type Stat_t/' \ -e 's/st_ctim/Ctim/' \ -e 's/\([^a-zA-Z0-9_]\)_timeval\([^a-zA-Z0-9_]\)/\1Timeval\2/g' \ -e 's/\([^a-zA-Z0-9_]\)_timespec_t\([^a-zA-Z0-9_]\)/\1Timespec\2/g' \ - -e 's/\([^a-zA-Z0-9_]\)_st_timespec_t\([^a-zA-Z0-9_]\)/\1Timespec\2/g' \ + -e 's/\([^a-zA-Z0-9_]\)_st_timespec_t\([^a-zA-Z0-9_]\)/\1StTimespec\2/g' \ -e 's/\([^a-zA-Z0-9_]\)_timespec\([^a-zA-Z0-9_]\)/\1Timespec\2/g' \ -e 's/\([^a-zA-Z0-9_]\)_timestruc_t\([^a-zA-Z0-9_]\)/\1Timestruc\2/g' \ -e 's/Godump_[0-9] struct { \([^;]*;\) };/\1/g' \ |