On Fri, 14 Mar 2014 08:51:05 -0000, 1100110 <0b1100...@gmail.com> wrote:
version (X86 || X86_64 || PPC || PPC64 || ARM || AArch64) { enum RTLD_LAZY = 0x00001; enum RTLD_NOW = 0x00002; enum RTLD_GLOBAL = 0x00100; enum RTLD_LOCAL = 0x00000; } else version (MIPS32) { enum RTLD_LAZY = 0x0001; enum RTLD_NOW = 0x0002; enum RTLD_GLOBAL = 0x0004; enum RTLD_LOCAL = 0; }
Walter's point, I believe, is that you should define a meaningful version identifier for each specific case, and that this is "better" because then you're less concerned about where it's supported and more concerned with what it is which is/isn't supported.
Maintenance is very slightly better too, IMO, because you add/remove/alter a complete line rather than editing a set of || && etc which can in some cases be a little confusing. Basically, the chance of an error is very slightly lower.
For example, either this: version(X86) version = MeaningfulVersion version(X86_64) version = MeaningfulVersion version(PPC) version = MeaningfulVersion version(PPC64) version = MeaningfulVersion version(ARM) version = MeaningfulVersion version(AArch64) version = MeaningfulVersion version(MeaningfulVersion) { } else version (MIPS32) { } or this: version (X86) version = MeaningfulVersion version (X86_64) version = MeaningfulVersion version (PPC) version = MeaningfulVersion version (PPC64) version = MeaningfulVersion version (ARM) version = MeaningfulVersion version (AArch64) version = MeaningfulVersion version (MIPS32) version = OtherMeaningfulVersion version (MeaningfulVersion) { } else version (OtherMeaningfulVersion) { } Regan -- Using Opera's revolutionary email client: http://www.opera.com/mail/