Squeak on MacOS version identification?

Ian Piumarta ian.piumarta at inria.fr
Wed Aug 20 20:14:06 UTC 2003


On Wed, 20 Aug 2003, Tim Rowledge wrote:

> It's a pity one can't get a reliable answer more like
> 'linux-gnu RedHat 7.1' but if we can't, we can't.

This would be (more or less) trivial to add at compile time.  (Figuring it
out at runtime would be trickier.  Not everyone has /etc/issue, and even
then figuring out how to fill in the wildcards would not be trivial.)  

However...

Knowing the distribution doesn't really make any sense.  (Nor does knowing
the kernel version, nor [for all reasonable intents] the libc version.)  
If you install a binary .rpm containing Squeak on your RHL system, why
does it matter to you at all that I compiled it on my Debian system?  (And
wouldn't it cause confusion if Squeak on your RHL system told you that
the os version was "Debian GNU/Linux testing/unstable"?)

What you get is "I'm linux" or "I'm darwin" or "I'm solaris" or "I'm bsd"
and so on, which tells you which standards sets you can expect to get at
(and in which libraries to look for them) via the FFI.  All Linux
distributions look pretty much the same to running code (unless you want
to grub about under /lib or /dev -- but you don't want to do that anyway.)  
*BSD is pretty much the same story (for some constant '*').  Darwin and
Solaris to a lesser extent, but in those cases (as with the BSDs) you have
the version number as part of your canonical os type to go from -- which
should be more than enough.

The current (Unix) setup for these attributes seems optimal.  Pending any
good logical arguments to the contrary, I see no reason to change it.

Ian



More information about the Squeak-dev mailing list