[Mono-list] [PATCH] Hard coded System.Environment.OSVersion...
Paolo Molaro
lupus@ximian.com
Mon, 26 Apr 2004 16:07:48 +0200
On 04/23/04 Sebastien Pouliot wrote:
> Here's the patches. There may be a better way on Linux to get a version...
>
> The following code...
>
> static void Main(string[] args)
> {
> Console.WriteLine (Environment.OSVersion.ToString ());
> Console.WriteLine (Environment.OSVersion.Platform);
> Console.WriteLine (Environment.OSVersion.Version);
> }
>
> Should display on Linux...
>
> [poupou@rh9 poupou]$ mono version.exe
> Unix 2.4.20.8
> 128
> 2.4.20.8
I think we made the method report the hardcoded version to fool the
broken sw which relies on the version.
We may go with your changes and wait for someone to complain, or maybe
we should check an environment variable like:
PROGRAMMER_TOO_LAZY_TO_WRITE_PORTABLE_CODE=beatmeharder
and report the fixed version in that case.
lupus
--
-----------------------------------------------------------------
lupus@debian.org debian/rules
lupus@ximian.com Monkeys do it better