diff --git a/rtl/amiga/system.pp b/rtl/amiga/system.pp index 111b0bc40f..b8d1580d09 100644 --- a/rtl/amiga/system.pp +++ b/rtl/amiga/system.pp @@ -381,6 +381,7 @@ begin { Setup heap } InitHeap; SysInitExceptions; + initunicodestringmanager; { Setup stdin, stdout and stderr } SysInitStdIO; { Reset IO Error } @@ -389,9 +390,4 @@ begin GenerateArgs; InitSystemThreads; initvariantmanager; -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} end. diff --git a/rtl/atari/system.pas b/rtl/atari/system.pas index 8cb7b0392f..ff5449731e 100644 --- a/rtl/atari/system.pas +++ b/rtl/atari/system.pas @@ -762,6 +762,9 @@ begin ExitProc:=Nil; { Setup heap } InitHeap; +{$ifdef HASWIDESTRING} + InitUnicodeStringManager; +{$endif HASWIDESTRING} { Setup stdin, stdout and stderr } OpenStdIO(Input,fmInput,StdInputHandle); OpenStdIO(Output,fmOutput,StdOutputHandle); @@ -776,11 +779,4 @@ begin { Setup command line arguments } argc:=GetParamCount(args); InitVariantManager; -{$ifdef HASWIDESTRING} - {$ifdef VER2_2} - InitWideStringManager; - {$else VER2_2} - InitUnicodeStringManager; - {$endif VER2_2} -{$endif HASWIDESTRING} end. diff --git a/rtl/beos/system.pp b/rtl/beos/system.pp index 1faf6f685e..7b34acb1e9 100644 --- a/rtl/beos/system.pp +++ b/rtl/beos/system.pp @@ -429,6 +429,7 @@ begin SysInitExceptions; // WriteLn('after SysInitException'); + initunicodestringmanager; { Setup IO } SysInitStdIO; { Reset IO Error } @@ -437,11 +438,6 @@ begin {$ifdef HASVARIANT} initvariantmanager; {$endif HASVARIANT} -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} setupexecname; { restore original signal handlers in case this is a library } if IsLibrary then diff --git a/rtl/bsd/system.pp b/rtl/bsd/system.pp index 945b05c36e..935ca0c6f4 100644 --- a/rtl/bsd/system.pp +++ b/rtl/bsd/system.pp @@ -328,6 +328,7 @@ Begin { Setup heap } InitHeap; SysInitExceptions; + initunicodestringmanager; { Setup stdin, stdout and stderr } SysInitStdIO; { Reset IO Error } @@ -337,11 +338,6 @@ Begin { threading } InitSystemThreads; initvariantmanager; -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} { restore original signal handlers in case this is a library } if IsLibrary then RestoreOldSignalHandlers; diff --git a/rtl/emx/system.pas b/rtl/emx/system.pas index 2d540699be..0e2f83b081 100644 --- a/rtl/emx/system.pas +++ b/rtl/emx/system.pas @@ -573,6 +573,10 @@ begin { ... and exceptions } SysInitExceptions; +{$ifdef HASWIDESTRING} + InitUnicodeStringManager; +{$endif HASWIDESTRING} + { ... and I/O } SysInitStdIO; @@ -583,14 +587,6 @@ begin InitVariantManager; -{$ifdef HASWIDESTRING} - {$ifdef VER2_2} - InitWideStringManager; - {$else VER2_2} - InitUnicodeStringManager; - {$endif VER2_2} -{$endif HASWIDESTRING} - if os_Mode in [osDOS,osDPMI] then DosEnvInit; diff --git a/rtl/go32v2/system.pp b/rtl/go32v2/system.pp index bbe3479fbb..2ae58561d1 100644 --- a/rtl/go32v2/system.pp +++ b/rtl/go32v2/system.pp @@ -658,6 +658,7 @@ Begin { Setup heap } InitHeap; SysInitExceptions; + initunicodestringmanager; { Setup stdin, stdout and stderr } SysInitStdIO; { Setup environment and arguments } @@ -682,9 +683,4 @@ Begin InstallDefaultHandlers; {$endif EXCEPTIONS_IN_SYSTEM} initvariantmanager; -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} End. diff --git a/rtl/haiku/system.pp b/rtl/haiku/system.pp index 438e9821d2..cff0ad7eef 100644 --- a/rtl/haiku/system.pp +++ b/rtl/haiku/system.pp @@ -463,6 +463,7 @@ begin SysInitExceptions; // WriteLn('after SysInitException'); + initunicodestringmanager; { Setup IO } SysInitStdIO; { Reset IO Error } @@ -471,11 +472,6 @@ begin {$ifdef HASVARIANT} initvariantmanager; {$endif HASVARIANT} -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} setupexecname; { restore original signal handlers in case this is a library } if IsLibrary then diff --git a/rtl/linux/system.pp b/rtl/linux/system.pp index fe10478a03..a5650fc8ca 100644 --- a/rtl/linux/system.pp +++ b/rtl/linux/system.pp @@ -363,6 +363,7 @@ begin { Setup heap } InitHeap; SysInitExceptions; + initunicodestringmanager; { Setup stdin, stdout and stderr } SysInitStdIO; { Arguments } @@ -372,11 +373,6 @@ begin { threading } InitSystemThreads; initvariantmanager; -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} { restore original signal handlers in case this is a library } if IsLibrary then RestoreOldSignalHandlers; diff --git a/rtl/macos/system.pp b/rtl/macos/system.pp index 4eff82614c..c225724e44 100644 --- a/rtl/macos/system.pp +++ b/rtl/macos/system.pp @@ -548,6 +548,7 @@ begin InitHeap; SysInitExceptions; + initunicodestringmanager; SysInitStdIO; { Setup environment and arguments } @@ -558,11 +559,6 @@ begin errno:=0; InitSystemThreads; initvariantmanager; -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} if StandAlone = 0 then begin diff --git a/rtl/morphos/system.pp b/rtl/morphos/system.pp index ca50ebbda6..70dcacdd50 100644 --- a/rtl/morphos/system.pp +++ b/rtl/morphos/system.pp @@ -415,6 +415,7 @@ begin { Setup heap } InitHeap; SysInitExceptions; + initunicodestringmanager; { Setup stdin, stdout and stderr } SysInitStdIO; { Reset IO Error } @@ -423,9 +424,4 @@ begin GenerateArgs; InitSystemThreads; initvariantmanager; -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} end. diff --git a/rtl/nativent/system.pp b/rtl/nativent/system.pp index 0276e48595..8b5b19c444 100644 --- a/rtl/nativent/system.pp +++ b/rtl/nativent/system.pp @@ -425,6 +425,9 @@ begin {$endif ndef KMODE and ndef HAS_MEMORYMANAGER} SysInitExceptions; initvariantmanager; + { we do not use winlike widestrings and also the RTL can't be compiled with + 2.2, so we can savely use the UnicodeString manager only. } + initunicodestringmanager; {$ifndef KMODE} SysInitStdIO; { Arguments } @@ -433,8 +436,5 @@ begin InOutRes := 0; InitSystemThreads; errno := 0; - { we do not use winlike widestrings and also the RTL can't be compiled with - 2.2, so we can savely use the UnicodeString manager only. } - initunicodestringmanager; end. diff --git a/rtl/netware/system.pp b/rtl/netware/system.pp index 2a45147f68..d5195e517b 100644 --- a/rtl/netware/system.pp +++ b/rtl/netware/system.pp @@ -469,6 +469,7 @@ Begin ConsolePrintf (#13'Start system, ThreadID: %x'#13#10,ThreadID); {$endif} + initunicodestringmanager; SysInitStdIO; {Delphi Compatible} @@ -476,9 +477,4 @@ Begin ExitCode := 0; InitSystemThreads; initvariantmanager; -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} End. diff --git a/rtl/netwlibc/system.pp b/rtl/netwlibc/system.pp index a42efe99d8..a65f27696e 100644 --- a/rtl/netwlibc/system.pp +++ b/rtl/netwlibc/system.pp @@ -544,6 +544,7 @@ Begin ThreadID := dword(pthread_self); + initunicodestringmanager; SysInitStdIO; {Delphi Compatible} @@ -551,9 +552,4 @@ Begin ExitCode := 0; InitSystemThreads; initvariantmanager; -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} End. diff --git a/rtl/os2/system.pas b/rtl/os2/system.pas index acccedf7b7..0458e6e065 100644 --- a/rtl/os2/system.pas +++ b/rtl/os2/system.pas @@ -1179,6 +1179,10 @@ begin SysInitExceptions; fpc_cpucodeinit; +{$ifdef HASWIDESTRING} + InitUnicodeStringManager; +{$endif HASWIDESTRING} + { ... and I/O } SysInitStdIO; @@ -1197,14 +1201,6 @@ begin InitSystemThreads; InitVariantManager; -{$ifdef HASWIDESTRING} - {$ifdef VER2_2} - InitWideStringManager; - {$else VER2_2} - InitUnicodeStringManager; - {$endif VER2_2} -{$endif HASWIDESTRING} - {$IFDEF EXTDUMPGROW} { Int_HeapSize := high (cardinal);} {$ENDIF EXTDUMPGROW} diff --git a/rtl/solaris/system.pp b/rtl/solaris/system.pp index 453f692ece..6bddd943b1 100644 --- a/rtl/solaris/system.pp +++ b/rtl/solaris/system.pp @@ -277,6 +277,7 @@ Begin fpc_cpucodeinit; {$endif cpui386} + initunicodestringmanager; { Setup stdin, stdout and stderr } SysInitStdIO; @@ -286,11 +287,6 @@ Begin SetupCmdLine; InitSystemThreads; initvariantmanager; -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} { restore original signal handlers in case this is a library } if IsLibrary then RestoreOldSignalHandlers; diff --git a/rtl/watcom/system.pp b/rtl/watcom/system.pp index 7bda6b8276..d3bbdbdbca 100644 --- a/rtl/watcom/system.pp +++ b/rtl/watcom/system.pp @@ -763,6 +763,7 @@ Begin { Setup heap } InitHeap; SysInitExceptions; + initunicodestringmanager; { Setup stdin, stdout and stderr } SysInitStdIO; { Setup environment and arguments } @@ -786,9 +787,4 @@ Begin InstallDefaultHandlers; {$endif EXCEPTIONS_IN_SYSTEM} initvariantmanager; -{$ifdef VER2_2} - initwidestringmanager; -{$else VER2_2} - initunicodestringmanager; -{$endif VER2_2} End. diff --git a/rtl/win32/system.pp b/rtl/win32/system.pp index 983b80af03..8fc9780d4a 100644 --- a/rtl/win32/system.pp +++ b/rtl/win32/system.pp @@ -695,6 +695,9 @@ begin SysInitExceptions; { setup fastmove stuff } fpc_cpucodeinit; + initwidestringmanager; + initunicodestringmanager; + InitWin32Widestrings; SysInitStdIO; { Arguments } setup_arguments; @@ -706,10 +709,5 @@ begin { Reset internal error variable } errno:=0; initvariantmanager; - initwidestringmanager; -{$ifndef VER2_2} - initunicodestringmanager; -{$endif VER2_2} - InitWin32Widestrings; DispCallByIDProc:=@DoDispCallByIDError; end. diff --git a/rtl/win64/system.pp b/rtl/win64/system.pp index d47d4c4ddd..1cde1fc5e6 100644 --- a/rtl/win64/system.pp +++ b/rtl/win64/system.pp @@ -610,6 +610,9 @@ begin SysInitExceptions; { setup fastmove stuff } fpc_cpucodeinit; + initwidestringmanager; + initunicodestringmanager; + InitWin32Widestrings; SysInitStdIO; { Arguments } setup_arguments; @@ -621,8 +624,5 @@ begin { Reset internal error variable } errno:=0; initvariantmanager; - initwidestringmanager; - initunicodestringmanager; - InitWin32Widestrings; DispCallByIDProc:=@DoDispCallByIDError; end. diff --git a/rtl/wince/system.pp b/rtl/wince/system.pp index 194ac2adec..70af8bffbe 100644 --- a/rtl/wince/system.pp +++ b/rtl/wince/system.pp @@ -1848,6 +1848,8 @@ initialization InitHeap; {$ENDIF HAS_MEMORYMANAGER} SysInitExceptions; + initunicodestringmanager; + InitWinCEWidestrings; if not IsLibrary then begin SysInitStdIO; @@ -1860,8 +1862,6 @@ initialization { Reset internal error variable } errno:=0; initvariantmanager; - initunicodestringmanager; - InitWinCEWidestrings; DispCallByIDProc:=@DoDispCallByIDError; finalization