on sparc-linux, the TIOCNOTTY and TIOCSCTTY constants are defined as
#define TIOCNOTTY _IO('t', 113)
which cannot be parsed by mksysinfo.sh. Just define these as TIOCGWINSZ is
defined. This lets the libgo build succeed, but I see the same failures as
reported in PR52084 for powerpc-linux-gnu.
Matthias
Index: libgo/mksysinfo.sh
===================================================================
--- libgo/mksysinfo.sh (revision 183830)
+++ libgo/mksysinfo.sh (working copy)
@@ -101,6 +101,12 @@
#ifdef TIOCGWINSZ
TIOCGWINSZ_val = TIOCGWINSZ,
#endif
+#ifdef TIOCNOTTY
+ TIOCNOTTY_val = TIOCNOTTY,
+#endif
+#ifdef TIOCSCTTY
+ TIOCSCTTY_val = TIOCSCTTY,
+#endif
};
EOF
@@ -615,6 +621,16 @@
echo 'const TIOCGWINSZ = _TIOCGWINSZ_val' >> ${OUT}
fi
fi
+if ! grep '^const TIOCNOTTY' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TIOCNOTTY_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TIOCNOTTY = _TIOCNOTTY_val' >> ${OUT}
+ fi
+fi
+if ! grep '^const TIOCSCTTY' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TIOCSCTTY_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TIOCSCTTY = _TIOCSCTTY_val' >> ${OUT}
+ fi
+fi
# The ioctl flags for terminal control
grep '^const _TC[GS]ET' gen-sysinfo.go | \