diff mbox

Go patch committed: Update libgo to Go release r60

Message ID yddbou6tk5w.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Sept. 27, 2011, 9:21 a.m. UTC
Ian Lance Taylor <iant@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  <ro@CeBiTec.Uni-Bielefeld.DE>

	* mksysinfo.sh: Provide TIOCSCTTY if missing.

Comments

Ian Lance Taylor Sept. 27, 2011, 1:16 p.m. UTC | #1
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> 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  <ro@CeBiTec.Uni-Bielefeld.DE>
>
> 	* mksysinfo.sh: Provide TIOCSCTTY if missing.

Thanks.  I committed this patch, though I moved the new lines farther
down in the script next to the handling of the ioctl constants.

Ian
diff mbox

Patch

# 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 |