www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - version(Windows)

reply "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
Is version(Windows) always defined with the Win32 compiler?

I'm trying to cross-compile Linux, and it keeps thinking that Windows is
defined,
so I am assuming the answer is yes.

May we have an option to undefine a version? (Of course, the option I'd prefer -
to not have any defined - will die in a howl of catcalls and bleats, so I'll not
even seriously propose it.)

For the moment, I'll get around this by putting the Linux blocks first ...
Jul 17 2004
next sibling parent James Widman <james jwidman.com> writes:
In article <cdc97e$1mme$1 digitaldaemon.com>,
 "Matthew" <admin stlsoft.dot.dot.dot.dot.org> wrote:

 Is version(Windows) always defined with the Win32 compiler?
 
 I'm trying to cross-compile Linux, and it keeps thinking that Windows is 
 defined, so I am assuming the answer is yes.
 
 May we have an option to undefine a version? (Of course, the option I'd prefer
-
 to not have any defined - will die in a howl of catcalls and bleats, so I'll 
 not even seriously propose it.)
How about -version with no arguments? That would cause every previously (or implicitly) invoked -version option to be forgotten (kind of like how -I- causes some compilers to forget the #include search path). So in this case, you would use '-version' before any '-version=foo' option. Of course, you might not always want to forget all default -version options, so maybe it's better to have an 'un-define' option implemented first.
Jul 18 2004
prev sibling parent J C Calvarese <jcc7 cox.net> writes:
Matthew wrote:
 Is version(Windows) always defined with the Win32 compiler?
 
 I'm trying to cross-compile Linux, and it keeps thinking that Windows is
defined,
 so I am assuming the answer is yes.
 
 May we have an option to undefine a version? (Of course, the option I'd prefer
-
 to not have any defined - will die in a howl of catcalls and bleats, so I'll
not
 even seriously propose it.)
I think of this as two questions: 1. Should we be able to undefine a version? Maybe. I'm afraid we might be creating more problems for ourselves (new subtle errors), but I can see possible uses for this feature. Would the possible new problems be worth the new abilities? I don't know, but I think it's good to discuss these issues. 2. How would undefining version work? Perhaps we could undefine all versions at once: Maybe at the commandline we could use "-version=void" And within the code, we could use: version = void; Or we could undefine individual versions. version = void Windows; Would that create an error if Windows wasn't previously defined? version(Windows) version = void Windows; I'm just thinking in written form.
 
 For the moment, I'll get around this by putting the Linux blocks first ...
-- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Jul 18 2004