aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2021-02-18 20:21:24 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2021-02-18 20:21:24 +0100
commit181d56ee64da53279bb6ecf49c24ab54cfb7193f (patch)
treefc6c8736bb97790a257c5514998c583ffce7c41c /bin
parent94c521bf102a74aec7e1a5c3a9ef5eaa968d4e14 (diff)
parent90971376a5e8620fc62579aa1b3be26245ec8c06 (diff)
downloadplan9port-master.tar.gz
plan9port-master.tar.bz2
plan9port-master.zip
Merge remote-tracking branch 'upstream/master'HEADmaster
Diffstat (limited to 'bin')
-rwxr-xr-xbin/9a21
-rwxr-xr-xbin/9c24
-rwxr-xr-xbin/9l12
-rwxr-xr-xbin/mount3
-rwxr-xr-xbin/wintext23
5 files changed, 18 insertions, 65 deletions
diff --git a/bin/9a b/bin/9a
deleted file mode 100755
index 753797c8..00000000
--- a/bin/9a
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-if [ $# != 1 ]; then
- echo 'usage: 9a file.s' 1>&2
- exit 1
-fi
-
-test -f $PLAN9/config && . $PLAN9/config
-
-aflags=""
-case "`uname`-${OBJTYPE:-`uname -m`}" in
-Darwin-*386*)
- aflags="-arch i386"
- ;;
-Darwin-*x86_64*)
- aflags="-arch x86_64"
- ;;
-esac
-
-out=`echo $1 | sed 's/\.s$//;s/$/.o/'`
-exec as $aflags -o $out $1
diff --git a/bin/9c b/bin/9c
index 59adda7f..63840b19 100755
--- a/bin/9c
+++ b/bin/9c
@@ -26,10 +26,6 @@ usegcc()
# that option only works with gcc3+ it seems
cflags="$cflags -ggdb"
cflags="$cflags $CC9FLAGS"
- case "$cflags" in
- *sanitize=address*)
- cflags="$cflags -DPLAN9PORT_ASAN"
- esac
}
quiet()
@@ -83,14 +79,10 @@ useclang()
-Wno-unneeded-internal-declaration \
-fsigned-char \
-fno-caret-diagnostics \
+ -fcommon \
"
cflags="$cflags -g"
cflags="$cflags $CC9FLAGS"
-
- case "$cflags" in
- *sanitize=address*)
- cflags="$cflags -DPLAN9PORT_ASAN"
- esac
}
usexlc()
@@ -111,24 +103,14 @@ usexlc()
cflags="$cflags $CC9FLAGS"
}
-tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}-${CC9:-cc}"
+tag="${SYSNAME:-`uname`}-${CC9:-cc}"
case "$tag" in
*DragonFly*gcc*|*BSD*gcc*) usegcc ;;
*DragonFly*clang|*BSD*clang*) useclang ;;
-*Darwin-x86_64*)
+*Darwin*)
useclang
cflags="$cflags -g3 -m64"
;;
-*Darwin-arm64*)
- useclang
- cflags="$cflags -g3 -m64"
- ;;
-*Darwin*clang*)
- useclang
- cflags="$cflags -g3 -m32"
- ;;
-*Darwin*) usegcc
- cflags="$cflags -g3 -no-cpp-precomp -m32" ;;
*HP-UX*) cc=${CC9:-cc}; cflags="-g -O -c -Ae" ;;
*Linux*) usegcc
case "${CC9:-gcc}" in
diff --git a/bin/9l b/bin/9l
index f6eb0ba1..abca55fc 100755
--- a/bin/9l
+++ b/bin/9l
@@ -9,7 +9,7 @@ verbose=false
nmflags=""
extralibs="-lm"
-tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}"
+tag="${SYSNAME:-`uname`}"
case "$tag" in
*DragonFly*|*BSD*)
ld="${CC9:-gcc} $CC9FLAGS"
@@ -27,14 +27,8 @@ case "$tag" in
userpath=true
extralibs="$extralibs -lutil -lresolv -lpthread"
;;
-*Darwin*x86_64*)
- ld="${CC9:-gcc} -m64 $CC9FLAGS"
- ;;
-*Darwin-arm64*)
- ld="${CC9:-gcc} -m64 $CC9FLAGS"
- ;;
*Darwin*)
- ld="${CC9:-gcc} -m32 $CC9FLAGS"
+ ld="${CC9:-gcc} -m64 $CC9FLAGS"
;;
*SunOS*)
ld="${CC9:-cc} -g $CC9FLAGS"
@@ -255,7 +249,7 @@ then
fi
# Don't say -L with a non-existent directory: Xcode complains.
# x86_64 seems to put its 64-bit libraries in lib64.
- if [ "${OBJTYPE:-`uname -m`}" = "x86_64" -a -d "$X11/lib64" ]
+ if [ "`uname -m`" = "x86_64" -a -d "$X11/lib64" ]
then
libsl="$libsl -L$X11/lib64"
fi
diff --git a/bin/mount b/bin/mount
index 0fbb1bfd..e29cc201 100755
--- a/bin/mount
+++ b/bin/mount
@@ -20,11 +20,14 @@ case FreeBSD
echo 'don''t know how to mount (no fuse)' >[1=2]
case Darwin
version=`{sw_vers -productVersion|cut -d. -f1,2}
+ major_version = `{echo $version|cut -d. -f1}
if(sysctl fuse.version >[2]/dev/null |9 grep -si 'fuse.version' ||
sysctl macfuse.version.number >[2]/dev/null |9 grep -si 'fuse.version' ||
sysctl osxfuse.version.number >[2]/dev/null |9 grep -si 'fuse.version' ||
test -d /System/Library/Extensions/fusefs.kext ||
test -d /Library/Filesystems/osxfuse.fs/Contents/Extensions/$version/osxfuse.kext ||
+ test -d /Library/Filesystems/macfuse.fs/Contents/Extensions/$version/macfuse.kext ||
+ test -d /Library/Filesystems/macfuse.fs/Contents/Extensions/$major_version/macfuse.kext ||
test -d /Library/Filesystems/osxfusefs.fs/Support/osxfusefs.kext ||
test -d /opt/local/Library/Filesystems/osxfuse.fs ||
test -d /Library/Filesystems/fusefs.fs/Support/fusefs.kext)
diff --git a/bin/wintext b/bin/wintext
index 80a89957..1f36a05c 100755
--- a/bin/wintext
+++ b/bin/wintext
@@ -1,22 +1,17 @@
-#!/bin/bash
+#!/usr/local/plan9/bin/rc
-case "$winid" in
-[0-9]*)
+if(~ $winid [0-9]*) {
9p read acme/$winid/body
exit 0
-esac
-
-case "$text9term" in
-unix!*)
- dial -e $text9term </dev/null
+}
+if(~ $text9term 'unix!'*) {
+ dial -e $text9term < /dev/null
exit 0
-esac
-
-case "$TMUX" in
-?*)
+}
+if(~ $TMUX ?*) {
tmux capture-pane -p
exit 0
-esac
+}
-echo 'no running window found' 2>&1
+echo 'no running window found' >[2=1]
exit 1