-bce8720d4eb662f31026e9c7be6ce4d0aeb4ae3b
+87525458bcd5ab4beb5b95e7d58e3dfdbc1bd478
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
sysinfo.go: s-sysinfo; @true
s-sysinfo: $(srcdir)/mksysinfo.sh gen-sysinfo.go errno.i
- GOOS=$(GOOS) $(SHELL) $(srcdir)/mksysinfo.sh
+ GOARCH=$(GOARCH) GOOS=$(GOOS) $(SHELL) $(srcdir)/mksysinfo.sh
$(SHELL) $(srcdir)/mvifdiff.sh tmp-sysinfo.go sysinfo.go
$(STAMP) $@
sysinfo.go: s-sysinfo; @true
s-sysinfo: $(srcdir)/mksysinfo.sh gen-sysinfo.go errno.i
- GOOS=$(GOOS) $(SHELL) $(srcdir)/mksysinfo.sh
+ GOARCH=$(GOARCH) GOOS=$(GOOS) $(SHELL) $(srcdir)/mksysinfo.sh
$(SHELL) $(srcdir)/mvifdiff.sh tmp-sysinfo.go sysinfo.go
$(STAMP) $@
fi
# The rlimit struct.
-grep '^type _rlimit ' gen-sysinfo.go | \
- sed -e 's/_rlimit/Rlimit/' \
+# On systems that use syscall/libcall_posix_largefile.go, use rlimit64
+# if it exists.
+rlimit="_rlimit"
+if test "${GOOS}" = "aix" || test "${GOOS}" = "linux" || (test "${GOOS}" = "solaris" && (test "${GOARCH}" = "386" || test "${GOARCH}" = "sparc")); then
+ if grep '^type _rlimit64 ' gen-sysinfo.go > /dev/null 2>&1; then
+ rlimit="_rlimit64"
+ fi
+fi
+grep "^type ${rlimit} " gen-sysinfo.go | \
+ sed -e "s/${rlimit}/Rlimit/" \
-e 's/rlim_cur/Cur/' \
-e 's/rlim_max/Max/' \
>> ${OUT}
grep '^const _RLIMIT_' gen-sysinfo.go |
sed -e 's/^\(const \)_\(RLIMIT_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
grep '^const _RLIM_' gen-sysinfo.go |
+ grep -v '^const _RLIM_INFINITY ' |
sed -e 's/^\(const \)_\(RLIM_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
+if test "${rlimit}" = "_rlimit64" && grep '^const _RLIM64_INFINITY ' gen-sysinfo.go > /dev/null 2>&1; then
+ echo 'const RLIM_INFINITY = _RLIM64_INFINITY' >> ${OUT}
+elif grep '^const _RLIM_INFINITY ' gen-sysinfo-go; then
+ echo 'const RLIM_INFINITY = _RLIM_INFINITY' >> ${OUT}
+fi
# The sysinfo struct.
grep '^type _sysinfo ' gen-sysinfo.go | \