Why version() ?
Anders F Björklund
afb at algonet.se
Thu Feb 12 03:42:08 PST 2009
Walter Bright wrote:
> I just don't think darwin is a good idea, as Apple doesn't even use it.
> See http://developer.apple.com/unix/index.html, where "darwin" is
> clearly second string. It looks like Apple is pushing aside "darwin" in
> favor of "OSX".
GDC uses the same GNU triplets as GCC and configure, with the "os" part.
(there's normally a cpu part, a vendor part, and a gnu part for linux)
So the version used would be similar to the powerpc-apple-darwin8 or
i686-apple-darwin9, or any of the other common variants on Mac OS X ?
Like powerpc-unknown-linux-gnu and i686-pc-linux-gnu for Linux, it is
usually the same as the uname(1) but in lower case (see config.guess)
http://cvs.savannah.gnu.org/viewvc/*checkout*/config/config/config.guess
These GNU triplets are also used when cross-compiling, for instance...
They're not identical to the GDC versions, but I prefer using "darwin".
The other common version(Unix) ones were:
linux, darwin, cygwin, freebsd, solaris
--anders
PS. uname(1) on cygwin is somewhat weird, like "CYGWIN_NT-5.1" or so.
And I think Solaris still returns "SunOS" for the system name...
More information about the Digitalmars-d
mailing list