aboutsummaryrefslogtreecommitdiff
path: root/bin/9c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-04 21:13:58 +0000
committerrsc <devnull@localhost>2005-01-04 21:13:58 +0000
commitead3e31153b4258073dd16f990e0bc1842646562 (patch)
tree1ccebd6d8b4e60166304135573c4f69ab36123b8 /bin/9c
parente9a569a96aa4b4b4f18a6d8ade511ee7812c30a6 (diff)
downloadplan9port-ead3e31153b4258073dd16f990e0bc1842646562.tar.gz
plan9port-ead3e31153b4258073dd16f990e0bc1842646562.tar.bz2
plan9port-ead3e31153b4258073dd16f990e0bc1842646562.zip
9c: ignore autolib symbols
9l: use autolib symbols
Diffstat (limited to 'bin/9c')
-rwxr-xr-xbin/9c16
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/9c b/bin/9c
index cc6ec8ed..cbd67ce9 100755
--- a/bin/9c
+++ b/bin/9c
@@ -27,7 +27,7 @@ case "$tag" in
cflags="$ngflags -g3 -no-cpp-precomp" ;;
*HP-UX*) cc=cc; cflags="-g -O -c -Ae" ;;
*Linux*) usegcc
- case "`uname -r`" in
+ case "${SYSVERSION:-`uname -r`}" in
2.6.*)
cflags="$cflags -D__Linux26__"
;;
@@ -53,12 +53,20 @@ case "$tag" in
exit 1
esac
+# N.B. Must use temp file to avoid pipe; pipe loses status.
+xtmp=/tmp/9c.$$.$USER.out
+status=x
case "$tag" in
*SunOS*-cc)
- exec $cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" 2>&1 |
+ $cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" 2>&1 |
/bin/sed 's/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' 1>&2
+ status=$?
;;
*)
- exec $cc -DPLAN9PORT -I$PLAN9/include $cflags "$@"
+ $cc -DPLAN9PORT -I$PLAN9/include $cflags "$@"
+ status=$?
;;
-esac
+esac >$xtmp 2>&1
+grep -v '__p9l_autolib_' $xtmp
+rm -f $xtmp
+exit $status