version and debug statements

Sean Kelly sean at f4.ca
Fri May 12 09:15:38 PDT 2006


Bruno Medeiros wrote:
> Sean Kelly wrote:
>> Anders F Björklund wrote:
>>> Walter Bright wrote:
>>>
>>>>> I'm still naively hoping for both of "version (Unix)"
>>>>
>>>> DMD supports Windows and Linux; Unix is neither. For a compiler 
>>>> which targets the Unix operating system, it should set the Unix 
>>>> version.
>>>
>>> It does... I was just hoping to be able to use the same code for both ?
>>>
>>> GDC has chosen "Unix" as the name for all of them, while Ares uses 
>>> "Posix". The naming doesn't matter as much, as long as it is defined.
>>
>> For what it's worth, I chose "Posix" because it refers to the API 
>> rather than to a subset of systems that support that API.  But I agree 
>> that both are sufficiently general that they could be considered 
>> equivalent.
> 
> Are they (equivalent)? How about Cygwin which "is a DLL implementing 
> most of the POSIX API on top of Windows". Does it count as Unix? How can 
> this fit into D's (current or alternative) versioning scheme of things?

I suppose that depends what "Unix" means to you.  Windows also has a 
Posix subsystem, Interix, which should definately classify as Unix.  So 
you could theoretically have Windows, Win32, Unix, and Interix all 
defined for a Windows platform.  Personally, I find Posix to be more 
meaningful here, but it's splitting hairs.


Sean



More information about the Digitalmars-d mailing list