Bladeren bron

* Dotted RTL compiles

Michael VAN CANNEYT 2 jaren geleden
bovenliggende
commit
b52777c103
100 gewijzigde bestanden met toevoegingen van 692 en 8 verwijderingen
  1. 111 2
      rtl/Makefile
  2. 2 0
      rtl/aarch64/intrinsics.pp
  3. 6 0
      rtl/aix/termio.pp
  4. 2 0
      rtl/amicommon/athreads.pp
  5. 14 0
      rtl/amicommon/classes.pp
  6. 2 0
      rtl/amicommon/dos.pp
  7. 7 0
      rtl/amicommon/lineinfo.pp
  8. 7 0
      rtl/amicommon/sysutils.pp
  9. 6 0
      rtl/android/cwstring.pp
  10. 2 0
      rtl/android/jvm/androidr14.pas
  11. 2 0
      rtl/arm/cpu.pp
  12. 14 0
      rtl/atari/classes.pp
  13. 2 0
      rtl/atari/dos.pp
  14. 7 0
      rtl/atari/sysutils.pp
  15. 2 0
      rtl/avr/intrinsics.pp
  16. 6 0
      rtl/beos/baseunix.pp
  17. 11 0
      rtl/beos/bethreads.pp
  18. 16 0
      rtl/beos/classes.pp
  19. 6 0
      rtl/beos/termio.pp
  20. 13 0
      rtl/bsd/bsd.pas
  21. 11 0
      rtl/bsd/sysctl.pp
  22. 7 0
      rtl/charmaps/cp1250.pas
  23. 7 0
      rtl/charmaps/cp1251.pas
  24. 7 0
      rtl/charmaps/cp1252.pas
  25. 7 0
      rtl/charmaps/cp1253.pas
  26. 7 0
      rtl/charmaps/cp1254.pas
  27. 7 0
      rtl/charmaps/cp1255.pas
  28. 7 0
      rtl/charmaps/cp1256.pas
  29. 7 0
      rtl/charmaps/cp1257.pas
  30. 7 0
      rtl/charmaps/cp1258.pas
  31. 7 0
      rtl/charmaps/cp3021.pas
  32. 7 0
      rtl/charmaps/cp437.pas
  33. 7 0
      rtl/charmaps/cp646.pas
  34. 7 0
      rtl/charmaps/cp737.pas
  35. 7 0
      rtl/charmaps/cp775.pas
  36. 7 0
      rtl/charmaps/cp850.pas
  37. 7 0
      rtl/charmaps/cp852.pas
  38. 7 0
      rtl/charmaps/cp855.pas
  39. 7 0
      rtl/charmaps/cp856.pas
  40. 7 0
      rtl/charmaps/cp857.pas
  41. 7 0
      rtl/charmaps/cp860.pas
  42. 7 0
      rtl/charmaps/cp861.pas
  43. 7 0
      rtl/charmaps/cp862.pas
  44. 7 0
      rtl/charmaps/cp863.pas
  45. 7 0
      rtl/charmaps/cp864.pas
  46. 7 0
      rtl/charmaps/cp865.pas
  47. 7 0
      rtl/charmaps/cp866.pas
  48. 7 0
      rtl/charmaps/cp869.pas
  49. 7 0
      rtl/charmaps/cp874.pas
  50. 7 0
      rtl/charmaps/cp8859_1.pas
  51. 7 0
      rtl/charmaps/cp8859_10.pas
  52. 7 0
      rtl/charmaps/cp8859_11.pas
  53. 7 0
      rtl/charmaps/cp8859_13.pas
  54. 7 0
      rtl/charmaps/cp8859_14.pas
  55. 7 0
      rtl/charmaps/cp8859_15.pas
  56. 7 0
      rtl/charmaps/cp8859_16.pas
  57. 7 0
      rtl/charmaps/cp8859_2.pas
  58. 7 0
      rtl/charmaps/cp8859_3.pas
  59. 7 0
      rtl/charmaps/cp8859_4.pas
  60. 7 0
      rtl/charmaps/cp8859_5.pas
  61. 7 0
      rtl/charmaps/cp8859_6.pas
  62. 7 0
      rtl/charmaps/cp8859_7.pas
  63. 7 0
      rtl/charmaps/cp8859_8.pas
  64. 7 0
      rtl/charmaps/cp8859_9.pas
  65. 20 0
      rtl/charmaps/cpall.pas
  66. 7 0
      rtl/charmaps/cpkoi8_r.pas
  67. 7 0
      rtl/charmaps/cpkoi8_u.pas
  68. 6 0
      rtl/darwin/console.pp
  69. 6 0
      rtl/darwin/termio.pp
  70. 6 0
      rtl/dragonfly/console.pp
  71. 6 0
      rtl/dragonfly/termio.pp
  72. 3 1
      rtl/embedded/aarch64/gpio.pp
  73. 8 1
      rtl/embedded/aarch64/mailbox.pp
  74. 3 1
      rtl/embedded/aarch64/mmio.pp
  75. 8 1
      rtl/embedded/aarch64/raspi3.pp
  76. 8 1
      rtl/embedded/aarch64/raspiuart.pp
  77. 2 0
      rtl/embedded/arm/allwinner_a20.pp
  78. 2 0
      rtl/embedded/arm/cortexm0.pp
  79. 2 0
      rtl/embedded/arm/cortexm3.pp
  80. 2 0
      rtl/embedded/arm/cortexm4.pp
  81. 2 0
      rtl/embedded/arm/cortexm7.pp
  82. 2 0
      rtl/embedded/arm/lm3fury.pp
  83. 2 0
      rtl/embedded/arm/lm3tempest.pp
  84. 2 0
      rtl/embedded/arm/lm4f120.pp
  85. 2 0
      rtl/embedded/arm/lpc11xx.pp
  86. 2 0
      rtl/embedded/arm/lpc122x.pp
  87. 2 0
      rtl/embedded/arm/lpc13xx.pp
  88. 2 0
      rtl/embedded/arm/lpc1768.pp
  89. 2 0
      rtl/embedded/arm/lpc21x4.pp
  90. 2 0
      rtl/embedded/arm/lpc8xx.pp
  91. 2 0
      rtl/embedded/arm/mk20d5.pp
  92. 2 0
      rtl/embedded/arm/mk20d7.pp
  93. 2 0
      rtl/embedded/arm/mk22f51212.pp
  94. 2 0
      rtl/embedded/arm/mk64f12.pp
  95. 2 0
      rtl/embedded/arm/nrf51.pp
  96. 2 0
      rtl/embedded/arm/nrf52.pp
  97. 8 1
      rtl/embedded/arm/raspi2.pp
  98. 2 0
      rtl/embedded/arm/sam3x8e.pp
  99. 2 0
      rtl/embedded/arm/samd51p19a.pp
  100. 2 0
      rtl/embedded/arm/sc32442b.pp

+ 111 - 2
rtl/Makefile

@@ -2,7 +2,7 @@
 # Don't edit, this file is generated by FPCMake Version 2.0.0
 #
 default: all
-MAKEFILETARGETS=x86_64-linux
+MAKEFILETARGETS=i386-linux m68k-linux powerpc-linux sparc-linux x86_64-linux arm-linux powerpc64-linux armeb-linux mips-linux mipsel-linux mips64-linux mips64el-linux aarch64-linux sparc64-linux riscv32-linux riscv64-linux xtensa-linux loongarch64-linux
 BSDs = freebsd netbsd openbsd darwin dragonfly
 UNIXs = linux $(BSDs) solaris qnx haiku aix
 LIMIT83fs = go32v2 os2 emx watcom msdos win16 atari
@@ -194,7 +194,8 @@ endif
 ifeq ($(FULL_TARGET),aarch64-embedded)
 endif
 ifdef SUB_TARGET 
-override FPCOPT+=-t$(SUB_TARGET)
+FPCOPT+=-t$(SUB_TARGET)
+FPMAKE_OPT+=--subtarget=$(SUB_TARGET)
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
 ifeq ($(SUBARCH),)
@@ -370,6 +371,60 @@ override PACKAGE_VERSION=3.3.1
 ifeq ($(CPU_OS_TARGET),x86_64-linux)
 override TARGET_DIRS+=linux
 endif
+ifeq ($(CPU_OS_TARGET),i386-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),m68k-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),powerpc-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),sparc-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),x86_64-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),arm-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),powerpc64-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),armeb-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),mips-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),mipsel-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),mips64-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),mips64el-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),aarch64-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),sparc64-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),riscv32-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),riscv64-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),xtensa-linux)
+override TARGET_DIRS+=linux
+endif
+ifeq ($(CPU_OS_TARGET),loongarch64-linux)
+override TARGET_DIRS+=linux
+endif
 override INSTALL_FPCPACKAGE=y
 override INSTALL_CREATEPACKAGEFPC=y
 ifdef REQUIRE_UNITSDIR
@@ -1701,6 +1756,60 @@ fpc_makefiles: fpc_makefile fpc_makefile_dirs
 ifeq ($(CPU_OS_TARGET),x86_64-linux)
 TARGET_DIRS_LINUX=1
 endif
+ifeq ($(CPU_OS_TARGET),i386-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),m68k-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),powerpc-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),sparc-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),x86_64-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),arm-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),powerpc64-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),armeb-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),mips-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),mipsel-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),mips64-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),mips64el-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),aarch64-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),sparc64-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),riscv32-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),riscv64-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),xtensa-linux)
+TARGET_DIRS_LINUX=1
+endif
+ifeq ($(CPU_OS_TARGET),loongarch64-linux)
+TARGET_DIRS_LINUX=1
+endif
 ifdef TARGET_DIRS_LINUX
 linux_all:
 	$(MAKE) -C linux all

+ 2 - 0
rtl/aarch64/intrinsics.pp

@@ -12,7 +12,9 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit intrinsics;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 

+ 6 - 0
rtl/aix/termio.pp

@@ -14,11 +14,17 @@
 
  **********************************************************************}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit termio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 {$inline on}
+{$IFDEF FPC_DOTTEDUNITS}
+Uses UnixApi.Types,UnixApi.Base,System.CTypes;          // load base UnixApi.Unix typing
+{$ELSE FPC_DOTTEDUNITS}
 Uses UnixType,BaseUnix,ctypes;          // load base unix typing
+{$ENDIF FPC_DOTTEDUNITS}
 
 // load types + consts
 

+ 2 - 0
rtl/amicommon/athreads.pp

@@ -15,7 +15,9 @@
  **********************************************************************}
 
 {$mode objfpc}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit athreads;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 

+ 14 - 0
rtl/amicommon/classes.pp

@@ -23,10 +23,23 @@
 { determine the type of the resource/form file }
 {$define Win16Res}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit Classes;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.SysUtils,
+  System.RtlConsts,
+  System.Types,
+  System.SortBase,
+{$ifdef FPC_TESTGENERICS}
+  System.FGL,
+{$endif}
+  System.TypInfo;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   sysutils,
   rtlconsts,
@@ -36,6 +49,7 @@ uses
   fgl,
 {$endif}
   typinfo;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$i classesh.inc}
 

+ 2 - 0
rtl/amicommon/dos.pp

@@ -20,7 +20,9 @@
  **********************************************************************}
 {$INLINE ON}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit Dos;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {--------------------------------------------------------------------}
 { LEFT TO DO:                                                        }

+ 7 - 0
rtl/amicommon/lineinfo.pp

@@ -17,7 +17,9 @@
   This unit should not be compiled in objfpc mode, since this would make it
   dependent on objpas unit.
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit lineinfo;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
@@ -43,8 +45,13 @@ var
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.ExeInfo,System.Strings;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   exeinfo,strings;
+{$ENDIF FPC_DOTTEDUNITS}
 
 const
   N_Function    = $24;

+ 7 - 0
rtl/amicommon/sysutils.pp

@@ -19,7 +19,9 @@
 
  **********************************************************************}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit sysutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
@@ -60,8 +62,13 @@ function DiskFree(Drive: AnsiString): Int64;
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  TP.DOS, System.SysConst;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   dos, sysconst;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$DEFINE FPC_FEXPAND_VOLUMES} (* Full paths begin with drive specification *)
 {$DEFINE FPC_FEXPAND_DRIVESEP_IS_ROOT}

+ 6 - 0
rtl/android/cwstring.pp

@@ -17,7 +17,9 @@
 {$inline on}
 {$implicitexceptions off}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cwstring;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
@@ -25,7 +27,11 @@ procedure SetCWidestringManager;
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses System.DynLibs;
+{$ELSE FPC_DOTTEDUNITS}
 uses dynlibs;
+{$ENDIF FPC_DOTTEDUNITS}
 
 type
   UErrorCode = SizeInt;

+ 2 - 0
rtl/android/jvm/androidr14.pas

@@ -1,5 +1,7 @@
 { Imports for Java packages/classes: android., java., javax., junit., org. }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit androidr14;
+{$ENDIF FPC_DOTTEDUNITS}
 {$mode delphi}
 
 interface

+ 2 - 0
rtl/arm/cpu.pp

@@ -14,7 +14,9 @@
 
  **********************************************************************}
 {$mode objfpc}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cpu;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 

+ 14 - 0
rtl/atari/classes.pp

@@ -23,10 +23,23 @@
 { determine the type of the resource/form file }
 {$define Win16Res}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit Classes;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.SysUtils,
+  System.RtlConsts,
+  System.Types,
+  System.SortBase,
+{$ifdef FPC_TESTGENERICS}
+  System.FGL,
+{$endif}
+  System.TypInfo;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   sysutils,
   rtlconsts,
@@ -36,6 +49,7 @@ uses
   fgl,
 {$endif}
   typinfo;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$i classesh.inc}
 

+ 2 - 0
rtl/atari/dos.pp

@@ -13,7 +13,9 @@
 
  **********************************************************************}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit dos;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 

+ 7 - 0
rtl/atari/sysutils.pp

@@ -13,7 +13,9 @@
 
  **********************************************************************}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit sysutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
@@ -47,8 +49,13 @@ interface
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+{  TP.DOS,} System.SysConst;
+{$ELSE FPC_DOTTEDUNITS}
 uses
 {  dos,} sysconst;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$DEFINE FPC_FEXPAND_UNC} (* UNC paths are supported *)
 {$DEFINE FPC_FEXPAND_DRIVES} (* Full paths begin with drive specification *)

+ 2 - 0
rtl/avr/intrinsics.pp

@@ -11,7 +11,9 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit intrinsics;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 

+ 6 - 0
rtl/beos/baseunix.pp

@@ -12,12 +12,18 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 Unit BaseUnix;
+{$ENDIF FPC_DOTTEDUNITS}
 
 Interface
 {$modeswitch out}
 {$inline on}
+{$IFDEF FPC_DOTTEDUNITS}
+Uses UnixApi.Types;
+{$ELSE FPC_DOTTEDUNITS}
 Uses UnixType;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$i osdefs.inc}       { Compile time defines }
 

+ 11 - 0
rtl/beos/bethreads.pp

@@ -15,7 +15,9 @@
  **********************************************************************}
 {$mode objfpc}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit bethreads;
+{$ENDIF FPC_DOTTEDUNITS}
 interface
 {$S-}
 
@@ -23,12 +25,21 @@ Procedure SetBeThreadManager;
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+Uses
+  systhrds,
+  UnixApi.Base,
+  UnixApi.Unix,
+  UnixApi.Types,
+  System.SysUtils;
+{$ELSE FPC_DOTTEDUNITS}
 Uses
   systhrds,
   BaseUnix,
   unix,
   unixtype,
   sysutils;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {*****************************************************************************
                              Generic overloaded

+ 16 - 0
rtl/beos/classes.pp

@@ -23,23 +23,39 @@
 { determine the type of the resource/form file }
 {$define Win16Res}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit Classes;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  System.SysUtils,
+  System.RtlConsts,
+  System.Types,  
+  System.TypInfo,
+  System.SortBase;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   sysutils,
   rtlconsts,
   types,  
   typinfo,
   sortbase;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$i classesh.inc}
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  UnixApi.Base,UnixApi.Unix;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   baseunix,unix;
+{$ENDIF FPC_DOTTEDUNITS}
 
 { OS - independent class implementations are in /inc directory. }
 {$i classes.inc}

+ 6 - 0
rtl/beos/termio.pp

@@ -14,11 +14,17 @@
 
  **********************************************************************}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit termio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+Uses UnixApi.Base;          // load base UnixApi.Unix typing
+{$ELSE FPC_DOTTEDUNITS}
 Uses BaseUnix;          // load base unix typing
+{$ENDIF FPC_DOTTEDUNITS}
 
 // load types + consts
 

+ 13 - 0
rtl/bsd/bsd.pas

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 Unit BSD;
+{$ENDIF FPC_DOTTEDUNITS}
 {
    This file is part of the Free Pascal run time library.
    (c) 2005 by Marco van de Voort member of the 
@@ -29,9 +31,15 @@ Unit BSD;
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  {$IFDEF FPC_USE_LIBC} System.InitC, {$endif}
+  UnixApi.Unix;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   {$IFDEF FPC_USE_LIBC} initc, {$endif}
   Unix;
+{$ENDIF FPC_DOTTEDUNITS}
 
 const
   EVFILT_READ     = -1;
@@ -113,8 +121,13 @@ procedure EV_SET(kevp: PKEvent; const aIdent: PtrUInt; const aFilter: cshort;
 implementation
 
 {$IFNDEF FPC_USE_LIBC}
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  UnixApi.SysCall;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   SysCall;
+{$ENDIF FPC_DOTTEDUNITS}
 {$endif}
 
 procedure EV_SET(kevp: PKEvent; const aIdent: PtrUInt; const aFilter: cshort; const aFlags: cushort;

+ 11 - 0
rtl/bsd/sysctl.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 Unit sysctl;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {
    This file is part of the Free Pascal run time library.
@@ -18,8 +20,13 @@ Unit sysctl;
 
 Interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  UnixApi.Types;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   unixtype;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$ifndef FPC_USE_LIBC}
 {$define FPC_USE_SYSCALL}
@@ -101,7 +108,11 @@ function FPsysctlnametomib (Name: PAnsiChar; mibp:pcint;sizep:psize_t):cint;
 Implementation
 
 {$ifndef FPC_USE_LIBC}
+{$IFDEF FPC_DOTTEDUNITS}
+Uses UnixApi.SysCall;
+{$ELSE FPC_DOTTEDUNITS}
 Uses Syscall;
+{$ENDIF FPC_DOTTEDUNITS}
 {$ENDIF}
 
 {$ifndef FPC_USE_LIBC}

+ 7 - 0
rtl/charmaps/cp1250.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp1250;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp1251.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp1251;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp1252.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp1252;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp1253.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp1253;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp1254.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp1254;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp1255.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp1255;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp1256.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp1256;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp1257.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp1257;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp1258.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp1258;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp3021.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp3021;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp437.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp437;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp646.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp646;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..127] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp737.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp737;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp775.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp775;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp850.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp850;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp852.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp852;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp855.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp855;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp856.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp856;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp857.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp857;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp860.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp860;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp861.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp861;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp862.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp862;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp863.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp863;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp864.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp864;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp865.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp865;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp866.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp866;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp869.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp869;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp874.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp874;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_1.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_1;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_10.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_10;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_11.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_11;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..251] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_13.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_13;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_14.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_14;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_15.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_15;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_16.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_16;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_2.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_2;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_3.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_3;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_4.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_4;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_5.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_5;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_6.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_6;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..242] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_7.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_7;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..254] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_8.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_8;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..254] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cp8859_9.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cp8859_9;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 20 - 0
rtl/charmaps/cpall.pas

@@ -1,7 +1,26 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cpall;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+  { cyrillic code pages }
+  System.CodePages.CP1251,System.CodePages.CP855,System.CodePages.CP866,System.CodePages.CP8859_5,System.CodePages.CP3021,System.CodePages.CPkoi8_r,System.CodePages.CPkoi8_u,
+  { greek code pages }
+  System.CodePages.CP1253,System.CodePages.CP737,System.CodePages.CP869,System.CodePages.CP8859_7,
+  { other code pages }
+  System.CodePages.CP8859_1,System.CodePages.CP850,System.CodePages.CP437,System.CodePages.CP1252,System.CodePages.CP646,System.CodePages.CP775,
+  System.CodePages.CP874,System.CodePages.CP856,System.CodePages.CP857,System.CodePages.CP860,System.CodePages.CP861,System.CodePages.CP862,System.CodePages.CP863,System.CodePages.CP864,System.CodePages.CP865,
+{$ifndef cpu16}
+  { these are too big for a 16-bit System.CPU }
+  {  cp932,cp936,cp949,cp950, -> to rtl-unicode}
+{$endif not cpu16}
+  System.CodePages.CP1250,System.CodePages.CP1254,System.CodePages.CP1255,System.CodePages.CP1256,System.CodePages.CP1257,System.CodePages.CP1258,System.CodePages.CP852,System.CodePages.CP8859_2,System.CodePages.CP8859_3,System.CodePages.CP8859_4,
+  System.CodePages.CP8859_6,System.CodePages.CP8859_8,System.CodePages.CP8859_9,System.CodePages.CP8859_10,System.CodePages.CP8859_11,System.CodePages.CP8859_13,System.CodePages.CP8859_14,System.CodePages.CP8859_15,
+  System.CodePages.CP8859_16;
+{$ELSE FPC_DOTTEDUNITS}
 uses
   { cyrillic code pages }
   cp1251,cp855,cp866,cp8859_5,cp3021,cpkoi8_r,cpkoi8_u,
@@ -17,6 +36,7 @@ uses
   cp1250,cp1254,cp1255,cp1256,cp1257,cp1258,cp852,cp8859_2,cp8859_3,cp8859_4,
   cp8859_6,cp8859_8,cp8859_9,cp8859_10,cp8859_11,cp8859_13,cp8859_14,cp8859_15,
   cp8859_16;
+{$ENDIF FPC_DOTTEDUNITS}
 
 
 implementation

+ 7 - 0
rtl/charmaps/cpkoi8_r.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cpkoi8_r;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 7 - 0
rtl/charmaps/cpkoi8_u.pas

@@ -1,12 +1,19 @@
 { This is an automatically created file, so don't edit it }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cpkoi8_u;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 
   implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+  uses
+     System.CharSet;
+{$ELSE FPC_DOTTEDUNITS}
   uses
      charset;
+{$ENDIF FPC_DOTTEDUNITS}
 
   const
      map : array[0..255] of tunicodecharmapping = (

+ 6 - 0
rtl/darwin/console.pp

@@ -22,7 +22,9 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 }
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit console;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$packrecords C}
 
@@ -1822,7 +1824,11 @@ function physicalconsole(fd:longint) : boolean;
 
 IMPLEMENTATION
 
+{$IFDEF FPC_DOTTEDUNITS}
+Uses UnixApi.Base,UnixApi.TermIO;
+{$ELSE FPC_DOTTEDUNITS}
 Uses BaseUnix,termio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 function physicalconsole(fd:longint) : boolean;
 

+ 6 - 0
rtl/darwin/termio.pp

@@ -14,12 +14,18 @@
 
  **********************************************************************}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit termio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 {$inline on}
 
+{$IFDEF FPC_DOTTEDUNITS}
+Uses UnixApi.Base;          // load base UnixApi.Unix typing
+{$ELSE FPC_DOTTEDUNITS}
 Uses BaseUnix;          // load base unix typing
+{$ENDIF FPC_DOTTEDUNITS}
 
 // load types + consts
 

+ 6 - 0
rtl/dragonfly/console.pp

@@ -22,7 +22,9 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 }
 
+{$IFNDEF FPC_DOTTEDUNITS}
 UNIT Console;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$packrecords C}
 
@@ -1822,7 +1824,11 @@ function physicalconsole(fd:longint) : boolean;
 
 IMPLEMENTATION
 
+{$IFDEF FPC_DOTTEDUNITS}
+Uses UnixApi.Base,UnixApi.TermIO;
+{$ELSE FPC_DOTTEDUNITS}
 Uses BaseUnix,termio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 function physicalconsole(fd:longint) : boolean;
 

+ 6 - 0
rtl/dragonfly/termio.pp

@@ -14,11 +14,17 @@
 
  **********************************************************************}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit termio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 {$inline on}
+{$IFDEF FPC_DOTTEDUNITS}
+Uses UnixApi.Base;          // load base UnixApi.Unix typing
+{$ELSE FPC_DOTTEDUNITS}
 Uses BaseUnix;          // load base unix typing
+{$ENDIF FPC_DOTTEDUNITS}
 
 // load types + consts
 

+ 3 - 1
rtl/embedded/aarch64/gpio.pp

@@ -19,7 +19,9 @@
 
  ****************************************************************************
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit gpio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
@@ -47,4 +49,4 @@ const
 
 implementation
 
-end.
+end.

+ 8 - 1
rtl/embedded/aarch64/mailbox.pp

@@ -19,7 +19,9 @@
 
  ****************************************************************************
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit mailbox;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
@@ -66,8 +68,13 @@ function MailboxCall(BaseAddr: DWord; Channel: DWord): DWord;
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+    EmbeddedApi.mmio;
+{$ELSE FPC_DOTTEDUNITS}
 uses
     mmio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 function MailboxCall(BaseAddr: DWord; Channel: DWord): DWord;
 var
@@ -107,4 +114,4 @@ begin
     MailboxCall := 0;
 end;
 
-end.
+end.

+ 3 - 1
rtl/embedded/aarch64/mmio.pp

@@ -19,7 +19,9 @@
 
  ****************************************************************************
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit mmio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 
@@ -73,4 +75,4 @@ begin
     GET64 := p^;
 end;
 
-end.
+end.

+ 8 - 1
rtl/embedded/aarch64/raspi3.pp

@@ -19,7 +19,9 @@
 
  ****************************************************************************
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit raspi3;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$goto on}
 {$INLINE ON}
@@ -28,8 +30,13 @@ interface
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+    EmbeddedApi.ConsoleIO, EmbeddedApi.mmio, EmbeddedApi.mailbox, EmbeddedApi.raspiuart, EmbeddedApi.gpio;
+{$ELSE FPC_DOTTEDUNITS}
 uses
     consoleio, mmio, mailbox, raspiuart, gpio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 procedure _FPC_haltproc; assembler; nostackframe; public name '_haltproc';
 asm
@@ -113,4 +120,4 @@ begin
     OpenIO(ErrOutput, @RaspiWrite, @RaspiRead, fmOutput, nil);
     OpenIO(StdOut, @RaspiWrite, @RaspiRead, fmOutput, nil);
     OpenIO(StdErr, @RaspiWrite, @RaspiRead, fmOutput, nil);
-end.
+end.

+ 8 - 1
rtl/embedded/aarch64/raspiuart.pp

@@ -19,7 +19,9 @@
 
  ****************************************************************************
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit raspiuart;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {-
     The Raspberry Pi 3 and 4 use an ARM PL011 UART, but requires
@@ -37,8 +39,13 @@ procedure UARTFlush(BaseAddr: DWord);
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+    EmbeddedApi.mailbox, EmbeddedApi.mmio, EmbeddedApi.gpio;
+{$ELSE FPC_DOTTEDUNITS}
 uses
     mailbox, mmio, gpio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 const
     { UART offsets from PeripheralBase }
@@ -135,4 +142,4 @@ begin
     PUT32(BaseAddr + UART0_LCRH, (1 shl 4));
 end;
 
-end.
+end.

+ 2 - 0
rtl/embedded/arm/allwinner_a20.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit allwinner_a20;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$goto on}
 

+ 2 - 0
rtl/embedded/arm/cortexm0.pp

@@ -3,7 +3,9 @@
  Created by Jeppe Johansen 2012 - [email protected]
  Modified for M0 by Michael Ring 2013 - [email protected]
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cortexm0;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 

+ 2 - 0
rtl/embedded/arm/cortexm3.pp

@@ -3,7 +3,9 @@
 
  Created by Jeppe Johansen 2012 - [email protected]
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cortexm3;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 

+ 2 - 0
rtl/embedded/arm/cortexm4.pp

@@ -3,7 +3,9 @@
 
  Created by Jeppe Johansen 2012 - [email protected]
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cortexm4;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 

+ 2 - 0
rtl/embedded/arm/cortexm7.pp

@@ -3,7 +3,9 @@
 
  Created by Jeppe Johansen 2015 - [email protected]
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit cortexm7;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 

+ 2 - 0
rtl/embedded/arm/lm3fury.pp

@@ -5,7 +5,9 @@ Geoffrey Barton 2010 08 01  [email protected]
 based on stm32f103 created by Jeppe Johansen 2009 - [email protected]
 }
 {$goto on}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit lm3fury;
+{$ENDIF FPC_DOTTEDUNITS}
 
   interface
 

+ 2 - 0
rtl/embedded/arm/lm3tempest.pp

@@ -5,7 +5,9 @@ Geoffrey Barton 2010 08 01  [email protected]
 based on stm32f103 created by Jeppe Johansen 2009 - [email protected]
 }
 {$goto on}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit lm3tempest;
+{$ENDIF FPC_DOTTEDUNITS}
 {$define highspeedports}
   interface
 

+ 2 - 0
rtl/embedded/arm/lm4f120.pp

@@ -1,5 +1,7 @@
 {$goto on}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit lm4f120;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 

+ 2 - 0
rtl/embedded/arm/lpc11xx.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit lpc11xx;
+{$ENDIF FPC_DOTTEDUNITS}
 {$goto on}
 {$define lpc11xx}
 

+ 2 - 0
rtl/embedded/arm/lpc122x.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit lpc122x;
+{$ENDIF FPC_DOTTEDUNITS}
 {$goto on}
 {$define lpc122x}
 

+ 2 - 0
rtl/embedded/arm/lpc13xx.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit lpc13xx;
+{$ENDIF FPC_DOTTEDUNITS}
 {$goto on}
 {$define lpc13xx}
 

+ 2 - 0
rtl/embedded/arm/lpc1768.pp

@@ -1,5 +1,7 @@
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit lpc1768;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$goto on}
 {$define lpc1768}

+ 2 - 0
rtl/embedded/arm/lpc21x4.pp

@@ -17,7 +17,9 @@ Created by Sten Larsson (sten_larsson at yahoo com)
 
 Free Pascal conversion by the Free Pascal development team
 ******************************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit lpc21x4;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$goto on}
 

+ 2 - 0
rtl/embedded/arm/lpc8xx.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit lpc8xx;
+{$ENDIF FPC_DOTTEDUNITS}
 {$goto on}
 {$define lpc8xx}
 

+ 2 - 0
rtl/embedded/arm/mk20d5.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit mk20d5;
+{$ENDIF FPC_DOTTEDUNITS}
 interface
 {$PACKRECORDS 2}
 {$GOTO ON}

+ 2 - 0
rtl/embedded/arm/mk20d7.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit mk20d7;
+{$ENDIF FPC_DOTTEDUNITS}
 interface
 {$PACKRECORDS 2}
 {$GOTO ON}

+ 2 - 0
rtl/embedded/arm/mk22f51212.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit mk22f51212;
+{$ENDIF FPC_DOTTEDUNITS}
 interface
 {$PACKRECORDS 2}
 {$GOTO ON}

+ 2 - 0
rtl/embedded/arm/mk64f12.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit mk64f12;
+{$ENDIF FPC_DOTTEDUNITS}
 interface
 {$PACKRECORDS 2}
 {$GOTO ON}

+ 2 - 0
rtl/embedded/arm/nrf51.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit nrf51;
+{$ENDIF FPC_DOTTEDUNITS}
 interface
 {$PACKRECORDS 2}
 {$GOTO ON}

+ 2 - 0
rtl/embedded/arm/nrf52.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit nrf52;
+{$ENDIF FPC_DOTTEDUNITS}
 interface
 {$PACKRECORDS 2}
 {$GOTO ON}

+ 8 - 1
rtl/embedded/arm/raspi2.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit raspi2;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$goto on}
 {$INLINE ON}
@@ -32,8 +34,13 @@ const
 
 implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses
+    EmbeddedApi.ConsoleIO;
+{$ELSE FPC_DOTTEDUNITS}
 uses
     consoleio;
+{$ENDIF FPC_DOTTEDUNITS}
 
 procedure _FPC_haltproc; assembler; nostackframe; public name '_haltproc';
 asm
@@ -201,4 +208,4 @@ begin
     OpenIO(ErrOutput, @RaspiWrite, @RaspiRead, fmOutput, nil);
     OpenIO(StdOut, @RaspiWrite, @RaspiRead, fmOutput, nil);
     OpenIO(StdErr, @RaspiWrite, @RaspiRead, fmOutput, nil);
-end.
+end.

+ 2 - 0
rtl/embedded/arm/sam3x8e.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit sam3x8e;
+{$ENDIF FPC_DOTTEDUNITS}
 // ---------------------------------------------------------------------------- //
 //                  Atmel Microcontroller Software Support                      //
 //                       SAM Software Package License                           //

+ 2 - 0
rtl/embedded/arm/samd51p19a.pp

@@ -1,4 +1,6 @@
+{$IFNDEF FPC_DOTTEDUNITS}
 unit samd51p19a;
+{$ENDIF FPC_DOTTEDUNITS}
 (*
   Copyright (c) 2020 Microchip Technology Inc.
                    

+ 2 - 0
rtl/embedded/arm/sc32442b.pp

@@ -1,7 +1,9 @@
 {
  Initialization stub copied from at91sam7x256.pp
 }
+{$IFNDEF FPC_DOTTEDUNITS}
 unit sc32442b;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$goto on}
 

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