/usr/lib/smlnj/bin/.arch-n-opsys is in smlnj-runtime 110.78-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | #!/bin/sh
#
# .arch-n-opsys -- get architecture and system info
#
export PATH
PATH="/bin:/usr/bin"
case `uname -s` in
SunOS)
case `uname -r` in
4.*)
OPSYS=sunos
case `/usr/bin/arch` in
sun4) ARCH=sparc;;
*) exit 1;;
esac
;;
5.*)
OPSYS=solaris
case `uname -p` in
sparc) ARCH=sparc;;
*86) ARCH=x86;;
*) exit 1;;
esac
;;
*) exit 1;;
esac
;;
AIX)
OPSYS=aix
ARCH=ppc
;;
Darwin)
case `uname -p` in
powerpc)
ARCH=ppc
case `uname -r` in
9*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.5 Leopard
*) exit 1;;
esac;;
i386) ARCH=x86;
case `uname -r` in
9*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.5 Leopard
10*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.6 Snow Leopard
11*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.7 Lion
12*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.8 Mountain Lion
13*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.9 Mavericks
14*) OPSYS=darwin; HEAP_OPSYS=darwin ;; # MacOS X 10.10 Yosemite
*) exit 1;;
esac;;
esac
;;
Linux)
OPSYS=linux
case `uname -m` in
*86)
ARCH=x86
# we no longer support Linux before the 2.2 kernel.
case `uname -r` in
2.2.*) ;;
2.3.*) ;;
2.4.*) ;;
2.5.*) ;;
2.6.*) ;;
3.*) ;;
4.*) ;;
*) exit 1 ;;
esac
;;
# As long as we do not natively support the amd64 architecture,
# we should fallback to the x86 compatibility mode. --Stef
x86_64) ARCH=x86;;
ppc)
ARCH=ppc
case `uname -r` in
*osfmach*) OPSYS=mklinux ;;
*) ;;
esac
;;
*) exit 1;;
esac
;;
FreeBSD)
OPSYS=freebsd
HEAP_OPSYS=bsd
case `uname -m` in
*86) ARCH=x86;;
*) exit 1;;
esac
;;
NetBSD)
case `uname -r` in
1.*) exit 1;;
2.*) OPSYS=netbsd2;;
*) OPSYS=netbsd;;
esac
HEAP_OPSYS=bsd
case `uname -p` in
*86) ARCH=x86;;
powerpc) ARCH=ppc;;
sparc) ARCH=sparc;;
*) exit 1;;
esac
;;
OpenBSD)
OPSYS=openbsd
HEAP_OPSYS=bsd
case `uname -p` in
*86) ARCH=x86;;
powerpc) ARCH=ppc;;
*) exit 1;;
esac
;;
Windows_NT)
OPSYS=win32
case `uname -m` in
*86) ARCH=x86;;
*) exit 1;;
esac
;;
CYGWIN_NT*)
# If the environment variable SMLNJ_WINDOWS_RUNTIME is defined,
# then we use Win32 as the runtime environment.
if [ "$SMLNJ_WINDOWS_RUNTIME" != "" ]; then
OPSYS=win32
else
OPSYS=cygwin
fi
case `uname -m` in
*86) ARCH=x86;;
*) exit 1;;
esac
;;
*) exit 1;;
esac
if [ "$HEAP_OPSYS" = "" ]; then
HEAP_SUFFIX="$ARCH-$OPSYS"
else
HEAP_SUFFIX="$ARCH-$HEAP_OPSYS"
fi
if [ "$ALT_OPSYS" = "" ]; then
echo "ARCH=$ARCH; OPSYS=$OPSYS; HEAP_SUFFIX=$HEAP_SUFFIX"
else
echo "ARCH=$ARCH; OPSYS=$OPSYS; ALT_OPSYS=$ALT_OPSYS; HEAP_SUFFIX=$HEAP_SUFFIX"
fi
|