Version Cygwin

rikki cattermole rikki at cattermole.co.nz
Fri Dec 22 03:24:15 UTC 2017


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.


More information about the Digitalmars-d-learn mailing list