diff --git a/packages/libc/namespaced/Api.Kerneldefs.pp b/packages/libc/namespaced/Api.Kerneldefs.pp new file mode 100644 index 0000000000..1d37a9632d --- /dev/null +++ b/packages/libc/namespaced/Api.Kerneldefs.pp @@ -0,0 +1,3 @@ +unit Api.Kerneldefs; +{$DEFINE FPC_DOTTEDUNITS} +{$i kerneldefs.pp} diff --git a/packages/libc/namespaced/Api.Kernelioctl.pp b/packages/libc/namespaced/Api.Kernelioctl.pp new file mode 100644 index 0000000000..66eacbb101 --- /dev/null +++ b/packages/libc/namespaced/Api.Kernelioctl.pp @@ -0,0 +1,3 @@ +unit Api.Kernelioctl; +{$DEFINE FPC_DOTTEDUNITS} +{$i kernelioctl.pp} diff --git a/packages/libc/namespaced/Api.Libc.pp b/packages/libc/namespaced/Api.Libc.pp new file mode 100644 index 0000000000..776701e1a2 --- /dev/null +++ b/packages/libc/namespaced/Api.Libc.pp @@ -0,0 +1,3 @@ +unit Api.Libc; +{$DEFINE FPC_DOTTEDUNITS} +{$i libc.pp} diff --git a/packages/libc/namespaces.lst b/packages/libc/namespaces.lst new file mode 100644 index 0000000000..3090723b68 --- /dev/null +++ b/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 diff --git a/packages/libc/src/kerneldefs.pp b/packages/libc/src/kerneldefs.pp index a821bec40b..446165610b 100644 --- a/packages/libc/src/kerneldefs.pp +++ b/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) diff --git a/packages/libc/src/kernelioctl.pp b/packages/libc/src/kernelioctl.pp index bdbbb608be..af0897ddf9 100644 --- a/packages/libc/src/kernelioctl.pp +++ b/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 diff --git a/packages/libc/src/libc.pp b/packages/libc/src/libc.pp index 7c95744bdd..ff51379bde 100644 --- a/packages/libc/src/libc.pp +++ b/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.