www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Version Cygwin

reply Anonymouse <asdf asdf.net> writes:
Cygwin is a reserved version[1], alongside Windows and linux and 
the like. However it doesn't seem to be automatically recognised.

 import std.stdio;
 
 void main()
 {
     version(Cygwin) writeln("Cygwin");
 }
Compiled from a Cygwin prompt this prints nothing. So I thought to add versions: [ "Cygwin" ] to dub.json, but dub refuses.
 Error: version identifier `Cygwin` is reserved and cannot be set
Is there any way to force Cygwin or should I resign to creating an alternative lowercase "cygwin" version? The use-case is to version stdout.flush() here and there to counter that the default Cygwin terminal (mintty) doesn't update when text is written to the terminal. I forget the reason why it doesn't. [1]: https://dlang.org/spec/version.htm
Dec 21 2017
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 21/12/2017 4:22 PM, Anonymouse wrote:
 Cygwin is a reserved version[1], alongside Windows and linux and the 
 like. However it doesn't seem to be automatically recognised.
 
 import std.stdio;

 void main()
 {
     version(Cygwin) writeln("Cygwin");
 }
Compiled from a Cygwin prompt this prints nothing. So I thought to add versions: [ "Cygwin" ] to dub.json, but dub refuses.
 Error: version identifier `Cygwin` is reserved and cannot be set
Is there any way to force Cygwin or should I resign to creating an alternative lowercase "cygwin" version? The use-case is to version stdout.flush() here and there to counter that the default Cygwin terminal (mintty) doesn't update when text is written to the terminal. I forget the reason why it doesn't. [1]: https://dlang.org/spec/version.htm
You are not using a Cygwin build. It doesn't matter who calls a process, it doesn't change the version's by itself. As far as I know, nobody supports Cygwin like this.
Dec 21 2017
parent Anonymouse <asdf asdf.net> writes:
On Friday, 22 December 2017 at 03:24:15 UTC, rikki cattermole 
wrote:
 You are not using a Cygwin build.
 It doesn't matter who calls a process, it doesn't change the 
 version's by itself.

 As far as I know, nobody supports Cygwin like this.
I see, thank you.
Dec 22 2017