Browse Source

* synchronised with FPC 3.0.0 release revision of fixes_3_0 branch

git-svn-id: branches/fixes_3_0_ios@32320 -
Jonas Maebe 10 years ago
parent
commit
955c8a2e36
59 changed files with 1060 additions and 609 deletions
  1. 3 0
      .gitattributes
  2. 3 3
      compiler/options.pas
  3. 6 0
      compiler/systems/t_haiku.pas
  4. 1 1
      compiler/widestr.pas
  5. 7 7
      ide/fpmake.pp
  6. 1 0
      packages/aspell/fpmake.pp
  7. 2 0
      packages/chm/fpmake.pp
  8. 1 1
      packages/fcl-base/fpmake.pp
  9. 13 0
      packages/fcl-db/fpmake.pp
  10. 6 0
      packages/fcl-json/src/fpjson.pp
  11. 2 1
      packages/fcl-registry/fpmake.pp
  12. 2 0
      packages/fcl-sdo/fpmake.pp
  13. 33 20
      packages/fpmkunit/src/fpmkunit.pp
  14. 2 0
      packages/fppkg/fpmake.pp
  15. 365 353
      packages/fppkg/src/fpmkunitsrc.inc
  16. 50 0
      packages/fppkg/src/pkgcommands.pp
  17. 1 1
      packages/fppkg/src/pkgglobals.pp
  18. 13 0
      packages/fppkg/src/pkgmessages.pp
  19. 3 1
      packages/gdbint/fpmake.pp
  20. 1 1
      packages/gmp/fpmake.pp
  21. 25 12
      packages/gtk2/fpmake.pp
  22. 2 0
      packages/hash/fpmake.pp
  23. 1 1
      packages/ibase/fpmake.pp
  24. 1 0
      packages/imagemagick/fpmake.pp
  25. 1 1
      packages/libcurl/fpmake.pp
  26. 1 1
      packages/libgbafpc/fpmake.pp
  27. 1 1
      packages/libgd/fpmake.pp
  28. 1 1
      packages/libndsfpc/fpmake.pp
  29. 1 1
      packages/libogcfpc/fpmake.pp
  30. 2 1
      packages/libxml/fpmake.pp
  31. 1 1
      packages/odbc/fpmake.pp
  32. 1 1
      packages/opengles/fpmake.pp
  33. 1 1
      packages/os2units/fpmake.pp
  34. 1 1
      packages/postgres/fpmake.pp
  35. 1 1
      packages/ptc/fpmake.pp
  36. 1 1
      packages/regexpr/fpmake.pp
  37. 6 0
      packages/rtl-extra/fpmake.pp
  38. 1 0
      packages/rtl-objpas/fpmake.pp
  39. 7 1
      packages/rtl-unicode/fpmake.pp
  40. 1 1
      packages/svgalib/fpmake.pp
  41. 1 1
      packages/syslog/fpmake.pp
  42. 1 1
      packages/uuid/fpmake.pp
  43. 3 0
      packages/winunits-jedi/fpmake.pp
  44. 7 5
      rtl/arm/arm.inc
  45. 4 2
      rtl/arm/armdefines.inc
  46. 162 154
      rtl/haiku/Makefile
  47. 13 2
      rtl/haiku/Makefile.fpc
  48. 207 0
      rtl/haiku/i386/dllcprt0.as
  49. 8 0
      rtl/haiku/ptypes.inc
  50. 1 1
      rtl/inc/ustrings.inc
  51. 1 1
      rtl/objpas/classes/streams.inc
  52. 9 4
      rtl/os2/sysutils.pp
  53. 19 18
      rtl/unix/cwstring.pp
  54. 1 1
      rtl/unix/unixcp.pp
  55. 27 0
      tests/webtbs/tw28593.pp
  56. 14 0
      tests/webtbs/tw28934.pp
  57. 1 1
      utils/fpcm/revision.inc
  58. 8 1
      utils/fppkg/fppkg.pp
  59. 1 1
      utils/pas2jni/ppuparser.pas

+ 3 - 0
.gitattributes

@@ -8330,6 +8330,7 @@ rtl/haiku/classes.pp svneol=native#text/plain
 rtl/haiku/errno.inc svneol=native#text/plain
 rtl/haiku/errnostr.inc svneol=native#text/plain
 rtl/haiku/i386/cprt0.as svneol=native#text/plain
+rtl/haiku/i386/dllcprt0.as svneol=native#text/plain
 rtl/haiku/i386/dllprt.as svneol=native#text/plain
 rtl/haiku/i386/dllprt.cpp svneol=native#text/plain
 rtl/haiku/i386/func.as svneol=native#text/plain
@@ -14341,6 +14342,7 @@ tests/webtbs/tw2853c.pp svneol=native#text/plain
 tests/webtbs/tw2853d.pp svneol=native#text/plain
 tests/webtbs/tw2853e.pp svneol=native#text/plain
 tests/webtbs/tw2859.pp svneol=native#text/plain
+tests/webtbs/tw28593.pp svneol=native#text/plain
 tests/webtbs/tw2865.pp svneol=native#text/plain
 tests/webtbs/tw28674.pp svneol=native#text/pascal
 tests/webtbs/tw28718a.pp svneol=native#text/plain
@@ -14353,6 +14355,7 @@ tests/webtbs/tw2885.pp svneol=native#text/plain
 tests/webtbs/tw2886.pp svneol=native#text/plain
 tests/webtbs/tw2891.pp svneol=native#text/plain
 tests/webtbs/tw2892.pp svneol=native#text/plain
+tests/webtbs/tw28934.pp svneol=native#text/plain
 tests/webtbs/tw2897.pp svneol=native#text/plain
 tests/webtbs/tw2899.pp svneol=native#text/plain
 tests/webtbs/tw2904.pp svneol=native#text/plain

+ 3 - 3
compiler/options.pas

@@ -3721,11 +3721,11 @@ begin
       end;
     system_arm_android:
       begin
-        { set default cpu type to ARMv6 for Android unless specified otherwise }
+        { set default cpu type to ARMv5T for Android unless specified otherwise }
         if not option.CPUSetExplicitly then
-          init_settings.cputype:=cpu_armv6;
+          init_settings.cputype:=cpu_armv5t;
         if not option.OptCPUSetExplicitly then
-          init_settings.optimizecputype:=cpu_armv6;
+          init_settings.optimizecputype:=cpu_armv5t;
       end;
   end;
 

+ 6 - 0
compiler/systems/t_haiku.pas

@@ -251,7 +251,13 @@ begin
    begin
      linklibc:=true;
      cprtobj:='dllprt.o';
+   end
+  else if makelib then
+   begin
+     // Making a dll with libc linking. Should be always the case under Haiku.
+     cprtobj:='dllcprt0';
    end;
+   
 
   if linklibc then
    prtobj:=cprtobj;

+ 1 - 1
compiler/widestr.pas

@@ -349,7 +349,7 @@ unit widestr;
         p : punicodemap;
       begin
         Result:=0;
-        p:=getmap(s);
+        p:=getmap(lower(s));
         if (p<>nil) then
           Result:=p^.cp;
       end;

+ 7 - 7
ide/fpmake.pp

@@ -222,13 +222,13 @@ begin
       AddSrc('readme.txt');
       AddSrc('todo.txt');
       AddSrc('fp.ans');
-      AddSrcFiles('*.tdf');
-      AddSrcFiles('*.pas',true);
-      AddSrcFiles('*.inc',true);
-      AddSrcFiles('*.rc');
-      AddSrcFiles('*.ico');
-      AddSrcFiles('*.term');
-      AddSrcFiles('*.pt');
+      AddSrcFiles('*.tdf',P.Directory);
+      AddSrcFiles('*.pas',P.Directory,true);
+      AddSrcFiles('*.inc',P.Directory,true);
+      AddSrcFiles('*.rc',P.Directory);
+      AddSrcFiles('*.ico',P.Directory);
+      AddSrcFiles('*.term',P.Directory);
+      AddSrcFiles('*.pt',P.Directory);
      end;
 
     P.CleanFiles.Add('$(UNITSOUTPUTDIR)ppheap.ppu');

+ 1 - 0
packages/aspell/fpmake.pp

@@ -31,6 +31,7 @@ begin
     P.SourcePath.Add('src');
 
     T:=P.Targets.AddUnit('aspell.pp');
+    T.Dependencies.AddInclude('src/aspelltypes.inc');
     T:=P.Targets.AddUnit('aspelldyn.pp');
     T:=P.Targets.AddUnit('spellcheck.pp');
     with T.Dependencies do

+ 2 - 0
packages/chm/fpmake.pp

@@ -32,6 +32,7 @@ begin
     D.Version:='3.0.1';
 
     P.SourcePath.Add('src');
+    P.IncludePath.Add('src');
 
     T:=P.Targets.AddUnit('chmbase.pas');
     T:=P.Targets.AddUnit('chmfilewriter.pas');
@@ -75,6 +76,7 @@ begin
           AddUnit('chmspecialfiles');
           AddUnit('paslzxcomp');
           AddUnit('chmfiftimain');
+          AddInclude('chmobjinstconst.inc');
         end;
     T:=P.Targets.AddUnit('lzxcompressthread.pas');
       with T.Dependencies do

+ 1 - 1
packages/fcl-base/fpmake.pp

@@ -118,7 +118,7 @@ begin
       AddUnit('contnrs');
       end;
     // Additional sources
-    P.Sources.AddSrcFiles('src/win/fclel.*');
+    P.Sources.AddSrcFiles('src/win/fclel.*', P.Directory);
     // Install windows resources
     P.InstallFiles.Add('src/win/fclel.res',AllWindowsOSes,'$(unitinstalldir)');
 

+ 13 - 0
packages/fcl-db/fpmake.pp

@@ -96,6 +96,7 @@ begin
       with T.Dependencies do
         begin
         AddUnit('db');
+        AddUnit('sqldb');
         AddUnit('bufdataset');
         end;
 
@@ -661,6 +662,17 @@ begin
           AddUnit('dbconst');
         end;
 
+    T:=P.Targets.AddUnit('mysql57conn.pas', SqldbConnectionOSes);
+    T.ResourceStrings:=true;
+      with T.Dependencies do
+        begin
+          AddInclude('mysqlconn.inc');
+          AddUnit('bufdataset');
+          AddUnit('sqldb');
+          AddUnit('db');
+          AddUnit('dbconst');
+        end;
+
     T:=P.Targets.AddUnit('odbcconn.pas', SqldbConnectionOSes);
       with T.Dependencies do
         begin
@@ -721,6 +733,7 @@ begin
           AddUnit('db');
           AddUnit('bufdataset');
           AddUnit('dbconst');
+          AddUnit('sqlscript');
         end;
     T:=P.Targets.AddUnit('sqldblib.pp');
       with T.Dependencies do

+ 6 - 0
packages/fcl-json/src/fpjson.pp

@@ -427,6 +427,7 @@ Type
     procedure Insert(Index: Integer; AnObject: TJSONObject);
     procedure Move(CurIndex, NewIndex: Integer);
     Procedure Remove(Item : TJSONData);
+    Procedure Sort(Compare: TListSortCompare);
     // Easy Access Properties.
     property Items;default;
     Property Types[Index : Integer] : TJSONType Read GetTypes;
@@ -2335,6 +2336,11 @@ begin
   FList.Remove(Item);
 end;
 
+procedure TJSONArray.Sort(Compare: TListSortCompare);
+begin
+  FList.Sort(Compare);
+end;
+
 { TJSONObject }
 
 function TJSONObject.GetArrays(const AName: String): TJSONArray;

+ 2 - 1
packages/fcl-registry/fpmake.pp

@@ -35,7 +35,8 @@ begin
       with T.Dependencies do
         begin
           AddInclude('regdef.inc');
-          AddInclude('xregreg.inc');
+          AddInclude('winreg.inc',AllWindowsOSes);
+          AddInclude('xregreg.inc',AllOSes-AllWindowsOSes);
           AddInclude('regini.inc');
           AddUnit('xmlreg');
         end;

+ 2 - 0
packages/fcl-sdo/fpmake.pp

@@ -30,6 +30,7 @@ begin
     // P.NeedLibC:= false;
     P.SourcePath.Add('src/base');
     P.SourcePath.Add('src/das');
+    P.IncludePath.Add('src/das');
 
     T:=P.Targets.AddUnit('sdo_consts.pas');
     T.ResourceStrings := True;
@@ -261,6 +262,7 @@ begin
     with T.Dependencies do
       begin
       AddUnit('data_acces_intf');
+      AddInclude('sdo_global.inc');
       end;
     T:=P.Targets.AddUnit('sdo_das_utils.pas');
     with T.Dependencies do

+ 33 - 20
packages/fpmkunit/src/fpmkunit.pp

@@ -726,10 +726,10 @@ Type
     Function AddExample(const AFiles : String) : TSource;
     Function AddExample(const AFiles : String; AInstallSourcePath : String) : TSource;
     Function AddTest(const AFiles : String) : TSource;
-    procedure AddDocFiles(const AFileMask: string; Recursive: boolean = False; AInstallSourcePath : String = '');
-    procedure AddSrcFiles(const AFileMask: string; Recursive: boolean = False);
-    procedure AddExampleFiles(const AFileMask: string; Recursive: boolean = False; AInstallSourcePath : String = '');
-    procedure AddTestFiles(const AFileMask: string; Recursive: boolean = False);
+    procedure AddDocFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean = False; AInstallSourcePath : String = '');
+    procedure AddSrcFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean = False);
+    procedure AddExampleFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean = False; AInstallSourcePath : String = '');
+    procedure AddTestFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean = False);
     Property SourceItems[Index : Integer] : TSource Read GetSourceItem Write SetSourceItem;default;
   end;
 
@@ -1099,10 +1099,10 @@ Type
     FGeneralCriticalSection: TRTLCriticalSection;
 {$ifdef HAS_UNIT_ZIPPER}
     FZipper: TZipper;
+    FGZFileStream: TGZFileStream;
 {$endif HAS_UNIT_ZIPPER}
 {$ifdef HAS_TAR_SUPPORT}
     FTarWriter: TTarWriter;
-    FGZFileStream: TGZFileStream;
 {$endif HAS_TAR_SUPPORT}
     procedure AddFileToArchive(const APackage: TPackage; Const ASourceFileName, ADestFileName : String);
     procedure FinishArchive(Sender: TObject);
@@ -1368,7 +1368,7 @@ Function GetCustomFpmakeCommandlineOptionValue(const ACommandLineOption : string
 Function AddProgramExtension(const ExecutableName: string; AOS : TOS) : string;
 Function GetImportLibraryFilename(const UnitName: string; AOS : TOS) : string;
 
-procedure SearchFiles(const AFileName: string; Recursive: boolean; var List: TStrings);
+procedure SearchFiles(AFileName, ASearchPathPrefix: string; Recursive: boolean; var List: TStrings);
 function GetDefaultLibGCCDir(CPU : TCPU;OS: TOS; var ErrorMessage: string): string;
 
 Implementation
@@ -1377,7 +1377,11 @@ uses typinfo, rtlconsts;
 
 const
 {$ifdef CREATE_TAR_FILE}
+  {$ifdef HAS_UNIT_ZIPPER}
   ArchiveExtension = '.tar.gz';
+  {$else }
+  ArchiveExtension = '.tar';
+  {$endif HAS_UNIT_ZIPPER}
 {$else CREATE_TAR_FILE}
   ArchiveExtension = '.zip';
 {$endif CREATE_TAR_FILE}
@@ -2392,7 +2396,7 @@ begin
 end;
 
 
-procedure SearchFiles(const AFileName: string; Recursive: boolean; var List: TStrings);
+procedure SearchFiles(AFileName, ASearchPathPrefix: string; Recursive: boolean; var List: TStrings);
 
   procedure AddRecursiveFiles(const SearchDir, FileMask: string; Recursive: boolean);
   var
@@ -2415,12 +2419,16 @@ var
   BasePath: string;
   i: integer;
 begin
+  if IsRelativePath(AFileName) and (ASearchPathPrefix<>'') then
+    AFileName := IncludeTrailingPathDelimiter(ASearchPathPrefix) + AFileName;
+
   BasePath := ExtractFilePath(ExpandFileName(AFileName));
+
   AddRecursiveFiles(BasePath, ExtractFileName(AFileName), Recursive);
 
   CurrDir:=GetCurrentDir;
   for i := 0 to Pred(List.Count) do
-    List[i] := ExtractRelativepath(IncludeTrailingPathDelimiter(CurrDir), List[i]);
+    List[i] := ExtractRelativepath(IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(CurrDir)+ASearchPathPrefix), List[i]);
 end;
 
 Const
@@ -3156,53 +3164,52 @@ begin
   Result.FSourceType:=stTest;
 end;
 
-
-procedure TSources.AddDocFiles(const AFileMask: string; Recursive: boolean; AInstallSourcePath : String = '');
+procedure TSources.AddDocFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean; AInstallSourcePath: String);
 var
   List : TStrings;
   i: integer;
 begin
   List := TStringList.Create;
-  SearchFiles(AFileMask, Recursive, List);
+  SearchFiles(AFileMask, ASearchPathPrefix, Recursive, List);
   for i:= 0 to Pred(List.Count) do
     AddDoc(List[i], AInstallSourcePath);
   List.Free;
 end;
 
 
-procedure TSources.AddSrcFiles(const AFileMask: string; Recursive: boolean);
+procedure TSources.AddSrcFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean);
 var
   List : TStrings;
   i: integer;
 begin
   List := TStringList.Create;
-  SearchFiles(AFileMask, Recursive, List);
+  SearchFiles(AFileMask, ASearchPathPrefix, Recursive, List);
   for i:= 0 to Pred(List.Count) do
     AddSrc(List[i]);
   List.Free;
 end;
 
 
-procedure TSources.AddExampleFiles(const AFileMask: string; Recursive: boolean; AInstallSourcePath : String = '');
+procedure TSources.AddExampleFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean; AInstallSourcePath: String);
 var
   List : TStrings;
   i: integer;
 begin
   List := TStringList.Create;
-  SearchFiles(AFileMask, Recursive, List);
+  SearchFiles(AFileMask, ASearchPathPrefix, Recursive, List);
   for i:= 0 to Pred(List.Count) do
     AddExample(List[i], AInstallSourcePath);
   List.Free;
 end;
 
 
-procedure TSources.AddTestFiles(const AFileMask: string; Recursive: boolean);
+procedure TSources.AddTestFiles(const AFileMask, ASearchPathPrefix: string; Recursive: boolean);
 var
   List : TStrings;
   i: integer;
 begin
   List := TStringList.Create;
-  SearchFiles(AFileMask, Recursive, List);
+  SearchFiles(AFileMask, ASearchPathPrefix, Recursive, List);
   for i:= 0 to Pred(List.Count) do
     AddTest(List[i]);
   List.Free;
@@ -5015,15 +5022,19 @@ begin
   {$ifdef HAS_TAR_SUPPORT}
   if not assigned(FTarWriter) then
     begin
+    {$ifdef HAS_UNIT_ZIPPER}
       FGZFileStream := TGZFileStream.create(GetArchiveName + ArchiveExtension, gzopenwrite);
       try
         FTarWriter := TTarWriter.Create(FGZFileStream);
-        FTarWriter.Permissions := [tpReadByOwner, tpWriteByOwner, tpReadByGroup, tpReadByOther];
-        FTarWriter.UserName := 'root';
-        FTarWriter.GroupName := 'root';
       except
         FGZFileStream.Free;
       end;
+    {$else}
+    FTarWriter := TTarWriter.Create(GetArchiveName + ArchiveExtension);
+    {$endif HAS_UNIT_ZIPPER}
+    FTarWriter.Permissions := [tpReadByOwner, tpWriteByOwner, tpReadByGroup, tpReadByOther];
+    FTarWriter.UserName := 'root';
+    FTarWriter.GroupName := 'root';
     end;
 {$ifdef unix}
   if (FpStat(ASourceFileName, FileStat) = 0) and (FileStat.st_mode and S_IXUSR = S_IXUSR) then
@@ -5060,7 +5071,9 @@ begin
   if assigned(FTarWriter) then
     begin
       FreeAndNil(FTarWriter);
+      {$ifdef HAS_UNIT_ZIPPER}
       FGZFileStream.Free;
+      {$endif HAS_UNIT_ZIPPER}
     end;
   {$endif HAS_TAR_SUPPORT}
   {$ifdef HAS_UNIT_ZIPPER}

+ 2 - 0
packages/fppkg/fpmake.pp

@@ -47,6 +47,7 @@ begin
     P.OSes := P.OSes - [embedded,nativent,msdos];
 
     P.SourcePath.Add('src');
+    P.IncludePath.Add('src');
 
     T:=P.Targets.AddUnit('fprepos.pp');
     T.ResourceStrings:=true;
@@ -66,6 +67,7 @@ begin
     T:=P.Targets.AddUnit('pkgmkconv.pp');
     T:=P.Targets.AddUnit('pkgdownload.pp');
     T:=P.Targets.AddUnit('pkgfpmake.pp');
+    T.Dependencies.AddInclude('fpmkunitsrc.inc');
     T:=P.Targets.AddUnit('pkgcommands.pp');
 
     T:=P.Targets.AddUnit('pkgwget.pp', TargetsWithWGet);

File diff suppressed because it is too large
+ 365 - 353
packages/fppkg/src/fpmkunitsrc.inc


+ 50 - 0
packages/fppkg/src/pkgcommands.pp

@@ -125,9 +125,58 @@ type
     Procedure Execute;override;
   end;
 
+  { TCommandInfo }
+
+  TCommandInfo = Class(TPackagehandler)
+  Public
+    Procedure Execute;override;
+  end;
+
 var
   DependenciesDepth: integer;
 
+{ TCommandInfo }
+
+procedure TCommandInfo.Execute;
+var
+  P : TFPPackage;
+  S : string;
+  I : Integer;
+begin
+  if PackageName='' then
+    Error(SErrNoPackageSpecified);
+  P:=AvailableRepository.PackageByName(PackageName);
+
+  log(llProgres,SLogPackageInfoName,[P.Name]);
+  S := P.Email;
+  if S <> '' then
+    S := '<' + S +'>';
+  log(llProgres,SLogPackageInfoAuthor,[P.Author, S]);
+  log(llProgres,SLogPackageInfoVersion,[P.Version.AsString]);
+  log(llProgres,SLogPackageInfoCategory,[P.Category]);
+  log(llProgres,SLogPackageInfoWebsite,[P.HomepageURL]);
+  log(llProgres,SLogPackageInfoLicense,[P.License]);
+
+  log(llProgres,SLogPackageInfoOSes,[OSesToString(P.OSes)]);
+  log(llProgres,SLogPackageInfoCPUs,[CPUSToString(P.CPUs)]);
+
+  log(llProgres,SLogPackageInfoDescription1);
+  log(llProgres,SLogPackageInfoDescription2,[P.Description]);
+
+  if P.Dependencies.Count>0 then
+    begin
+      log(llProgres,SLogPackageInfoDependencies1,[]);
+      for I := 0 to P.Dependencies.Count-1 do
+        begin
+          if not P.Dependencies[I].MinVersion.Empty then
+            S := '('+P.Dependencies[I].MinVersion.AsString+')'
+          else
+            S := '';
+          log(llProgres,SLogPackageInfoDependencies2,[P.Dependencies[I].PackageName,S]);
+        end;
+    end;
+end;
+
 { TCommandUnInstall }
 
 procedure TCommandUnInstall.Execute;
@@ -585,4 +634,5 @@ initialization
   RegisterPkgHandler('installdependencies',TCommandInstallDependencies);
   RegisterPkgHandler('fixbroken',TCommandFixBroken);
   RegisterPkgHandler('listsettings',TCommandListSettings);
+  RegisterPkgHandler('info',TCommandInfo);
 end.

+ 1 - 1
packages/fppkg/src/pkgglobals.pp

@@ -49,7 +49,7 @@ Const
      undef  : 'NO_UNIT_PROCESS'),
    (package: 'libtar';
     reqver : '2.7.1';
-    undef  : ''),
+    undef  : 'NO_TAR_SUPPORT'),
     (package: 'fpmkunit';
      reqver : '2.2.2-1';
      undef  : '')

+ 13 - 0
packages/fppkg/src/pkgmessages.pp

@@ -101,6 +101,19 @@ Resourcestring
   SLogCompilerCfgGlobalPrefix     = ' GlobalPrefix:     "%s" -> "%s"';
   SLogCompilerCfgLocalPrefix      = ' LocalPrefix:      "%s" -> "%s"';
 
+  SLogPackageInfoName             = 'Package:        %s';
+  SLogPackageInfoVersion          = 'Version:        %s';
+  SLogPackageInfoAuthor           = 'Author:         %s %s';
+  SLogPackageInfoCategory         = 'Category:       %s';
+  SLogPackageInfoLicense          = 'License:        %s';
+  SLogPackageInfoWebsite          = 'Website:        %s';
+  SLogPackageInfoOSes             = 'Supported OSes: %s';
+  SLogPackageInfoCPUs             = 'Supported CPUs: %s';
+  SLogPackageInfoDescription1     = 'Description:';
+  SLogPackageInfoDescription2     = '%s';
+  SLogPackageInfoDependencies1    = 'Dependencies:';
+  SLogPackageInfoDependencies2    = '  %s %s';
+
   SDbgFound                  = 'Found';
   SDbgNotFound               = 'Not Found';
   SDbgDirectoryExists        = 'Directory "%s" %s';

+ 3 - 1
packages/gdbint/fpmake.pp

@@ -178,7 +178,7 @@ begin
     T := p.Targets.AddProgram('src'+PathDelim+'gdbver.pp');
     T.Install := false;
     //
-    // NOTE: the gdbver.inc dependancies gives warnings because the makefile.fpc
+    // NOTE: the gdbver.inc dependencies gives warnings because the makefile.fpc
     // does a "cp src/gdbver_nogdb.inc src/gdbver.inc" to create it
 
     T:=P.Targets.AddUnit('gdbcon.pp');
@@ -191,6 +191,8 @@ begin
     P.Targets.AddExampleProgram('testgdb.pp');
     P.Targets.AddExampleProgram('symify.pp');
     P.Targets.AddExampleUnit('mingw.pas');
+
+    P.Sources.AddSrc('src/gdbver_nogdb.inc');
     end;
 end;
 

+ 1 - 1
packages/gmp/fpmake.pp

@@ -30,7 +30,7 @@ begin
 
     T:=P.Targets.AddUnit('gmp.pas');
 
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 25 - 12
packages/gtk2/fpmake.pp

@@ -170,6 +170,9 @@ begin
       with T.Dependencies do
         begin
           AddInclude('gdkincludes.inc');
+          AddInclude('gdkdisplaymanager.inc');
+          AddInclude('gdkspawn.inc');
+          AddInclude('gdkcairo.inc');
           AddInclude('gdkcolor.inc');
           AddInclude('gdkcursor.inc');
           AddInclude('gdkdnd.inc');
@@ -194,7 +197,6 @@ begin
           AddInclude('gdktypes.inc');
           AddInclude('gdkvisual.inc');
           AddInclude('gdkwindow.inc');
-          AddInclude('gdkincludes.inc');
           AddInclude('gdkcolor.inc');
           AddInclude('gdkcursor.inc');
           AddInclude('gdkdnd.inc');
@@ -219,7 +221,6 @@ begin
           AddInclude('gdktypes.inc');
           AddInclude('gdkvisual.inc');
           AddInclude('gdkwindow.inc');
-          AddInclude('gdkincludes.inc');
           AddInclude('gdkcolor.inc');
           AddInclude('gdkcursor.inc');
           AddInclude('gdkdnd.inc');
@@ -244,7 +245,6 @@ begin
           AddInclude('gdktypes.inc');
           AddInclude('gdkvisual.inc');
           AddInclude('gdkwindow.inc');
-          AddInclude('gdkincludes.inc');
           AddInclude('gdkcolor.inc');
           AddInclude('gdkcursor.inc');
           AddInclude('gdkdnd.inc');
@@ -439,6 +439,9 @@ begin
           AddInclude('gboxed.inc');
           AddInclude('gmodule.inc');
           AddInclude('gmarshal.inc');
+          AddInclude('gincludes.inc');
+          AddInclude('goption.inc');
+          AddInclude('gwin32.inc',AllWindowsOSes);
         end;
     T:=P.Targets.AddImplicitUnit('src/gtk+/gtk/gtk2.pas');
       T.IncludePath.Add('src/gtk+/gtk');
@@ -1132,6 +1135,14 @@ begin
           AddInclude('gtkentrycompletion.inc');
           AddInclude('gtkuimanager.inc');
           AddInclude('gtktreemodelfilter.inc');
+
+          AddInclude('gtkseparatortoolitem.inc');
+          AddInclude('gtkaboutdialog.inc');
+          AddInclude('gtkcellrendererprogress.inc');
+          AddInclude('gtkfilechooserbutton.inc');
+          AddInclude('gtkcellview.inc');
+          AddInclude('gtkiconview.inc');
+          AddInclude('gtkmenutoolbutton.inc');
         end;
     T:=P.Targets.AddImplicitUnit('src/gtkglext/gtkglext.pas');
       T.IncludePath.Add('src/gtkglext');
@@ -1220,6 +1231,8 @@ begin
           AddInclude('pango-item.inc');
           AddInclude('pango-layout.inc');
           AddInclude('pango-tabs.inc');
+          AddInclude('pango-matrix.inc');
+          AddInclude('pango-renderer.inc');
         end;
     
     T:=P.Targets.AddImplicitUnit('src/pangocairo/pangocairo.pas');
@@ -1266,15 +1279,15 @@ begin
            AddInclude('htmldocument.inc');
            AddInclude('htmlview.inc');
          end;}
-    P.Sources.AddExampleFiles('examples/*',false,'.');
-    P.Sources.AddExampleFiles('examples/filechooser/*',false,'filechooser');
-    P.Sources.AddExampleFiles('examples/gettingstarted/*',false,'gettingstarted');
-    P.Sources.AddExampleFiles('examples/gtk_demo/*',false,'gtk_demo');
-    P.Sources.AddExampleFiles('examples/gtkglext/*',false,'gtkglext');
-    P.Sources.AddExampleFiles('examples/helloworld/*',false,'helloworld');
-    P.Sources.AddExampleFiles('examples/helloworld2/*',false,'helloworld2');
-    P.Sources.AddExampleFiles('examples/plugins/*',false,'plugins');
-    P.Sources.AddExampleFiles('examples/scribble_simple/*',false,'scribble_simple');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
+    P.Sources.AddExampleFiles('examples/filechooser/*',P.Directory,false,'filechooser');
+    P.Sources.AddExampleFiles('examples/gettingstarted/*',P.Directory,false,'gettingstarted');
+    P.Sources.AddExampleFiles('examples/gtk_demo/*',P.Directory,false,'gtk_demo');
+    P.Sources.AddExampleFiles('examples/gtkglext/*',P.Directory,false,'gtkglext');
+    P.Sources.AddExampleFiles('examples/helloworld/*',P.Directory,false,'helloworld');
+    P.Sources.AddExampleFiles('examples/helloworld2/*',P.Directory,false,'helloworld2');
+    P.Sources.AddExampleFiles('examples/plugins/*',P.Directory,false,'plugins');
+    P.Sources.AddExampleFiles('examples/scribble_simple/*',P.Directory,false,'scribble_simple');
 
 
 {$ifndef ALLPACKAGES}

+ 2 - 0
packages/hash/fpmake.pp

@@ -28,7 +28,9 @@ begin
 
     P.Version:='3.0.1';
     T:=P.Targets.AddUnit('src/md5.pp');
+    T.Dependencies.AddInclude('src/md5i386.inc', [i386], AllOSes-[darwin]);
     T:=P.Targets.AddUnit('src/sha1.pp');
+    T.Dependencies.AddInclude('src/sha1i386.inc', [i386], AllOSes-[darwin]);
     T:=P.Targets.AddUnit('src/crc.pas');
     T:=P.Targets.AddUnit('src/ntlm.pas');
     T:=P.Targets.AddUnit('src/uuid.pas');

+ 1 - 1
packages/ibase/fpmake.pp

@@ -45,7 +45,7 @@ begin
     P.ExamplePath.Add('examples');
     P.Targets.AddExampleProgram('testib40.pp');
     P.Targets.AddExampleProgram('testib60.pp');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 1 - 0
packages/imagemagick/fpmake.pp

@@ -42,6 +42,7 @@ begin
           AddInclude('magick_type.inc');
           AddInclude('type.inc');
           AddInclude('cache_view.inc');
+          AddInclude('cache.inc');
           AddInclude('compare.inc');
           AddInclude('constitute.inc');
           AddInclude('draw.inc');

+ 1 - 1
packages/libcurl/fpmake.pp

@@ -33,7 +33,7 @@ begin
     P.ExamplePath.Add('examples');
     P.Targets.AddExampleProgram('testcurl.pp');
     P.Targets.AddExampleProgram('teststream.pp');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 
 {$ifndef ALLPACKAGES}

+ 1 - 1
packages/libgbafpc/fpmake.pp

@@ -70,7 +70,7 @@ begin
        AddInclude('mm_types.inc');
      end;
 
-    P.Sources.AddExampleFiles('examples/*',true,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,true,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 1 - 1
packages/libgd/fpmake.pp

@@ -27,7 +27,7 @@ begin
     P.ExamplePath.Add('examples');
     P.Targets.AddExampleProgram('gdtestcgi.pp');
     P.Targets.AddExampleProgram('gdtest.pp');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 1 - 1
packages/libndsfpc/fpmake.pp

@@ -144,7 +144,7 @@ begin
        AddInclude('mm_types.inc');
      end;
 
-    P.Sources.AddExampleFiles('examples/*',true,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,true,'.');
 {$ifndef ALLPACKAGES}
     Run;
     end;

+ 1 - 1
packages/libogcfpc/fpmake.pp

@@ -149,7 +149,7 @@ begin
        AddInclude('wpad.inc');
      end;
 
-     P.Sources.AddExampleFiles('examples/*',true,'.');
+     P.Sources.AddExampleFiles('examples/*',P.Directory,true,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 2 - 1
packages/libxml/fpmake.pp

@@ -25,6 +25,7 @@ begin
   T:=P.Targets.AddUnit('xml2.pas');
   with T.Dependencies do
     begin
+      AddInclude('xml2.inc');
       AddInclude('xinclude.inc');
       AddInclude('xpointer.inc');
       AddInclude('HTMLparser.inc');
@@ -87,7 +88,7 @@ begin
     P.Targets.AddExampleProgram('tree2.pas');
     P.Targets.AddExampleProgram('exutils.pas');
     P.Targets.AddExampleProgram('reader2.pas');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 1 - 1
packages/odbc/fpmake.pp

@@ -34,7 +34,7 @@ begin
 
     P.ExamplePath.Add('examples');
     P.Targets.AddExampleProgram('testodbc.pp');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 1 - 1
packages/opengles/fpmake.pp

@@ -30,7 +30,7 @@ begin
     T:=P.Targets.AddUnit('gles20.pas',[linux,win32,win64,wince,darwin]);
 
     P.Targets.AddExampleProgram('examples/es2example1.pas');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 
 {$ifndef ALLPACKAGES}

+ 1 - 1
packages/os2units/fpmake.pp

@@ -46,7 +46,7 @@ begin
     P.Targets.AddExampleProgram('clktest.pas');
     P.Targets.AddExampleProgram('ftptest.pas');
     P.Targets.AddExampleProgram('lvmtest.pas');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 1 - 1
packages/postgres/fpmake.pp

@@ -57,7 +57,7 @@ begin
     P.ExamplePath.Add('examples');
     P.Targets.AddExampleProgram('testpg2.pp');
     P.Targets.AddExampleProgram('testpg1.pp');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 1 - 1
packages/ptc/fpmake.pp

@@ -235,7 +235,7 @@ begin
     P.Targets.AddExampleProgram('tunnel3d.pp');
     P.Targets.AddExampleProgram('ptcgl.pp', AllUnixOSes + [win32, win64]);
     P.Targets.AddExampleProgram('ptcgl2.pp', AllUnixOSes + [win32, win64]);
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 1 - 1
packages/regexpr/fpmake.pp

@@ -34,7 +34,7 @@ begin
 
     P.ExamplePath.Add('examples');
     P.Targets.AddExampleProgram('testreg1.pp');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 6 - 0
packages/rtl-extra/fpmake.pp

@@ -77,12 +77,15 @@ begin
     P.IncludePath.Add('src/unix',AllUnixOSes);
     P.IncludePath.Add('src/$(OS)');
     P.IncludePath.Add('src/darwin',[iphonesim]);
+    P.IncludePath.Add('src/win',AllWindowsOSes);
 
     T:=P.Targets.AddUnit('ucomplex.pp',UComplexOSes);
 
     T:=P.Targets.AddUnit('objects.pp',ObjectsOSes);
 
     T:=P.Targets.AddUnit('printer.pp',PrinterOSes);
+    T.Dependencies.AddInclude('printerh.inc',PrinterOSes);
+    T.Dependencies.AddInclude('printer.inc',PrinterOSes);
 
     T:=P.Targets.AddUnit('matrix.pp',MatrixOSes);
     with T.Dependencies do
@@ -105,7 +108,9 @@ begin
     T:=P.Targets.AddUnit('sockets.pp',SocketsOSes);
     with T.Dependencies do
      begin
+       addinclude('osdefs.inc',AllUnixOSes);
        addinclude('socketsh.inc');
+       addinclude('fpwinsockh.inc',AllWindowsOSes);
        addinclude('sockets.inc');
        addinclude('sockovl.inc');
        addinclude('unxsockh.inc',UnixLikes);
@@ -116,6 +121,7 @@ begin
     T:=P.Targets.AddUnit('ipc.pp',IPCOSes);
     with T.Dependencies do
      begin
+       addinclude('osdefs.inc');
        addinclude('ipcbsd.inc',IPCBSDs);
        addinclude('ipcsys.inc',[Linux]);
        addinclude('ipccall.inc',[Linux]);

+ 1 - 0
packages/rtl-objpas/fpmake.pp

@@ -65,6 +65,7 @@ begin
     with T.Dependencies do
       begin
         AddInclude('varutilh.inc');
+        AddInclude('varerror.inc');
         AddInclude('varutils.inc',VarUtilsOSes-[win32,win64]);
         AddInclude('cvarutil.inc');
       end;

+ 7 - 1
packages/rtl-unicode/fpmake.pp

@@ -12,7 +12,7 @@ Const
   // in workable state atm.
   UnixLikes = AllUnixOSes -[QNX];
 
-  CollationOSes = [aix,android,darwin,emx,freebsd,linux,netbsd,openbsd,os2,solaris,win32,win64,dragonfly];
+  CollationOSes = [aix,android,darwin,emx,freebsd,linux,netbsd,openbsd,os2,solaris,win32,win64,dragonfly,haiku];
   CPUnits       = [aix,amiga,aros,android,beos,darwin,iphonesim,emx,gba,freebsd,go32v2,haiku,linux,morphos,netbsd,netware,netwlibc,openbsd,os2,solaris,watcom,wii,win32,win64,wince,dragonfly];
   utf8bidiOSes  = [netware,netwlibc];
   freebidiOSes  = [netware,netwlibc];  
@@ -49,6 +49,12 @@ begin
     P.IncludePath.Add('src/collations');
 
     T:=P.Targets.AddUnit('unicodeducet.pas',CollationOSes);
+    with T.Dependencies do
+      begin
+        AddInclude('ucadata.inc');
+        AddInclude('ucadata_le.inc');
+        AddInclude('ucadata_be.inc');
+      end;
     T:=P.Targets.AddUnit('buildcollations.pas',CollationOSes);
     T.Install:=False;
     with T.Dependencies do

+ 1 - 1
packages/svgalib/fpmake.pp

@@ -28,7 +28,7 @@ begin
     P.ExamplePath.Add('examples');
     P.Targets.AddExampleProgram('testvga.pp');
     P.Targets.AddExampleProgram('vgatest.pp');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 1 - 1
packages/syslog/fpmake.pp

@@ -24,7 +24,7 @@ begin
 
     P.ExamplePath.Add('examples');
     P.Targets.AddExampleProgram('testlog.pp');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 {$ifndef ALLPACKAGES}
     Run;

+ 1 - 1
packages/uuid/fpmake.pp

@@ -29,7 +29,7 @@ begin
     P.ExamplePath.Add('examples');
     P.Targets.AddExampleProgram('testlibuid.pp');
     P.Targets.AddExampleProgram('testuid.pp');
-    P.Sources.AddExampleFiles('examples/*',false,'.');
+    P.Sources.AddExampleFiles('examples/*',P.Directory,false,'.');
 
 
 {$ifndef ALLPACKAGES}

+ 3 - 0
packages/winunits-jedi/fpmake.pp

@@ -257,6 +257,9 @@ begin
     // Build unit depending on all implicit units
     TBuild:=P.Targets.AddUnit('buildjwa.pp');
       TBuild.Install:=False;
+      TBuild.Dependencies.AddInclude('src/jediapilib.inc');
+      TBuild.Dependencies.AddInclude('src/jedi.inc');
+      TBuild.Dependencies.AddInclude('src/ModuleLoader.pas');
       For I:=0 to P.Targets.Count-1 do
         begin
           T:=P.Targets.TargetItems[I];

+ 7 - 5
rtl/arm/arm.inc

@@ -879,8 +879,6 @@ asm
 {$else}
 {$ifdef SYSTEM_HAS_KUSER_CMPXCHG}
   stmfd r13!, {r4, lr}
-  mvn   r3, #0x0000f000
-  sub   r3, r3, #0x3F
 
   mov   r4, r2 // Swap parameters around
   mov   r2, r0
@@ -888,9 +886,13 @@ asm
 
   // r1 and r2 will not be clobbered by kuser_cmpxchg
   // If we have to loop, r0 will be set to the original Comperand
+  // kuser_cmpxchg is documented to destroy r3, therefore setting
+  // r3 must be in the loop
   .Linterlocked_compare_exchange_loop:
+  mvn   r3, #0x0000f000
+  sub   r3, r3, #0x3F
 {$ifdef CPUARM_HAS_BLX}
-  blx r3	 // Call kuser_cmpxchg, sets C-Flag on success
+  blx r3       // Call kuser_cmpxchg, sets C-Flag on success
 {$else}
   mov lr, pc
 {$ifdef CPUARM_HAS_BX}
@@ -906,11 +908,11 @@ asm
   // The loop case is HIGHLY unlikely, it would require that we got rescheduled between
   // calling kuser_cmpxchg and the ldr. While beeing rescheduled another process/thread
   // would have the set the value to our comperand
-  ldr	r0, [r2] // Load the currently set value
+  ldr   r0, [r2] // Load the currently set value
   cmp   r0, r4   // Return if Comperand != current value, otherwise loop again
   ldmnefd r13!, {r4, pc}
   // If we need to loop here, we have to
-  b	.Linterlocked_compare_exchange_loop
+  b    .Linterlocked_compare_exchange_loop
 
 {$else}
 // lock

+ 4 - 2
rtl/arm/armdefines.inc

@@ -14,6 +14,8 @@
 
  **********************************************************************}
 
-{$if defined(LINUX) and (defined(CPUARMEL) or defined(CPUARMHF))}
-{$define SYSTEM_HAS_KUSER_CMPXCHG} // system has kuser_cmpxchg method
+{$if defined(LINUX) or defined(ANDROID)}
+  {$if defined(CPUARMEL) or defined(CPUARMHF)}
+    {$define SYSTEM_HAS_KUSER_CMPXCHG} // system has kuser_cmpxchg method
+  {$endif}
 {$endif}

+ 162 - 154
rtl/haiku/Makefile

@@ -348,163 +348,163 @@ override FPCOPT+= -dHASUNIX -n -dFPC_USE_LIBC -Si
 OBJPASDIR=$(RTL)/objpas
 GRAPHDIR=$(INC)/graph
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-nativent)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-android)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i386-aros)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc-aix)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),x86_64-netbsd)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),x86_64-openbsd)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),x86_64-iphonesim)
 override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
@@ -513,76 +513,76 @@ ifeq ($(FULL_TARGET),x86_64-aros)
 override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
 endif
 ifeq ($(FULL_TARGET),x86_64-dragonfly)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),arm-android)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),powerpc64-aix)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),mips-linux)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),mipsel-embedded)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),mipsel-android)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),jvm-java)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),jvm-android)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i8086-msdos)
-override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
+override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp fpwidestring
 endif
 ifeq ($(FULL_TARGET),i8086-win16)
 override TARGET_UNITS+=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings errors dos dl sysconst sysutils types charset cpall character typinfo classes fgl math cpu mmx getopts heaptrc lineinfo lnfodwrf rtlconsts syscall unix unixutil termio initc cmem dynlibs cwstring cthreads fpintres unixcp
@@ -840,163 +840,163 @@ ifeq ($(FULL_TARGET),aarch64-darwin)
 override TARGET_IMPLICITUNITS+=exeinfo cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 cp437 cp646 cp850 cp856 cp866 cp874 cp8859_1 cp8859_5 cp8859_2 cp852 unicodedata unicodenumtable
 endif
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-nativent)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-android)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i386-aros)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc-aix)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),x86_64-netbsd)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),x86_64-openbsd)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),x86_64-iphonesim)
 override TARGET_LOADERS+=prt0 cprt0 func dllprt
@@ -1005,76 +1005,76 @@ ifeq ($(FULL_TARGET),x86_64-aros)
 override TARGET_LOADERS+=prt0 cprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),x86_64-dragonfly)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),arm-android)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),powerpc64-aix)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),mips-linux)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),mipsel-embedded)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),mipsel-android)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),jvm-java)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),jvm-android)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i8086-msdos)
-override TARGET_LOADERS+=prt0 cprt0 func dllprt
+override TARGET_LOADERS+=prt0 cprt0 dllcprt0 func dllprt
 endif
 ifeq ($(FULL_TARGET),i8086-win16)
 override TARGET_LOADERS+=prt0 cprt0 func dllprt
@@ -3297,6 +3297,8 @@ prt0$(OEXT) : $(CPU_TARGET)/prt0.as
 	$(AS) -o $(UNITTARGETDIRPREFIX)prt0$(OEXT) $(CPU_TARGET)/prt0.as
 cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
 	$(AS) -o $(UNITTARGETDIRPREFIX)cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
+dllcprt0$(OEXT) : $(CPU_TARGET)/dllcprt0.as
+	$(AS) -o $(UNITTARGETDIRPREFIX)dllcprt0$(OEXT) $(CPU_TARGET)/dllcprt0.as
 func$(OEXT) : $(CPU_TARGET)/func.as
 	$(AS) -o $(UNITTARGETDIRPREFIX)func$(OEXT) $(CPU_TARGET)/func.as
 dllprt$(OEXT) : $(CPU_TARGET)/dllprt.as
@@ -3352,6 +3354,12 @@ lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT)
 charset$(PPUEXT) : $(INC)/charset.pp objpas$(PPUEXT)
 cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
 	$(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
+iso7185$(PPUEXT) : $(INC)/iso7185.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/iso7185.pp
+fpintres$(PPUEXT) : $(INC)/fpintres.pp $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(INC)/fpintres.pp
+fpwidestring$(PPUEXT) : $(OBJPASDIR)/fpwidestring.pp character$(PPUEXT) unixcp$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+	$(COMPILER) $(OBJPASDIR)/fpwidestring.pp
 termio$(PPUEXT) : baseunix$(PPUEXT)
 dl$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)
 dynlibs$(PPUEXT) : $(INC)/dynlibs.pas $(UNIXINC)/dynlibs.inc dl$(PPUEXT) objpas$(PPUEXT)

+ 13 - 2
rtl/haiku/Makefile.fpc

@@ -6,7 +6,7 @@
 main=rtl
 
 [target]
-loaders=prt0 cprt0 func dllprt
+loaders=prt0 cprt0 dllcprt0 func dllprt
 units=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings \
 #      beos \
       errors dos dl \
@@ -16,7 +16,7 @@ units=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings \
       rtlconsts syscall unix unixutil termio initc \
       cmem \
       dynlibs cwstring cthreads \
-      fpintres unixcp
+      fpintres unixcp fpwidestring
 rsts=math typinfo sysconst rtlconsts
 implicitunits=exeinfo \
       cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
@@ -99,6 +99,9 @@ prt0$(OEXT) : $(CPU_TARGET)/prt0.as
 cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
         $(AS) -o $(UNITTARGETDIRPREFIX)cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
 
+dllcprt0$(OEXT) : $(CPU_TARGET)/dllcprt0.as
+        $(AS) -o $(UNITTARGETDIRPREFIX)dllcprt0$(OEXT) $(CPU_TARGET)/dllcprt0.as
+
 func$(OEXT) : $(CPU_TARGET)/func.as
         $(AS) -o $(UNITTARGETDIRPREFIX)func$(OEXT) $(CPU_TARGET)/func.as
 
@@ -214,6 +217,14 @@ charset$(PPUEXT) : $(INC)/charset.pp objpas$(PPUEXT)
 cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
         $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
 
+iso7185$(PPUEXT) : $(INC)/iso7185.pp $(SYSTEMUNIT)$(PPUEXT)
+        $(COMPILER) $(INC)/iso7185.pp
+
+fpintres$(PPUEXT) : $(INC)/fpintres.pp $(SYSTEMUNIT)$(PPUEXT)
+        $(COMPILER) $(INC)/fpintres.pp
+
+fpwidestring$(PPUEXT) : $(OBJPASDIR)/fpwidestring.pp character$(PPUEXT) unixcp$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+        $(COMPILER) $(OBJPASDIR)/fpwidestring.pp
 #
 # Other system-dependent RTL Units
 #

+ 207 - 0
rtl/haiku/i386/dllcprt0.as

@@ -0,0 +1,207 @@
+       .file   "dllcprt0.as"
+.data
+        .align 4
+default_environ:
+        .long 0
+.text
+.globl initialize_after
+        .type    initialize_after,@function
+initialize_after:
+	.globl FPC_SHARED_LIB_START
+	.type FPC_SHARED_LIB_START,@function
+FPC_SHARED_LIB_START:
+        /* We are in a library if we link something against this code */
+        movb $1,operatingsystem_islibrary
+        /* Initialize freepascal variables in the shared object so they 
+           can be used as expected.
+           
+           As we link with libroot (our libc), just copy values from the 
+           corresponding external variables in the Freepascal ones. 
+           They are already initialized by libroot initialization. 
+           
+           Inspired by /haiku/src/system/glue/start_dyn.c 
+           and /haiku/src/system/libroot/libroot_init.c
+        */        
+        movl __libc_argc,%eax
+        movl %eax,operatingsystem_parameter_argc
+        movl __libc_argv,%eax
+        movl %eax,operatingsystem_parameter_argv
+        movl environ,%eax
+        movl %eax,operatingsystem_parameter_envp
+        xorl %ebp,%ebp
+        call PASCALMAIN
+
+.globl  _haltproc
+.type   _haltproc,@function
+_haltproc:
+        call _thread_do_exit_notification
+        xorl %ebx,%ebx
+    movw operatingsystem_result,%bx
+        pushl %ebx
+        call exit
+
+
+/* int sys_open (int=0xFF000000, char * name, int mode, int=0, int close_on_exec=0); */
+.globl sys_open
+.type sys_open,@function
+sys_open:
+xorl %eax,%eax
+int $0x25
+ret
+
+/* int sys_close (int handle) */
+.globl sys_close
+.type sys_close,@function
+sys_close:
+mov $0x01,%eax
+int $0x25
+ret
+
+/* int sys_read (int handle, void * buffer, int length) */
+.globl sys_read
+.type sys_read,@function
+sys_read:
+movl $0x02,%eax
+int $0x25
+ret
+
+/* int sys_write (int handle, void * buffer, int length) */
+.globl sys_write
+.type sys_write,@function
+sys_write:
+movl $0x3,%eax
+int $0x25
+ret
+
+/* int sys_lseek (int handle, long long pos, int whence) */
+.globl sys_lseek
+.type sys_lseek,@function
+sys_lseek:
+movl $0x5,%eax
+int $0x25
+ret
+
+/* int sys_time(void) */
+.globl sys_time
+.type sys_time,@function
+sys_time:
+movl $0x7,%eax
+int $0x25
+ret
+
+/* int sys_resize_area */
+.globl sys_resize_area
+.type sys_resize_area,@function
+sys_resize_area:
+movl $0x8,%eax
+int $0x25
+ret
+
+/* int sys_opendir (0xFF000000, chra * name, 0) */
+.globl sys_opendir
+.type sys_opendir,@function
+sys_opendir:
+movl $0xC,%eax
+int $0x25
+ret
+
+
+/* int sys_create_area */
+.globl sys_create_area
+.type sys_create_area,@function
+sys_create_area:
+movl $0x14,%eax
+int $0x25
+ret
+
+/* int sys_readdir (int handle, void * dirent, 0x11C, 0x01000000) */
+.globl sys_readdir
+.type sys_readdir,@function
+sys_readdir:
+movl $0x1C,%eax
+int $0x25
+ret
+
+/* int sys_mkdir (char=0xFF, char * name, int mode) */
+.globl sys_mkdir
+.type sys_mkdir,@function
+sys_mkdir:
+movl $0x1E,%eax
+int $0x25
+ret
+
+/* int sys_wait_for_thread */
+.globl sys_wait_for_thread
+.type sys_wait_for_thread,@function
+sys_wait_for_thread:
+movl $0x22,%eax
+int $0x25
+ret
+
+/* int sys_rename (int=0xFF000000, char * name, int=0xFF000000, char * newname) */
+.globl sys_rename
+.type sys_rename,@function
+sys_rename:
+movl $0x26,%eax
+int $0x25
+ret
+
+/* int sys_unlink (int=0xFF000000, char * name) */
+.globl sys_unlink
+.type sys_unlink,@function
+sys_unlink:
+movl $0x27,%eax
+int $0x25
+ret
+
+/* int sys_stat (int=0xFF000000, char * name, struct stat * s, int=0) */
+.globl sys_stat
+.type sys_stat,@function
+sys_stat:
+movl $0x30,%eax
+int $0x25
+ret
+
+/* int sys_load_image */
+.globl sys_load_image
+.type sys_load_image,@function
+sys_load_image:
+movl $0x34,%eax
+int $0x25
+ret
+
+/* void sys_exit (int exitcode) */
+.globl sys_exit
+.type sys_exit,@function
+sys_exit:
+movl $0x3F,%eax
+int $0x25
+
+/* void sys_chdir (char 0xFF, char * name) */
+.globl sys_chdir
+.type sys_chdir,@function
+sys_chdir:
+movl $0x57,%eax
+int $0x25
+ret
+
+/* void sys_rmdir (char 0xFF, char * name) */
+.globl sys_rmdir
+.type sys_rmdir,@function
+sys_rmdir:
+movl $0x60,%eax
+int $0x25
+ret
+
+/* actual syscall */
+.globl sys_call
+.type sys_call,@function
+sys_call:
+int $0x25
+ret
+
+.bss
+        .comm operatingsystem_parameter_envp,4
+        .comm operatingsystem_parameter_argc,4
+        .comm operatingsystem_parameter_argv,4
+	

+ 8 - 0
rtl/haiku/ptypes.inc

@@ -38,6 +38,14 @@ type
   end;
   PStatFS=^TStatFS;
 
+  mbstate_t = record
+    converter : pointer;
+    charset : array[0..63] of char;
+    count : cuint;
+    data : array[0..1023+8] of char;	{ 1024 bytes for data, 8 for alignment space }
+  end;
+  pmbstate_t = ^mbstate_t;
+
     dev_t    = cuint32;         { used for device numbers      }
     TDev     = dev_t;
     pDev     = ^dev_t;

+ 1 - 1
rtl/inc/ustrings.inc

@@ -2195,7 +2195,7 @@ begin
   for i:=0 to length(s)-2 do  { -2 because s contains explicit terminating #0 }
     begin
       nc:=s[i];
-      if (nc<$ffff) then
+      if (nc<=$ffff) then
         dest^:=widechar(nc)
       else if (dword(nc)<=$10ffff) then
         begin

+ 1 - 1
rtl/objpas/classes/streams.inc

@@ -205,7 +205,7 @@ end;
     begin
       T:=0;
       Repeat
-         r:=Write(PByte(@Buffer)[t],Count);
+         r:=Write(PByte(@Buffer)[t],Count-t);
          inc(t,r);
       Until (t=count) or (r<=0);
       if (t<Count) then

+ 9 - 4
rtl/os2/sysutils.pp

@@ -422,10 +422,15 @@ Var
 Begin
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(Filename);
   New(FS);
-  FillChar(FS, SizeOf(FS^), 0);
-  FS^.AttrFile:=Attr;
-  RC := DosSetPathInfo(PChar (SystemFileName), ilStandard, FS, SizeOf(FS^), 0);
-  if RC <> 0 then
+  RC := DosQueryPathInfo (PChar (SystemFileName), ilStandard, FS, SizeOf (FS^));
+  if RC = 0 then
+   begin
+    FS^.AttrFile:=Attr;
+    RC := DosSetPathInfo(PChar (SystemFileName), ilStandard, FS, SizeOf(FS^), 0);
+    if RC <> 0 then
+     OSErrorWatch (RC);
+   end
+  else
    OSErrorWatch (RC);
   Result := - longint (RC);
   Dispose(FS);

+ 19 - 18
rtl/unix/cwstring.pp

@@ -90,7 +90,7 @@ function setlocale(category: cint; locale: pchar): pchar; cdecl; external clib n
 {$else}
 function setlocale(category: cint; locale: pchar): pchar; cdecl; external clib name 'setlocale';
 {$endif}
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
 function mbrtowc(pwc: pwchar_t; const s: pchar; n: size_t; ps: pmbstate_t): size_t; cdecl; external clib name 'mbrtowc';
 function wcrtomb(s: pchar; wc: wchar_t; ps: pmbstate_t): size_t; cdecl; external clib name 'wcrtomb';
 function mbrlen(const s: pchar; n: size_t; ps: pmbstate_t): size_t; cdecl; external clib name 'mbrlen';
@@ -122,11 +122,12 @@ const
   CODESET=49;
   LC_ALL = 6;
 {$elseif defined(beos)}
-  {$warning check correct value for BeOS}
-  CODESET=49;
   {$ifdef haiku}
+  CODESET= 0; // Checked for Haiku
   LC_ALL = 0; // Checked for Haiku
   {$else}
+  {$warning check correct value for BeOS}
+  CODESET=49;
   LC_ALL = 6; // Checked for BeOS
   {$endif}
   ESysEILSEQ = EILSEQ;
@@ -562,7 +563,7 @@ end;
 
 
 { concatenates an utf-32 char to a widestring. S *must* be unique when entering. }
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
 procedure ConcatUTF32ToAnsiStr(const nc: wint_t; var S: AnsiString; var index: SizeInt; var mbstate: mbstate_t);
 {$else not beos}
 procedure ConcatUTF32ToAnsiStr(const nc: wint_t; var S: AnsiString; var index: SizeInt);
@@ -578,7 +579,7 @@ begin
   else
     begin
       EnsureAnsiLen(s,index+MB_CUR_MAX);
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
       mblen:=wcrtomb(p,wchar_t(nc),@mbstate);
 {$else not beos}
       mblen:=wctomb(p,wchar_t(nc));
@@ -600,13 +601,13 @@ function LowerAnsiString(const s : AnsiString) : AnsiString;
     i, slen,
     resindex : SizeInt;
     mblen    : size_t;
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
     ombstate,
     nmbstate : mbstate_t;
 {$endif beos}
     wc       : wchar_t;
   begin
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
     fillchar(ombstate,sizeof(ombstate),0);
     fillchar(nmbstate,sizeof(nmbstate),0);
 {$endif beos}
@@ -622,7 +623,7 @@ function LowerAnsiString(const s : AnsiString) : AnsiString;
             mblen:= 1;
           end
         else
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
           mblen:=mbrtowc(@wc, pchar(@s[i]), slen-i+1, @ombstate);
 {$else not beos}
           mblen:=mbtowc(@wc, pchar(@s[i]), slen-i+1);
@@ -649,7 +650,7 @@ function LowerAnsiString(const s : AnsiString) : AnsiString;
               { even if mblen = 1, the lowercase version may have a }
               { different length                                     }
               { We can't do anything special if wchar_t is 16 bit... }
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
               ConcatUTF32ToAnsiStr(towlower(wint_t(wc)),result,resindex,nmbstate);
 {$else not beos}
               ConcatUTF32ToAnsiStr(towlower(wint_t(wc)),result,resindex);
@@ -667,13 +668,13 @@ function UpperAnsiString(const s : AnsiString) : AnsiString;
     i, slen,
     resindex : SizeInt;
     mblen    : size_t;
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
     ombstate,
     nmbstate : mbstate_t;
 {$endif beos}
     wc       : wchar_t;
   begin
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
     fillchar(ombstate,sizeof(ombstate),0);
     fillchar(nmbstate,sizeof(nmbstate),0);
 {$endif beos}
@@ -689,7 +690,7 @@ function UpperAnsiString(const s : AnsiString) : AnsiString;
             mblen:= 1;
           end
         else
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
           mblen:=mbrtowc(@wc, pchar(@s[i]), slen-i+1, @ombstate);
 {$else not beos}
           mblen:=mbtowc(@wc, pchar(@s[i]), slen-i+1);
@@ -716,7 +717,7 @@ function UpperAnsiString(const s : AnsiString) : AnsiString;
               { even if mblen = 1, the uppercase version may have a }
               { different length                                     }
               { We can't do anything special if wchar_t is 16 bit... }
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
               ConcatUTF32ToAnsiStr(towupper(wint_t(wc)),result,resindex,nmbstate);
 {$else not beos}
               ConcatUTF32ToAnsiStr(towupper(wint_t(wc)),result,resindex);
@@ -817,17 +818,17 @@ function CharLengthPChar(const Str: PChar): PtrInt;
   var
     nextlen: ptrint;
     s: pchar;
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
     mbstate: mbstate_t;
 {$endif not beos}
   begin
     result:=0;
     s:=str;
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
     fillchar(mbstate,sizeof(mbstate),0);
 {$endif not beos}
     repeat
-{$ifdef beos}
+{$if defined(beos) and not defined(haiku)}
       nextlen:=ptrint(mblen(s,MB_CUR_MAX));
 {$else beos}
       nextlen:=ptrint(mbrlen(s,MB_CUR_MAX,@mbstate));
@@ -842,12 +843,12 @@ function CharLengthPChar(const Str: PChar): PtrInt;
 
 
 function CodePointLength(const Str: PChar; maxlookahead: ptrint): PtrInt;
-{$ifndef beos}
+{$if not(defined(beos) and not defined(haiku))}
   var
     mbstate: mbstate_t;
 {$endif not beos}
   begin
-{$ifdef beos}
+{$if defined(beos) and not defined(haiku)}
     result:=ptrint(mblen(str,maxlookahead));
 {$else beos}
     fillchar(mbstate,sizeof(mbstate),0);

+ 1 - 1
rtl/unix/unixcp.pp

@@ -714,7 +714,7 @@ var
 begin
   // Get one of non-empty environment variables in the next order:
   // LC_ALL, LC_CTYPE, LANG. Default is UTF-8 or ASCII.
-{$if defined(linux) or defined(darwin)}
+{$if defined(linux) or defined(darwin) or defined(haiku)}
   Result:=CP_UTF8;
 {$else}
   Result:=CP_ASCII;

+ 27 - 0
tests/webtbs/tw28593.pp

@@ -0,0 +1,27 @@
+program tucs4toutf16FFFF;
+{$H+}
+uses
+  sysutils;
+
+procedure halt_error(const AErrorCode : Integer; const AMsg : string);
+begin
+  Write(AMsg);
+  Halt(AErrorCode);
+end;
+
+var
+  s4 : UCS4String;
+  us : UnicodeString;
+begin
+  SetLength(s4,2);
+  s4[0] := $FFFF;
+  s4[1] := 0;
+  us := UCS4StringToUnicodeString(s4);
+  if (Length(us) <> 1) then
+    halt_error(1, 'A single code point UTF6 string expected.');
+  if (Ord(us[1]) <> $FFFF) then
+    halt_error(2, 'code point U+FFFF expected, got U+'+IntToHex(Ord(us[1]),4));
+  WriteLn('OK');
+end.
+
+

+ 14 - 0
tests/webtbs/tw28934.pp

@@ -0,0 +1,14 @@
+{ %norun }
+{ %opt=-FcCP1252 }
+
+program project1;
+
+Type
+  WideArray = array [0..3] of Widechar;
+
+var
+  Test: WideArray;
+
+begin
+  Test := 'hmmm';
+end.

+ 1 - 1
utils/fpcm/revision.inc

@@ -1 +1 @@
-'2015-10-06 rev 31969'
+'2015-11-13 rev 32319'

+ 8 - 1
utils/fppkg/fppkg.pp

@@ -82,6 +82,7 @@ procedure TMakeTool.ShowUsage;
 begin
   Writeln('Usage: ',Paramstr(0),' [options] <action> <package>');
   Writeln('Options:');
+  Writeln('  -C --config-file   Specify the configuration file to use');
   Writeln('  -c --config        Set compiler configuration to use');
   Writeln('  -h --help          This help');
   Writeln('  -v --verbose       Show more information');
@@ -109,6 +110,7 @@ begin
   Writeln('  archive           Create archive of package');
   Writeln('  download          Download package');
   Writeln('  convertmk         Convert Makefile.fpc to fpmake.pp');
+  Writeln('  info              Show more information about a package');
   Writeln('  fixbroken         Recompile all (broken) packages with changed dependencies');
   Writeln('  listsettings      Show the values for all fppkg settings');
 //  Writeln('  addconfig          Add a compiler configuration for the supplied compiler');
@@ -195,7 +197,12 @@ begin
     begin
       Inc(I);
       // Check options.
-      if CheckOption(I,'c','config') then
+      if CheckOption(I,'C','config-file') then
+        begin
+          // Do nothing, the config-file has already been read.
+          OptionArg(I);
+        end
+      else if CheckOption(I,'c','config') then
         GlobalOptions.CompilerConfig:=OptionArg(I)
       else if CheckOption(I,'v','verbose') then
         LogLevels:=AllLogLevels

+ 1 - 1
utils/pas2jni/ppuparser.pas

@@ -219,7 +219,7 @@ begin
     repeat
       _ReadOutput(p.Output, s);
       _ReadOutput(p.Stderr, err);
-    until not p.Running;
+    until not p.Running and (p.Output.NumBytesAvailable = 0) and (p.Stderr.NumBytesAvailable = 0);
     ec:=p.ExitStatus;
     if Copy(s, 1, 1) <> '[' then begin
       ec:=-1;

Some files were not shown because too many files changed in this diff