summaryrefslogtreecommitdiff
path: root/devel/bmake/files/os.sh
diff options
context:
space:
mode:
Diffstat (limited to 'devel/bmake/files/os.sh')
-rw-r--r--devel/bmake/files/os.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/devel/bmake/files/os.sh b/devel/bmake/files/os.sh
index 545986b2da7..487ebfb943e 100644
--- a/devel/bmake/files/os.sh
+++ b/devel/bmake/files/os.sh
@@ -17,7 +17,7 @@
# Simon J. Gerraty <sjg@crufty.net>
# RCSid:
-# $Id: os.sh,v 1.1.1.5 2010/04/20 13:32:18 joerg Exp $
+# $Id: os.sh,v 1.1.1.6 2010/09/07 14:11:15 joerg Exp $
#
# @(#) Copyright (c) 1994 Simon J. Gerraty
#
@@ -41,6 +41,12 @@ OSMAJOR=`IFS=.; set $OSREL; echo $1`
MACHINE=`uname -m`
MACHINE_ARCH=`uname -p 2>/dev/null || echo $MACHINE`
+# there is at least one case of `uname -p` outputting
+# a bunch of usless drivel
+case "$MACHINE_ARCH" in
+*[!A-Za-z0-9_-]*) MACHINE_ARCH="$MACHINE";;
+esac
+
# we need this here, and it is not always available...
Which() {
case "$1" in