Browse Source

* Should now work with baseunx. (gmake all works)

marco 22 years ago
parent
commit
e5d341dd20
5 changed files with 46 additions and 26 deletions
  1. 12 8
      rtl/freebsd/Makefile
  2. 14 8
      rtl/freebsd/Makefile.fpc
  3. 8 4
      rtl/freebsd/signal.inc
  4. 5 2
      rtl/freebsd/syscalls.inc
  5. 7 4
      rtl/freebsd/unixsysc.inc

+ 12 - 8
rtl/freebsd/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 1.1 [2002/11/24]
+# Don't edit, this file is generated by FPCMake Version 1.1 [2003/01/05]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx
 MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx
@@ -219,7 +219,6 @@ INC=$(RTL)/inc
 PROCINC=$(RTL)/$(CPU_TARGET)
 PROCINC=$(RTL)/$(CPU_TARGET)
 BSDINC=$(RTL)/bsd
 BSDINC=$(RTL)/bsd
 BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
 BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
-POSIXINC=$(RTL)/posix
 UNIXINC=$(RTL)/unix
 UNIXINC=$(RTL)/unix
 UNITPREFIX=rtl
 UNITPREFIX=rtl
 ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
 ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
@@ -240,12 +239,12 @@ GRAPHDIR=$(INC)/graph
 ifndef USELIBGGI
 ifndef USELIBGGI
 USELIBGGI=NO
 USELIBGGI=NO
 endif
 endif
-override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings $(LINUXUNIT) unix initc dos crt objects printer sysutils typinfo math varutils cpu mmx charset ucomplex getopts heaptrc lineinfo errors sockets gpm ipc terminfo video mouse keyboard console serial variants types systhrds sysctl posix
+override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings baseunix $(LINUXUNIT) unix initc dos crt objects printer sysutils typinfo math varutils cpu mmx charset ucomplex getopts heaptrc lineinfo errors sockets gpm ipc terminfo video mouse keyboard console serial variants types systhrds sysctl
 override TARGET_LOADERS+=prt0 cprt0
 override TARGET_LOADERS+=prt0 cprt0
 override TARGET_RSTS+=math varutils typinfo
 override TARGET_RSTS+=math varutils typinfo
 override INSTALL_FPCPACKAGE=y y
 override INSTALL_FPCPACKAGE=y y
-override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(POSIXINC)
-override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(POSIXINC)
+override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC)
+override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC)
 override COMPILER_TARGETDIR+=.
 override COMPILER_TARGETDIR+=.
 ifdef REQUIRE_UNITSDIR
 ifdef REQUIRE_UNITSDIR
 override UNITSDIR+=$(REQUIRE_UNITSDIR)
 override UNITSDIR+=$(REQUIRE_UNITSDIR)
@@ -1218,9 +1217,15 @@ objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
 strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
 strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
 		   $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
 		   $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
 		   $(SYSTEMUNIT)$(PPUEXT)
 		   $(SYSTEMUNIT)$(PPUEXT)
+baseunix$(PPUEXT) : $(UNIXINC)/errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
+	signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
+	$(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
+	$(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \
+	$(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
 unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
 unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
-		 syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc $(SYSTEMUNIT)$(PPUEXT) \
-		 unixsysc.inc
+		 syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc \
+		 unixsysc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
+linux$(PPUEXT) : baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 dos$(PPUEXT) : $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
 dos$(PPUEXT) : $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
 	       unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 	       unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 crt$(PPUEXT) : $(UNIXINC)/crt.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 crt$(PPUEXT) : $(UNIXINC)/crt.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
@@ -1255,4 +1260,3 @@ ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 terminfo$(PPUEXT) : terminfo.pp unix$(PPUEXT)
 terminfo$(PPUEXT) : terminfo.pp unix$(PPUEXT)
 callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
 callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
 sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)
 sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)
-posix$(PPUEXT) : $(POSIXINC)/posix.pp sysctl$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)

+ 14 - 8
rtl/freebsd/Makefile.fpc

@@ -10,13 +10,13 @@ fpcpackage=y
 
 
 [target]
 [target]
 loaders=prt0 cprt0
 loaders=prt0 cprt0
-units=$(SYSTEMUNIT) objpas strings \
+units=$(SYSTEMUNIT) objpas strings baseunix \
       $(LINUXUNIT) unix initc \
       $(LINUXUNIT) unix initc \
       dos crt objects printer \
       dos crt objects printer \
       sysutils typinfo math varutils \
       sysutils typinfo math varutils \
       cpu mmx charset ucomplex getopts heaptrc lineinfo \
       cpu mmx charset ucomplex getopts heaptrc lineinfo \
       errors sockets gpm ipc terminfo \
       errors sockets gpm ipc terminfo \
-      video mouse keyboard console serial variants types systhrds sysctl posix
+      video mouse keyboard console serial variants types systhrds sysctl
 rsts=math varutils typinfo
 rsts=math varutils typinfo
 
 
 [require]
 [require]
@@ -30,8 +30,8 @@ fpcdir=../..
 target=freebsd
 target=freebsd
 
 
 [compiler]
 [compiler]
-includedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(POSIXINC)
-sourcedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(POSIXINC)
+includedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC)
+sourcedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) 
 targetdir=.
 targetdir=.
 
 
 [lib]
 [lib]
@@ -50,7 +50,6 @@ INC=$(RTL)/inc
 PROCINC=$(RTL)/$(CPU_TARGET)
 PROCINC=$(RTL)/$(CPU_TARGET)
 BSDINC=$(RTL)/bsd
 BSDINC=$(RTL)/bsd
 BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
 BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
-POSIXINC=$(RTL)/posix
 UNIXINC=$(RTL)/unix
 UNIXINC=$(RTL)/unix
 UNITPREFIX=rtl
 UNITPREFIX=rtl
 
 
@@ -131,10 +130,18 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
 # System Dependent Units
 # System Dependent Units
 #
 #
 
 
+baseunix$(PPUEXT) : $(UNIXINC)/errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
+	signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
+	$(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
+	$(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \
+	$(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
+
+
 unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
 unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
-                 syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc $(SYSTEMUNIT)$(PPUEXT) \
-                 unixsysc.inc
+                 syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc \
+                 unixsysc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 
 
+linux$(PPUEXT) : baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 
 
 #
 #
 # TP7 Compatible RTL Units
 # TP7 Compatible RTL Units
@@ -213,4 +220,3 @@ callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
 
 
 sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)
 sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)
 
 
-posix$(PPUEXT) : $(POSIXINC)/posix.pp sysctl$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)

+ 8 - 4
rtl/freebsd/signal.inc

@@ -127,8 +127,9 @@ type sigset_t = array[0..3] of Longint;
   PSignalRestorer = ^SignalRestorer;
   PSignalRestorer = ^SignalRestorer;
   TSigAction = procedure(Sig: Longint; SigContext: SigContextRec;someptr:pointer);cdecl;
   TSigAction = procedure(Sig: Longint; SigContext: SigContextRec;someptr:pointer);cdecl;
 
 
-  Sigset=sigset_t;
-  PSigSet = ^SigSet;
+  TSigset=sigset_t;
+  sigset=tsigset;
+  PSigSet = ^TSigSet;
 
 
   SigActionRec = packed record
   SigActionRec = packed record
 {    Handler  : record
 {    Handler  : record
@@ -138,7 +139,7 @@ type sigset_t = array[0..3] of Longint;
       end;}
       end;}
     sa_handler  : signalhandler;
     sa_handler  : signalhandler;
     Sa_Flags    : Longint;
     Sa_Flags    : Longint;
-    Sa_Mask     : SigSet;
+    Sa_Mask     : TSigSet;
   end;
   end;
   PSigActionRec = ^SigActionRec;
   PSigActionRec = ^SigActionRec;
 
 
@@ -152,7 +153,10 @@ type sigset_t = array[0..3] of Longint;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.6  2002-10-26 18:27:52  marco
+  Revision 1.7  2003-01-05 19:02:29  marco
+   * Should now work with baseunx. (gmake all works)
+
+  Revision 1.6  2002/10/26 18:27:52  marco
    * First series POSIX calls commits. Including getcwd.
    * First series POSIX calls commits. Including getcwd.
 
 
   Revision 1.5  2002/10/18 12:19:59  marco
   Revision 1.5  2002/10/18 12:19:59  marco

+ 5 - 2
rtl/freebsd/syscalls.inc

@@ -319,7 +319,7 @@ begin
 { Is it a dir ? }
 { Is it a dir ? }
   if not((st.mode and $f000)=$4000)then
   if not((st.mode and $f000)=$4000)then
    begin
    begin
-     errno:=sys_enotdir;
+     errno:=Esysenotdir;
      exit
      exit
    end;
    end;
 { Open it}
 { Open it}
@@ -514,7 +514,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.9  2002-09-07 16:01:17  peter
+  Revision 1.10  2003-01-05 19:02:29  marco
+   * Should now work with baseunx. (gmake all works)
+
+  Revision 1.9  2002/09/07 16:01:17  peter
     * old logs removed and tabs fixed
     * old logs removed and tabs fixed
 
 
   Revision 1.8  2002/05/06 07:27:39  marco
   Revision 1.8  2002/05/06 07:27:39  marco

+ 7 - 4
rtl/freebsd/unixsysc.inc

@@ -37,7 +37,7 @@ END;
 
 
   if (pointer(func)=nil) or (sp=nil) then
   if (pointer(func)=nil) or (sp=nil) then
    begin
    begin
-     LinuxError:=Sys_EInval;
+     LinuxError:=EsysEInval;
      exit(-1);
      exit(-1);
    end;
    end;
   asm
   asm
@@ -170,7 +170,7 @@ begin
    begin
    begin
      { We can save an interrupt here }
      { We can save an interrupt here }
      getpriority:=0;
      getpriority:=0;
-     linuxerror:=Sys_einval;
+     linuxerror:=ESysEinval;
    end
    end
   else
   else
    begin
    begin
@@ -197,7 +197,7 @@ Procedure SetPriority(Which,Who,What:longint);
 begin
 begin
   errno:=0;
   errno:=0;
   if ((which<prio_process) or (which>prio_user)) or ((what<-20) or (what>20)) then
   if ((which<prio_process) or (which>prio_user)) or ((what<-20) or (what>20)) then
-   linuxerror:=Sys_einval  { We can save an interrupt here }
+   linuxerror:=ESyseinval  { We can save an interrupt here }
   else
   else
    begin
    begin
      do_syscall(Syscall_nr_Setpriority,which,who,what);
      do_syscall(Syscall_nr_Setpriority,which,who,what);
@@ -785,7 +785,10 @@ End;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.6  2002-10-18 12:19:59  marco
+  Revision 1.7  2003-01-05 19:02:29  marco
+   * Should now work with baseunx. (gmake all works)
+
+  Revision 1.6  2002/10/18 12:19:59  marco
    * Fixes to get the generic *BSD RTL compiling again + fixes for thread
    * Fixes to get the generic *BSD RTL compiling again + fixes for thread
      support. Still problems left in fexpand. (inoutres?) Therefore fixed
      support. Still problems left in fexpand. (inoutres?) Therefore fixed
      sysposix not yet commited
      sysposix not yet commited