Browse Source

* give a compiler error when attempting to compile these units for any
platform other than Linux/i386, so that people trying to manually
compile them will be informed about the fact that these units
will break in various ways on non-Linux/i386

git-svn-id: trunk@14567 -

Jonas Maebe 15 years ago
parent
commit
7ce1c94cc5
3 changed files with 14 additions and 0 deletions
  1. 5 0
      packages/libc/src/kerneldefs.pp
  2. 4 0
      packages/libc/src/kernelioctl.pp
  3. 5 0
      packages/libc/src/libc.pp

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

@@ -1,5 +1,10 @@
 {$mode objfpc}
 {$h+}
+
+{$if not defined(linux) or not defined(cpui386)}
+  {$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}
+
 unit kerneldefs;
 
 interface

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

@@ -1,6 +1,10 @@
 {$mode objfpc}
 {$h+}
 
+{$if not defined(linux) or not defined(cpui386)}
+  {$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}
+
 Unit kernelioctl;
 
 Interface

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

@@ -1,6 +1,11 @@
 {$mode objfpc}
 {$inline on}
 {$h+}
+
+{$if not defined(linux) or not defined(cpui386)}
+  {$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}
+
 unit libc;
 
 Interface