diff options
author | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-04-21 06:04:52 +0000 |
---|---|---|
committer | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-04-21 06:04:52 +0000 |
commit | ec1d815fb3e110950c397c9d4aac5956c31d4d66 (patch) | |
tree | f3e67688e09eb6eb3fd1d9a18f4b8263edb02313 /rtl/win | |
parent | 9645230f5fb414d82bc4bbab4425a1230704a528 (diff) | |
download | fpc-ec1d815fb3e110950c397c9d4aac5956c31d4d66.tar.gz |
* store and restore the 8087 control world only on x86 systems
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@44922 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/win')
-rw-r--r-- | rtl/win/sysutils.pp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rtl/win/sysutils.pp b/rtl/win/sysutils.pp index 6a75dcaab2..fd7abcc58d 100644 --- a/rtl/win/sysutils.pp +++ b/rtl/win/sysutils.pp @@ -1093,16 +1093,20 @@ end; Procedure InitInternational; var +{$if defined(CPU386) or defined(CPUX86_64)} { A call to GetSystemMetrics changes the value of the 8087 Control Word on Pentium4 with WinXP SP2 } old8087CW: word; +{$endif} DefaultCustomLocaleID : LCID; // typedef DWORD LCID; DefaultCustomLanguageID : Word; // typedef WORD LANGID; begin /// workaround for Windows 7 bug, see bug report #18574 SetThreadLocale(GetUserDefaultLCID); InitInternationalGeneric; +{$if defined(CPU386) or defined(CPUX86_64)} old8087CW:=Get8087CW; +{$endif} SysLocale.MBCS:=GetSystemMetrics(SM_DBCSENABLED)<>0; SysLocale.RightToLeft:=GetSystemMetrics(SM_MIDEASTENABLED)<>0; SysLocale.DefaultLCID := $0409; @@ -1132,7 +1136,9 @@ begin end; end; +{$if defined(CPU386) or defined(CPUX86_64)} Set8087CW(old8087CW); +{$endif} GetFormatSettings; if SysLocale.FarEast then GetEraNamesAndYearOffsets; end; |