Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTarek Mahmoud Sayed <tarekms@microsoft.com>2015-10-27 19:40:14 +0300
committerTarek Mahmoud Sayed <tarekms@microsoft.com>2015-10-27 21:29:30 +0300
commit40909e98c1ec9f6cd518bb6faf8763fec2e21438 (patch)
tree37bf4582084927fcdb6b177bda6fa48b855967e4 /src/System.Private.CoreLib
parent1ea75a714e81f9f52c18a02193c67103b2ba27d6 (diff)
Fix the recursion in CultureInfo
The change enable the conditional defines in corelib csproj too
Diffstat (limited to 'src/System.Private.CoreLib')
-rw-r--r--src/System.Private.CoreLib/src/System.Private.CoreLib.csproj7
-rw-r--r--src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs12
2 files changed, 14 insertions, 5 deletions
diff --git a/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj
index 4ca4bd331..325ed5f79 100644
--- a/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj
+++ b/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj
@@ -62,9 +62,12 @@
<PropertyGroup>
<SkipCommonResourcesIncludes>true</SkipCommonResourcesIncludes>
- <!-- TODO: @tarekgh Define this for CoreRT / 64-bit builds only -->
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(IsProjectNLibrary)' != 'true'">
<DefineConstants>CORERT;WIN64</DefineConstants>
</PropertyGroup>
+
<ItemGroup>
<Compile Include="..\..\Common\src\System\SR.Core.cs">
<Link>Resources\Common</Link>
@@ -482,7 +485,7 @@
<Compile Include="System\Globalization\CultureData.Dummy.cs" />
<Compile Include="System\Globalization\TextInfo.Dummy.cs" />
<Compile Include="System\Globalization\CalendarData.Dummy.cs" />
-</ItemGroup>
+ </ItemGroup>
<ItemGroup>
<Compile Include="Internal\Reflection\Tracing\ReflectionTrace.Public.cs" />
diff --git a/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs b/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs
index b96718f90..56984ea63 100644
--- a/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs
+++ b/src/System.Private.CoreLib/src/System/Globalization/CultureInfo.cs
@@ -166,7 +166,14 @@ namespace System.Globalization
#if CORERT
// CORERT-TODO CultureInfo
- m_cultureData = s_InvariantCultureInfo.m_cultureData;
+ if (s_InvariantCultureInfo == null)
+ {
+ m_cultureData = CultureData.GetCultureData("", useUserOverride);
+ }
+ else
+ {
+ m_cultureData = s_InvariantCultureInfo.m_cultureData;
+ }
m_name = _sortName = _nonSortName = name;
m_isInherited = false;
#else
@@ -278,8 +285,7 @@ namespace System.Globalization
{
#if CORERT
// CORERT-TODO CultureInfo
- // https://github.com/dotnet/corert/issues/126
- return null; // return CultureInfo.InvariantCulture;
+ return CultureInfo.InvariantCulture;
#else
CultureInfo ci = GetUserDefaultCultureCacheOverride();
if (ci != null)