diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-27 13:16:22 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-27 13:16:22 +0000 |
commit | 3019bbaeb3c0156d6e9ca646850a99054963301a (patch) | |
tree | 58257e9d73cd408fbfc539a5a762ba0fd0e89e6c | |
parent | 0578e4172d07f7aeb5de476d57e74f6812596ad1 (diff) | |
download | gcc-3019bbaeb3c0156d6e9ca646850a99054963301a.zip gcc-3019bbaeb3c0156d6e9ca646850a99054963301a.tar.gz gcc-3019bbaeb3c0156d6e9ca646850a99054963301a.tar.bz2 |
mksysinfo: Fix for systems that don't define TIOCSCTTY.
From Rainer Orth.
From-SVN: r179269
-rwxr-xr-x | libgo/mksysinfo.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index 2b5acd6..85dd33c 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -499,6 +499,14 @@ grep '^type _passwd ' gen-sysinfo.go | \ grep '^const _TIOC' gen-sysinfo.go | \ sed -e 's/^\(const \)_\(TIOC[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} +# 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 + # The nlmsghdr struct. grep '^type _nlmsghdr ' gen-sysinfo.go | \ sed -e 's/_nlmsghdr/NlMsghdr/' \ |