2006-09-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System / System.Collections.Specialized / ProcessStringDictionary.cs
index dfe07d68b9ca4d878d80d1ded360c0f3e32905d7..4b4e756424083cbd7bb5c2895ac1ba4c2f6e99e0 100644 (file)
@@ -41,8 +41,18 @@ namespace System.Collections.Specialized
 
                public ProcessStringDictionary ()
                {
-                       table = new Hashtable (CaseInsensitiveHashCodeProvider.Default,
-                                               CaseInsensitiveComparer.Default);
+                       IHashCodeProvider hash_provider = null;
+                       IComparer comparer = null;
+
+                       // check for non-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;
+                       if ((platform != 4) && (platform != 128)) {
+                               hash_provider = CaseInsensitiveHashCodeProvider.DefaultInvariant;
+                               comparer = CaseInsensitiveComparer.DefaultInvariant;
+                       }
+
+                       table = new Hashtable (hash_provider, comparer);
                }
                
                public override int Count {