www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - version(Posix) ?

reply "Kris" <fu bar.com> writes:
I'm making some changes to the build process for Mango, and noticed some
posts here about version(linux). I've currently changed all of Mango to use
version(Posix) instead, and figured we'd weed out any linux/bsd/darwin
specifics along the way ...

Does this sound reasonable? Any other ideas?

Thx.
Nov 23 2004
next sibling parent reply Sean Kelly <sean f4.ca> writes:
Kris wrote:
 I'm making some changes to the build process for Mango, and noticed some
 posts here about version(linux). I've currently changed all of Mango to use
 version(Posix) instead, and figured we'd weed out any linux/bsd/darwin
 specifics along the way ...

I think it makes more sense to target APIs than operating systems. Windows, for example, has a full POSIX subsystem as part of WSFU. In such an installation, I can see the Windows and POSIX flags being set, but not Win32 or Win64. Would there be any reason to have more than one POSIX flag for different versions, or is one enough? By the way, it may make more sense to have the POSIX flag in all caps--isn't it an acronym? Sean
Nov 23 2004
parent reply John Reimer <John_member pathlink.com> writes:
In article <co0t3g$2soe$1 digitaldaemon.com>, Sean Kelly says...
Kris wrote:
 I'm making some changes to the build process for Mango, and noticed some
 posts here about version(linux). I've currently changed all of Mango to use
 version(Posix) instead, and figured we'd weed out any linux/bsd/darwin
 specifics along the way ...

I think it makes more sense to target APIs than operating systems. Windows, for example, has a full POSIX subsystem as part of WSFU. In such an installation, I can see the Windows and POSIX flags being set, but not Win32 or Win64. Would there be any reason to have more than one POSIX flag for different versions, or is one enough? By the way, it may make more sense to have the POSIX flag in all caps--isn't it an acronym? Sean

POSIX = Portable Operating System Interface Windows XP no longer includes POSIX as part of the OS. :-(
Nov 23 2004
parent Sean Kelly <sean f4.ca> writes:
In article <co1ecs$iv1$1 digitaldaemon.com>, John Reimer says...
POSIX = Portable Operating System Interface

Windows XP no longer includes POSIX as part of the OS. :-(

I know :-/. But I was referring to Windows Services for Unix, which includes an entire POSIX subsystem that sits parallel to the Win32 subsystem (so it isn't a translation layer like Cygwin is). Very nice, though I've only played with it a bit. I think I'm going to re-install it today and see if GDC runs on it. Sean
Nov 24 2004
prev sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Kris wrote:

 I'm making some changes to the build process for Mango, and noticed some
 posts here about version(linux). I've currently changed all of Mango to use
 version(Posix) instead, and figured we'd weed out any linux/bsd/darwin
 specifics along the way ...
 
 Does this sound reasonable? Any other ideas?

version(Unix) is used in other places, with the downside that both Windows and Unix have trademark claims on them. --anders PS. I totally gave up on the version name casing earlier.
Nov 23 2004