X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/6e2b4ccc44cc0e84337b9b74479c347985edab1c..1bd642c265dae5643f16d023879043b7576f66a9:/src/scripts/os-type diff --git a/src/scripts/os-type b/src/scripts/os-type index 31b5bfcd7..a188c4a56 100755 --- a/src/scripts/os-type +++ b/src/scripts/os-type @@ -1,5 +1,4 @@ #! /bin/sh -# $Cambridge: exim/src/scripts/os-type,v 1.2 2005/02/17 10:04:41 ph10 Exp $ # Shell script to determine the operating system type. Some of the heuristics # herein have accumulated over the years and may not strictly be needed now, @@ -23,7 +22,8 @@ case "$os" in '') os=`uname -s`;; esac # Identify Glibc systems under different names. -case "$os" in GNU|GNU/*|Linux) os=Linux;; esac +case "$os" in GNU) os=GNU;; esac +case "$os" in GNU/*|Linux) os=Linux;; esac # It is believed that all systems respond to uname -s, but just in case # there is one that doesn't, use the shell's $OSTYPE variable. It is known @@ -82,6 +82,7 @@ linux) os=Linux;; linux-*) os=Linux;; Linux-*) os=Linux;; netbsd*) os=NetBSD;; +NetBSD*) os=NetBSD;; openbsd*) os=OpenBSD;; osf1) os=OSF1;; qnx*) os=QNX;; @@ -124,22 +125,11 @@ SunOS5) case `uname -m` in esac ;; -# In the case of Linux we need to distinguish which libc is used. -# This is more cautious than it needs to be. In practice libc5 will always -# be a symlink, and libc6 will always be a linker control file, but it's -# easy enough to do a better check, and check the symlink destination or the -# control file contents and make sure. - -Linux) if [ -L /usr/lib/libc.so ]; then - if [ x"$(file /usr/lib/libc.so | grep "libc.so.5")"x != xx ]; then - os=Linux-libc5 - fi - else - if grep -q libc.so.5 /usr/lib/libc.so; then - os=Linux-libc5 - fi - fi - ;; +# In the case of Linux we used to distinguish which libc was used so that +# the old libc5 was supported as well as the current glibc. This support +# was giving some people problems, so it was removed in June 2005, under +# the assumption that nobody would be using libc5 any more (it is over seven +# years old). # In the case of NetBSD we need to distinguish between a.out, ELF # and COFF binary formats. However, a.out and COFF are the same @@ -149,9 +139,9 @@ Linux) if [ -L /usr/lib/libc.so ]; then # ELF soon. NetBSD) if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ ; then - # Non-ELF system - os="NetBSD-a.out" - fi + # Non-ELF system + os="NetBSD-a.out" + fi ;; esac