Merge pull request #820 from brendanzagaeski/master
[mono.git] / mcs / class / corlib / System / Environment.cs
index 07d80cf75503b687a84646a33d2b4b2371613dda..13d63ccc129d66740dc1148e997d36aa5b2b7d46 100644 (file)
@@ -56,7 +56,7 @@ namespace System {
                 * of icalls, do not require an increment.
                 */
 #pragma warning disable 169
-               private const int mono_corlib_version = 105;
+               private const int mono_corlib_version = 111;
 #pragma warning restore 169
 
                [ComVisible (true)]
@@ -85,7 +85,7 @@ namespace System {
                        ProgramFiles = 0x26,
                        MyPictures = 0x27,
                        CommonProgramFiles = 0x2b,
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0
                        MyVideos = 0x0e,
 #endif
 #if NET_4_0
@@ -531,10 +531,10 @@ namespace System {
                                                        string path = line.Substring (delim_index + 1).Trim ('"');
                                                        bool relative = false;
                                                        
-                                                       if (path.StartsWith ("$HOME/")) {
+                                                       if (path.StartsWithOrdinalUnchecked ("$HOME/")) {
                                                                relative = true;
                                                                path = path.Substring (6);
-                                                       } else if (!path.StartsWith ("/")) {
+                                                       } else if (!path.StartsWithOrdinalUnchecked ("/")) {
                                                                relative = true;
                                                        }
                                                        
@@ -628,7 +628,7 @@ namespace System {
                        
                        case SpecialFolder.Templates:
                                return ReadXdgUserDir (config, home, "XDG_TEMPLATES_DIR", "Templates");
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0
                        case SpecialFolder.MyVideos:
                                return ReadXdgUserDir (config, home, "XDG_VIDEOS_DIR", "Videos");
 #endif
@@ -836,7 +836,7 @@ namespace System {
                        throw new NotImplementedException ();
                }
 
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0
                [SecurityCritical]
                public static void FailFast (string message, Exception exception)
                {
@@ -849,15 +849,20 @@ namespace System {
                        get { return IntPtr.Size == 8; } // FIXME: is this good enough?
                }
 
-               public static bool Is64BitProcess {
-                       get { return Is64BitOperatingSystem; }
-               }
-
                public static int SystemPageSize {
                        get { return GetPageSize (); }
                }
 #endif
 
+#if NET_4_0
+               public
+#else
+               internal
+#endif
+               static bool Is64BitProcess {
+                       get { return IntPtr.Size == 8; }
+               }
+               
                public static extern int ProcessorCount {
                        [EnvironmentPermission (SecurityAction.Demand, Read="NUMBER_OF_PROCESSORS")]
                        [MethodImplAttribute (MethodImplOptions.InternalCall)]
@@ -865,10 +870,14 @@ namespace System {
                }
 
                // private methods
-
+#if MOBILE 
+               internal const bool IsRunningOnWindows = false;
+#else
                internal static bool IsRunningOnWindows {
                        get { return ((int) Platform < 4); }
                }
+#endif
+
 #if !NET_2_1
                //
                // Used by gacutil.exe