2
0
Эх сурвалжийг харах

* patch by Olivier Coursiere to fix beos building

git-svn-id: trunk@12743 -
florian 16 жил өмнө
parent
commit
65b46d5821

+ 1 - 0
.gitattributes

@@ -5141,6 +5141,7 @@ rtl/beos/i386/dllprt.cpp -text
 rtl/beos/i386/func.as svneol=native#text/plain
 rtl/beos/i386/prt0.as svneol=native#text/plain
 rtl/beos/i386/sighnd.inc svneol=native#text/plain
+rtl/beos/osdefs.inc svneol=native#text/plain
 rtl/beos/osmacro.inc svneol=native#text/plain
 rtl/beos/ossysc.inc svneol=native#text/plain
 rtl/beos/ostypes.inc svneol=native#text/plain

+ 19 - 15
rtl/beos/baseunix.pp

@@ -15,32 +15,28 @@
 Unit BaseUnix;
 
 Interface
+{$inline on}
+Uses UnixType;
 
-uses UnixType;
+{$i osdefs.inc}       { Compile time defines }
 
 {$i aliasptp.inc}
 
 {$packrecords C}
-{$define oldreaddir}		// Keep using readdir system call instead
-				// of userland getdents stuff.
-{$define usedomain}		// Allow uname with "domain" entry.
-				// (which is a GNU extension)
-{$define posixworkaround}	// Temporary ugly workaround for signal handler.
-				// (mainly until baseunix migration is complete)
 
 {$ifndef FPC_USE_LIBC}
-{$define FPC_USE_SYSCALL}
+  {$define FPC_USE_SYSCALL}
 {$endif}
 
-{$i errno.inc}		{ Error numbers }
+{$i errno.inc}          { Error numbers }
 {$i ostypes.inc}
 
 {$ifdef FPC_USE_LIBC}
-const clib = 'root';
-const netlib = 'net';
-{$i oscdeclh.inc}
+  const clib = 'root';
+  const netlib = 'net';
+  {$i oscdeclh.inc}
 {$ELSE}
-{$i bunxh.inc}		{ Functions}
+  {$i bunxh.inc}		{ Functions}
 {$ENDIF}
 
 function fpgeterrno:longint; 
@@ -62,6 +58,8 @@ Function  FpNanoSleep  (req : ptimespec;rem : ptimespec):cint;
 {$endif}
 {$endif}
 
+{$i genfunch.inc}
+
 { Fairly portable constants. I'm not going to waste time to duplicate and alias
 them anywhere}
 
@@ -83,14 +81,20 @@ Const
 
 implementation
 
+{$ifdef hassysctl}
+Uses Sysctl;
+{$endif}
+
 {$i genfuncs.inc}       // generic calls. (like getenv)
 {$I gensigset.inc}     // general sigset funcs implementation.
 {$I genfdset.inc}      // general fdset funcs.
 
-{$ifndef FPC_USE_LIBC}
+{$ifdef FPC_USE_LIBC}
+  {$i oscdecl.inc}        // implementation of wrappers in oscdeclh.inc
+{$else}
   {$i syscallh.inc}       // do_syscall declarations themselves
   {$i sysnr.inc}          // syscall numbers.
-  {$i bsyscall.inc}  			// cpu specific syscalls
+  {$i bsyscall.inc}       // cpu specific syscalls
   {$i bunxsysc.inc}       // syscalls in system unit.
 //  {$i settimeo.inc}
 {$endif}

+ 23 - 0
rtl/beos/osdefs.inc

@@ -0,0 +1,23 @@
+{
+    Copyright (c) 2000-2002 by Marco van de Voort
+
+    Target dependent defines used when compileing the baseunix unit
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************}
+
+{$define usedomain}             // Allow uname with "domain" entry.
+                                // (which is a GNU extension)