Quellcode durchsuchen

* Dotted filenames for package libc

Michaël Van Canneyt vor 2 Jahren
Ursprung
Commit
88ba748ef0

+ 3 - 0
packages/libc/namespaced/Api.Kerneldefs.pp

@@ -0,0 +1,3 @@
+unit Api.Kerneldefs;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i kerneldefs.pp}

+ 3 - 0
packages/libc/namespaced/Api.Kernelioctl.pp

@@ -0,0 +1,3 @@
+unit Api.Kernelioctl;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i kernelioctl.pp}

+ 3 - 0
packages/libc/namespaced/Api.Libc.pp

@@ -0,0 +1,3 @@
+unit Api.Libc;
+{$DEFINE FPC_DOTTEDUNITS}
+{$i libc.pp}

+ 5 - 0
packages/libc/namespaces.lst

@@ -0,0 +1,5 @@
+src/libc.pp=namespaced/Api.Libc.pp
+{s*:src/}=namespaced/
+{i+:src/}
+src/kerneldefs.pp=namespaced/Api.Kerneldefs.pp
+src/kernelioctl.pp=namespaced/Api.Kernelioctl.pp

+ 2 - 0
packages/libc/src/kerneldefs.pp

@@ -5,7 +5,9 @@
   {$error The KernelDefs unit is a legacy Kylix-compatibility unit that is only supported on Linux/i386. It is known not to work in various ways on other OSes and architectures (including Linux/x86_64). }
 {$endif}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit kerneldefs;
+{$ENDIF FPC_DOTTEDUNITS}
 
 interface
 // Translated from asm/types.h (i386)

+ 2 - 0
packages/libc/src/kernelioctl.pp

@@ -5,7 +5,9 @@
   {$error The KernelIoctl unit is a legacy Kylix-compatibility unit that is only supported on Linux/i386. It is known not to work in various ways on other OSes and architectures (including Linux/x86_64). }
 {$endif}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 Unit kernelioctl;
+{$ENDIF FPC_DOTTEDUNITS}
 
 Interface
 

+ 10 - 0
packages/libc/src/libc.pp

@@ -6,11 +6,17 @@
   {$error The KernelDefs unit is a legacy Kylix-compatibility unit that is only supported on Linux/i386. It is known not to work in various ways on other OSes and architectures (including Linux/x86_64). }
 {$endif}
 
+{$IFNDEF FPC_DOTTEDUNITS}
 unit libc deprecated 'Unportable Kylix legacy unit that only exists on Linux/x86. see http://wiki.freepascal.org/libc_unit ';
+{$ENDIF FPC_DOTTEDUNITS}
 
 Interface
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses UnixApi.Types,Api.Kerneldefs;
+{$ELSE FPC_DOTTEDUNITS}
 uses unixtype,kerneldefs;
+{$ENDIF FPC_DOTTEDUNITS}
 
 Const
   clib = 'c';
@@ -230,7 +236,11 @@ Const
 
 Implementation
 
+{$IFDEF FPC_DOTTEDUNITS}
+uses Api.Kernelioctl;
+{$ELSE FPC_DOTTEDUNITS}
 uses kernelioctl;
+{$ENDIF FPC_DOTTEDUNITS}
 
 {$i types.inc}         // types.h macros.
 {$i cerrno.inc}       // errno.h asm/errno.h bits/errno.h macros.