Version Identifiers for Platforms / Architectures not supported by DMD

Michel Fortin michel.fortin at michelf.com
Sun Nov 6 06:40:29 PST 2011


On 2011-11-06 04:04:22 +0000, Walter Bright <newshound2 at digitalmars.com> said:

> On 11/5/2011 2:07 PM, Jonathan M Davis wrote:
>> dmd's version identifiers are annoyingly variable (e.g. linux is camelcased,
>> whereas Windows is Pascal-cased and OSX is all uppercase).
> 
> What they do is follow the casing and spelling of the pre-defined 
> macros of the local C compiler.

I find this statement puzzling. According to 
<http://predef.sourceforge.net/preos.html>:

*  There's no OSX macro on OS X, just __APPLE__ and __MACH__.
*  There's no Solaris macro on Solaris, only 'sun' and '__sun'.
*  There's no Windows/Win32/Win64 macro on Windows, there's 
__WINDOWS__/_WIN32/_WIN64.
*  There's no FreeBSD macro on FreeBSD, instead you have __FreeBSD__.

Beside linux, I don't see any of the predefined version identifiers 
corresponding to the platform's standard C macros.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list