Skip to content

Commit 1dcbcd4

Browse files
authored
cleanup FX_LCIDFROMCODEPAGE (#7509)
1 parent 371c196 commit 1dcbcd4

4 files changed

Lines changed: 3 additions & 13 deletions

File tree

FSharp.Profiles.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<DefineConstants Condition="'$(MonoPackaging)' == 'true'">$(DefineConstants);CROSS_PLATFORM_COMPILER</DefineConstants>
77
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
88
<DefineConstants>$(DefineConstants);BE_SECURITY_TRANSPARENT</DefineConstants>
9-
<DefineConstants>$(DefineConstants);FX_LCIDFROMCODEPAGE</DefineConstants>
109
</PropertyGroup>
1110

1211
<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard')) OR $(TargetFramework.StartsWith('netcoreapp'))">

src/fsharp/fsc.fs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,15 +1774,13 @@ let main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted,
17741774
exiter: Exiter, errorLoggerProvider : ErrorLoggerProvider, disposables : DisposablesTracker) =
17751775

17761776
// See Bug 735819
1777-
let lcidFromCodePage =
1778-
#if FX_LCIDFROMCODEPAGE
1777+
let lcidFromCodePage =
17791778
if (Console.OutputEncoding.CodePage <> 65001) &&
17801779
(Console.OutputEncoding.CodePage <> Thread.CurrentThread.CurrentUICulture.TextInfo.OEMCodePage) &&
17811780
(Console.OutputEncoding.CodePage <> Thread.CurrentThread.CurrentUICulture.TextInfo.ANSICodePage) then
17821781
Thread.CurrentThread.CurrentUICulture <- new CultureInfo("en-US")
17831782
Some 1033
17841783
else
1785-
#endif
17861784
None
17871785

17881786
let directoryBuildingFrom = Directory.GetCurrentDirectory()

src/fsharp/fsi/fsimain.fs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ do()
4040

4141

4242
/// Set the current ui culture for the current thread.
43-
#if FX_LCIDFROMCODEPAGE
4443
let internal SetCurrentUICultureForThread (lcid : int option) =
4544
let culture = Thread.CurrentThread.CurrentUICulture
4645
match lcid with
4746
| Some n -> Thread.CurrentThread.CurrentUICulture <- new CultureInfo(n)
4847
| None -> ()
4948
{ new IDisposable with member x.Dispose() = Thread.CurrentThread.CurrentUICulture <- culture }
50-
#endif
5149

5250
let callStaticMethod (ty:Type) name args =
5351
ty.InvokeMember(name, (BindingFlags.InvokeMethod ||| BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic), null, null, Array.ofList args,Globalization.CultureInfo.InvariantCulture)
@@ -95,11 +93,7 @@ type WinFormsEventLoop() =
9593
try
9694
// When we get called back, someone may jack our culture
9795
// So we must reset our UI culture every time
98-
#if FX_LCIDFROMCODEPAGE
9996
use _scope = SetCurrentUICultureForThread lcid
100-
#else
101-
ignore lcid
102-
#endif
10397
mainFormInvokeResultHolder := Some(f ())
10498
finally
10599
doneSignal.Set() |> ignore)) |> ignore

vsintegration/Utils/LanguageServiceProfiling/Options.fs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,8 @@ let FCS (repositoryDir: string) : Options =
212212
@"--define:FX_ATLEAST_40"; "--define:BE_SECURITY_TRANSPARENT";
213213
@"--define:COMPILER";
214214
@"--define:ENABLE_MONO_SUPPORT"; "--define:FX_MSBUILDRESOLVER_RUNTIMELIKE";
215-
@"--define:FX_LCIDFROMCODEPAGE"; "--define:FX_RESX_RESOURCE_READER";
216-
@"--define:FX_RESIDENT_COMPILER"; "--define:SHADOW_COPY_REFERENCES";
217-
@"--define:EXTENSIONTYPING";
215+
@"--define:FX_RESX_RESOURCE_READER"; "--define:FX_RESIDENT_COMPILER";
216+
@"--define:SHADOW_COPY_REFERENCES"; "--define:EXTENSIONTYPING";
218217
@"--define:COMPILER_SERVICE_DLL_ASSUMES_FSHARP_CORE_4_4_0_0";
219218
@"--define:COMPILER_SERVICE_DLL"; "--define:NO_STRONG_NAMES"; "--define:TRACE";
220219
@"--doc:..\..\..\bin\v4.5\FSharp.Compiler.Service.xml"; "--optimize-";

0 commit comments

Comments
 (0)