/bin/true

Doug Gwyn gwyn at brl-smoke.ARPA
Sun May 4 05:23:07 AEST 1986


In article <469 at ncr-sd.UUCP> greg at ncr-sd.UUCP (Greg Noel) writes:
>... if you add a new machine type,
>you have to put in a link on every machine in the world.

No, just on the development machines containing code for that
machine type.  In particular, "elif" won't evaluate the new
machine-type command if an earlier instance is satisfied.

>A better scheme
>would have been a single command, say "machid", that only consisted of the
>command "echo gould".  Then, the usual sequence of:
>...
>(an exageration, admittedly, but do \you/ have links for all those machines?)

Most of them..

>becomes:
>	case `machid` in
>	pdp11)	... ;;
>...
>	*)	echo "I don't know how to handle machine-type `machid`" ;;
>	esac

I agree that this is a better approach; `uname -m` is supposed
to return a machine-type string like that.  However, AT&T did
their usual number on "uname" and various vendors were left with
no guidance as to the correct meaning of the various fields.
Usually they put out useless garbage for `uname -m` instead of
the desired generic machine type.

N.B. The same machine type should be pre#defined by CPP.



More information about the Comp.unix mailing list