Ian Lance Taylor <i...@google.com> writes: >> * IRIX will be worse: while it has TIOCNOTTY, it completely lacks >> TIOCSCTTY. >> >> Suggestions? > > For a missing TIOCSCTTY I think the simplest solution will be to set it > in syscall_irix.go to some innocuous value if there is one. E.g., > TIOCNXCL if Irix supports that. If there is no innocuous value, let's > just set it to 0 and test for 0 in exec.go before calling ioctl. > > Similarly, if we can't get TIOCNOTTY defined in sysinfo.go, then I think > it's OK to just define it directly in syscall_irix.go and > syscall_solaris.go. Those values are not going to change with different > versions of the OS.
Solaris 8 and 9 suffer from the same problem. The following patch allowed the bootstrap to complete. An IRIX bootstrap is currently running, but will take some time to complete. Rainer 2011-09-23 Rainer Orth <r...@cebitec.uni-bielefeld.de> * mksysinfo.sh: Provide TIOCSCTTY if missing.
# HG changeset patch # Parent 21e21dc50e4922988dbec99e0b0c0eea4205e59b Provide TIOCSCTTY on IRIX 6 diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -193,6 +193,14 @@ if ! grep '^const EPOLLRDHUP' ${OUT} >/d echo "const EPOLLRDHUP = 0x2000" >> ${OUT} fi +# ioctl constants. Might fall back to 0 if TIOCNXCL is missing, too, but +# needs handling in syscalls.exec.go. +if ! grep '^const _TIOCSCTTY ' gen-sysinfo.go >/dev/null 2>&1; then + if grep '^const _TIOCNXCL ' gen-sysinfo.go >/dev/null 2>&1; then + echo "const TIOCSCTTY = TIOCNXCL" >> ${OUT} + fi +fi + # Ptrace constants. We don't expose all the PTRACE flags, just the # PTRACE_O_xxx and PTRACE_EVENT_xxx ones. grep '^const _PTRACE_O' gen-sysinfo.go |
-- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University