Predefined Version Identifier on Linux

Anders F Björklund afb at algonet.se
Wed Mar 28 06:06:55 PDT 2007


Daniel Keep wrote:

> The real reason Walter did this is because he's trying to discourage
> people from writing non-portable code.  He probably figures that it he
> makes every single platform identifier different in some subtle,
> non-predictable manner, people will get sick of it and just write
> portable code in the first place.

Fortunately the other platforms are all lowercase:
- linux
- freebsd
- cygwin
- mingw32
- darwin
- solaris
- skyos

And you can use version( Unix ) for all of those...

> Coming soon: version( MACos_X )!
> </joke>
> 
> Sorry.  I haven't had the opportunity to annoy anyone today, and I just
> watched House.  Baaaad combination...  ;)

There already is a version (MacOSX) in use in dAllegro.

HHOS.

--anders



More information about the Digitalmars-d mailing list