Add a more functional (i.e. fewer-stubs) implementation of System.Data.Linq.
[mono.git] / mono / tests / cas / demand / pinvoke3.cs
index 40bd78386c59e43f75b39dc81197729002ca5401..4825551426e7b44072bb95fb8b549aa163f7f5db 100644 (file)
@@ -13,17 +13,18 @@ public class Program {
        [DllImport ("kernel32.dll", SetLastError=true)]
        public static extern uint GetTickCount ();
 
-       static bool RunningOnMono ()
+       static bool RunningOnWindows ()
        {
-               bool mono = (Type.GetType ("Mono.Math.BigInteger") != null); 
-               Console.WriteLine ("Running on {0} runtime...", mono ? "Mono" : "Microsoft");
-               return mono;
+               int p = (int) Environment.OSVersion.Platform;
+               bool win = ((p != 4) && (p != 128));
+               Console.WriteLine ("Running on {0}...", Environment.OSVersion);
+               return win;
        }
 
        static int Test ()
        {
                try {
-                       uint u = (RunningOnMono ()) ? getuid () : GetTickCount ();
+                       uint u = (RunningOnWindows () ? GetTickCount () : getuid ());
                        Console.WriteLine ("*1* P/Invoke: {0}", u);
                        return 1;
                }