Author: spouliot
Date: 2005-05-09 15:56:14 -0400 (Mon, 09 May 2005)
New Revision: 44296
Modified:
trunk/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs
Log:
Check platform without using #define
Modified:
trunk/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs
===================================================================
---
trunk/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs
2005-05-09 19:55:54 UTC (rev 44295)
+++
trunk/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs
2005-05-09 19:56:14 UTC (rev 44296)
@@ -22,11 +22,12 @@
public class WindowsIdentityTest : Assertion {
private bool IsPosix {
-#if NET_2_0
- get { return (Environment.OSVersion.Platform ==
PlatformID.Unix); }
-#else
- get { return ((int) Environment.OSVersion.Platform ==
128); }
-#endif
+ get {
+ // check for Unix platforms - see FAQ for more
details
+ //
http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
+ int platform = (int)
Environment.OSVersion.Platform;
+ return ((platform == 4) || (platform == 128));
+ }
}
// some features works only in Windows 2003 and later
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches