Index: osdefs.inc =================================================================== --- osdefs.inc (revision 0) +++ osdefs.inc (revision 0) @@ -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) Index: baseunix.pp =================================================================== --- baseunix.pp (revision 12741) +++ baseunix.pp (working copy) @@ -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 @@ {$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 @@ 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}