Browse Source

* updated

peter 26 years ago
parent
commit
8717616eab
3 changed files with 1097 additions and 107 deletions
  1. 909 87
      rtl/os2/Makefile
  2. 141 0
      rtl/os2/Makefile.fpc
  3. 47 20
      rtl/os2/filutil.inc

File diff suppressed because it is too large
+ 909 - 87
rtl/os2/Makefile


+ 141 - 0
rtl/os2/Makefile.fpc

@@ -0,0 +1,141 @@
+#
+#   Makefile.fpc for Free Pascal OS/2 RTL
+#
+
+[targets]
+loaders=prt0 prt1 code2 code3
+units=$(SYSTEMUNIT) objpas strings \
+      os2def doscalls moncalls kbdcalls viocalls \
+      dos crt objects printer \
+      sysutils math typinfo \
+      cpu mmx getopts heaptrc
+programs=
+
+
+[defaults]
+defaultunits=1
+defaulttarget=os2
+defaultcpu=i386
+
+
+[dirs]
+fpcdir=.
+incdir=$(INC) $(PROCINC)
+targetdir=.
+
+
+[presettings]
+RTL=..
+INC=$(RTL)/inc
+PROCINC=$(RTL)/$(CPU_TARGET)
+
+UNITPREFIX=rtl
+
+# Paths
+OBJPASDIR=$(RTL)/objpas
+GRAPHDIR=$(INC)/graph
+
+# Define Go32v2 Units
+SYSTEMUNIT=sysos2
+
+
+[postsettings]
+SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
+
+# Get the system independent include file names.
+# This will set the following variables :
+# SYSINCNAMES
+include $(INC)/makefile.inc
+SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
+
+# Get the processor dependent include file names.
+# This will set the following variables :
+# CPUINCNAMES
+include $(PROCINC)/makefile.cpu
+SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
+
+# Put system unit dependencies together.
+SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
+
+
+[rules]
+vpath %.pas $(INC) $(PROCINC)
+vpath %.pp $(INC) $(PROCINC)
+
+#
+# Loaders
+#
+
+%$(OEXT) : %.as
+        as -o $*$(OEXT) $*.as
+
+
+#
+# Base Units (System, strings, os-dependent-base-unit)
+#
+
+$(SYSTEMPPU) : sysos2.pas $(SYSDEPS)
+        $(COMPILER) -Us -Sg sysos2.pas $(REDIR)
+
+objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMPPU)
+        $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
+
+strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
+                   $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
+                   $(SYSTEMPPU)
+
+#
+# System Dependent Units
+#
+
+doscalls$(PPUEXT) : doscalls.pas strings$(PPUEXT) objects$(PPUEXT) $(SYSTEMPPU)
+
+kbdcalls$(PPUEXT) : kbdcalls.pas $(SYSTEMPPU)
+
+moncalls$(PPUEXT) : moncalls.pas strings$(PPUEXT) $(SYSTEMPPU)
+
+#
+# TP7 Compatible RTL Units
+#
+
+dos$(PPUEXT) : dos.pas $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
+               $(SYSTEMPPU)
+
+crt$(PPUEXT) : crt.pas $(INC)/textrec.inc $(SYSTEMPPU)
+
+objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
+
+printer$(PPUEXT) : printer.pas $(INC)/textrec.inc $(SYSTEMPPU)
+
+#graph$(PPUEXT) : graph.pp
+
+#
+# Delphi Compatible Units
+#
+
+sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
+                    filutil.inc disk.inc objpas$(PPUEXT)
+        $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/sysutils.pp $(REDIR)
+
+typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
+        $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
+
+math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
+        $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
+
+#
+# Other system-independent RTL Units
+#
+
+cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
+
+mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
+
+getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
+
+heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
+        $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
+
+#
+# Other system-dependent RTL Units
+#

+ 47 - 20
rtl/os2/filutil.inc

@@ -4,7 +4,7 @@
     Copyright (c) 1998 by the Free Pascal development team
 
     File utility calls
-    
+
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
 
@@ -18,132 +18,159 @@
 Function FileOpen (Const FileName : string; Mode : Integer) : Longint;
 
 Begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FileCreate (Const FileName : String) : Longint;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FileWrite (Handle : Longint; Var Buffer; Count : Longint) : Longint;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FileSeek (Handle,Offset,Origin : Longint) : Longint;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Procedure FileClose (Handle : Longint);
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
+end;
+
+
+Function FileTruncate (Handle,Size: Longint) : boolean;
+
+begin
+  //!! Needs implementing
 end;
 
 
 Function FileAge (Const FileName : String): Longint;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FileExists (Const FileName : String) : Boolean;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FindFirst (Const Path : String; Attr : Longint; Var Rslt : TSearchRec) : Longint;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FindNext (Var Rslt : TSearchRec) : Longint;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Procedure FindClose (Var F : TSearchrec);
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FileGetDate (Handle : Longint) : Longint;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FileSetDate (Handle,Age : Longint) : Longint;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FileGetAttr (Const FileName : String) : Longint;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FileSetAttr (Const Filename : String; Attr: longint) : Longint;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function DeleteFile (Const FileName : String) : Boolean;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function RenameFile (Const OldName, NewName : String) : Boolean;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
 end;
 
 
 Function FileSearch (Const Name, DirList : String) : String;
 
 begin
-  //!! Needs implementing    
+  //!! Needs implementing
+end;
+
+
+Procedure GetLocalTime(var SystemTime: TSystemTime);
+
+begin
+  //!! Needs implementing
+end ;
+
+Procedure InitAnsi;
+begin
+  //!! Needs implementing
+end;
+
+Procedure InitInternational;
+begin
+  InitAnsi;
 end;
 
 
 {
   $Log$
-  Revision 1.2  1998-10-12 08:35:22  pierre
+  Revision 1.3  1999-11-08 22:45:55  peter
+    * updated
+
+  Revision 1.2  1998/10/12 08:35:22  pierre
    * wrong file commited by Michael corrected
 
   Revision 1.1  1998/10/11 12:21:01  michael

Some files were not shown because too many files changed in this diff