Xref: utzoo comp.sys.sgi:2648 comp.unix.ultrix:2388 comp.sys.mips:380 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ames.arc.nasa.gov!lamaster From: lamaster@ames.arc.nasa.gov (Hugh LaMaster) Newsgroups: comp.sys.sgi,comp.unix.ultrix,comp.sys.mips Subject: Re: Distinguishing "true" MIPS box from DECstation at compile time Message-ID: <38700@ames.arc.nasa.gov> Date: 22 Dec 89 01:00:23 GMT References: <89Dec15.145750est.2273@neat.cs.toronto.edu> <1300@uakari.primate.wisc.edu> <2103@odin.SGI.COM> Sender: usenet@ames.arc.nasa.gov Followup-To: comp.sys.sgi Organization: NASA - Ames Research Center Lines: 33 In article <2103@odin.SGI.COM> msc@sgi.com writes: >In article <89Dec15.145750est.2273@neat.cs.toronto.edu>, >Even though the system vendors don't define "feature ifdefs" you can write >your code as if you had them. You simply have to create a header that does >all the ugly stuff (like that in the rest of the referenced article) and >sets the appropriate "featuredefs". I agree with most of what is written here, but, I sure could use a standard way to determine from the shell what architecture of machine I am on. I wish, for example, that the "arch" command could be made universal, and would return a string which has 2 simple components. For example: sun3 sun4 decvax decmips sgimips (or whatever you want, as long as it is unique). BTW, I currently use if [] tests on files to guess, when something else is not available, but this doesn't work reliably because of differences in filesystem mounts, which optional software is loaded, etc. Hugh LaMaster, m/s 233-9, UUCP ames!lamaster NASA Ames Research Center ARPA lamaster@ames.arc.nasa.gov Moffett Field, CA 94035 Phone: (415)694-6117