瀏覽代碼

* small fixes so it compiles

peter 27 年之前
父節點
當前提交
cbbfd69395
共有 4 個文件被更改,包括 239 次插入95 次删除
  1. 14 17
      rtl/win32/base.pp
  2. 213 68
      rtl/win32/makefile
  3. 6 6
      rtl/win32/syswin32.pp
  4. 6 4
      rtl/win32/win32.inc

+ 14 - 17
rtl/win32/base.pp

@@ -84,12 +84,12 @@
           (MAKELONG((short) ((pt).x), (short) ((pt).y)))
           (MAKELONG((short) ((pt).x), (short) ((pt).y)))
 
 
 
 
-      #define SECURITY_NULL_SID_AUTHORITY     {0,0,0,0,0,0}
-      #define SECURITY_WORLD_SID_AUTHORITY    {0,0,0,0,0,1}
-      #define SECURITY_LOCAL_SID_AUTHORITY    {0,0,0,0,0,2}
-      #define SECURITY_CREATOR_SID_AUTHORITY  {0,0,0,0,0,3}
-      #define SECURITY_NON_UNIQUE_AUTHORITY   {0,0,0,0,0,4}
-      #define SECURITY_NT_AUTHORITY           {0,0,0,0,0,5}
+      #define SECURITY_NULL_SID_AUTHORITY     0,0,0,0,0,0
+      #define SECURITY_WORLD_SID_AUTHORITY    0,0,0,0,0,1
+      #define SECURITY_LOCAL_SID_AUTHORITY    0,0,0,0,0,2
+      #define SECURITY_CREATOR_SID_AUTHORITY  0,0,0,0,0,3
+      #define SECURITY_NON_UNIQUE_AUTHORITY   0,0,0,0,0,4
+      #define SECURITY_NT_AUTHORITY           0,0,0,0,0,5
 
 
  ****************************************************************************}
  ****************************************************************************}
 
 
@@ -514,34 +514,31 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.1  1998-03-25 11:18:46  root
-  Initial revision
+  Revision 1.2  1998-03-27 00:50:22  peter
+    * small fixes so it compiles
+
+  Revision 1.1.1.1  1998/03/25 11:18:46  root
+  * Restored version
 
 
   Revision 1.5  1998/01/26 12:02:21  michael
   Revision 1.5  1998/01/26 12:02:21  michael
   + Added log at the end
   + Added log at the end
 
 
-
-  
-  Working file: rtl/win32/base.pp
-  description:
-  ----------------------------
   revision 1.4
   revision 1.4
   date: 1997/12/01 12:42:46;  author: michael;  state: Exp;  lines: +10 -15
   date: 1997/12/01 12:42:46;  author: michael;  state: Exp;  lines: +10 -15
   + added copyright reference in header.
   + added copyright reference in header.
-  ----------------------------
+
   revision 1.3
   revision 1.3
   date: 1997/11/27 23:28:30;  author: florian;  state: Exp;  lines: +14 -14
   date: 1997/11/27 23:28:30;  author: florian;  state: Exp;  lines: +14 -14
   - Win32: base.pp compilable, but there is a compiler bug, so wrong assembler
   - Win32: base.pp compilable, but there is a compiler bug, so wrong assembler
            is created
            is created
   - Win32: API interface units renamed to *.pp
   - Win32: API interface units renamed to *.pp
-  ----------------------------
+  
   revision 1.2
   revision 1.2
   date: 1997/11/27 23:11:56;  author: florian;  state: Exp;  lines: +2 -2
   date: 1997/11/27 23:11:56;  author: florian;  state: Exp;  lines: +2 -2
   - Win32: some errors of base removed
   - Win32: some errors of base removed
   - Win32: unit base to makefile added
   - Win32: unit base to makefile added
-  ----------------------------
+  
   revision 1.1
   revision 1.1
   date: 1997/11/27 10:15:30;  author: florian;  state: Exp;
   date: 1997/11/27 10:15:30;  author: florian;  state: Exp;
   Win32 files added (they are untested)
   Win32 files added (they are untested)
-  =============================================================================
 }
 }

+ 213 - 68
rtl/win32/makefile

@@ -1,6 +1,17 @@
-# makes the SYSTEM-Unit for Win32
 #
 #
-# Copyright (c) 1996 by Michael Van Canneyt
+#   $Id$
+#   This file is part of the Free Pascal run time library.
+#   Copyright (c) 1996-98 by Michael van Canneyt
+#
+#   Makefile for the Free Pascal Go32v1 Runtime Library
+#
+#   See the file COPYING.FPC, included in this distribution,
+#   for details about the copyright.
+#
+#   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.
+#
 
 
 #####################################################################
 #####################################################################
 # Start of configurable section.
 # Start of configurable section.
@@ -11,13 +22,18 @@
 #####################################################################
 #####################################################################
 
 
 # set the directory where to install the units.
 # set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=c:\lib\ppc\win32
+endif
+
+# set the directory where to install libraries
 ifndef LIBINSTALLDIR
 ifndef LIBINSTALLDIR
-LIBINSTALLDIR=c:/pp/bin
+LIBINSTALLDIR=c:\lib
 endif
 endif
 
 
 # What is the Operating System
 # What is the Operating System
 ifndef OS_SRC
 ifndef OS_SRC
-OS_SRC=DOS
+OS_SRC=GO32V2
 endif
 endif
 
 
 # What is the target operating system ?
 # What is the target operating system ?
@@ -25,7 +41,14 @@ ifndef OS_TARGET
 OS_TARGET=WIN32
 OS_TARGET=WIN32
 endif
 endif
 
 
+# What is the target processor :
+ifndef CPU
+CPU=i386
+#CPU=m68k
+endif
+
 # What compiler to use ?
 # What compiler to use ?
+# I think ppc386 is better (it's mostly in path) (FK)
 ifndef PP
 ifndef PP
 PP=ppc386
 PP=ppc386
 endif
 endif
@@ -36,8 +59,9 @@ ifndef OPT
 OPT=
 OPT=
 endif
 endif
 
 
-ifndef CPU
-CPU=i386
+# Where is the ppumove program ?
+ifndef PPUMOVE
+PPUMOVE=ppumove
 endif
 endif
 
 
 #####################################################################
 #####################################################################
@@ -48,32 +72,27 @@ endif
 # Where are the include files
 # Where are the include files
 INC=../inc
 INC=../inc
 PROCINC=../$(CPU)
 PROCINC=../$(CPU)
-
-ifeq ($(OS_TARGET),$(OS_SRC))
-CROSSCOMPILE=NO
-else
-CROSSCOMPILE=YES
-endif
+OBJPASDIR=../objpas
 
 
 # To copy pograms
 # To copy pograms
 ifndef COPY
 ifndef COPY
 ifeq ($(DOS),YES)
 ifeq ($(DOS),YES)
 COPY=copy
 COPY=copy
 else
 else
-COPY=cp -f -p
+COPY=cp -p
 endif
 endif
 endif
 endif
 
 
-# To delete programs
+# Check delete program
 ifndef DEL
 ifndef DEL
 ifeq ($(DOS),YES)
 ifeq ($(DOS),YES)
 DEL=del
 DEL=del
 else
 else
-DEL=rm
+DEL=rm -f
 endif
 endif
 endif
 endif
 
 
-# To install programs
+# To install files
 ifndef INSTALL
 ifndef INSTALL
 ifeq ($(DOS),YES)
 ifeq ($(DOS),YES)
 INSTALL=copy
 INSTALL=copy
@@ -82,6 +101,15 @@ INSTALL=install -m 644
 endif
 endif
 endif
 endif
 
 
+# To install programs
+ifndef INSTALLEXE
+ifeq ($(DOS),YES)
+INSTALLEXE=copy
+else
+INSTALLEXE=install -m 755
+endif
+endif
+
 # To make a directory.
 # To make a directory.
 ifndef MKDIR
 ifndef MKDIR
 ifeq ($(DOS),YES)
 ifeq ($(DOS),YES)
@@ -91,8 +119,7 @@ MKDIR=install -m 755 -d
 endif
 endif
 endif
 endif
 
 
-
-#diff program
+# diff program
 ifndef REFPATH
 ifndef REFPATH
 REFPATH=/usr/local/fpk/work/new/rtl
 REFPATH=/usr/local/fpk/work/new/rtl
 endif
 endif
@@ -103,86 +130,204 @@ ifndef DIFFOPTS
 DIFFOPTS=-b -c
 DIFFOPTS=-b -c
 endif
 endif
 
 
-ifeq ($(CROSSCOMPILE),YES)
-OPT:=$(OPT) -dCROSSCOMPILE -TWIN32
+#
+# System independent Commandline Options
+#
+
+# Cross compiling ?
+ifeq ($(OS_TARGET),$(OS_SRC))
+CROSSCOMPILE=NO
+else
+CROSSCOMPILE=YES
 endif
 endif
 
 
+# add required options... (-dFPC is required for older versions)
+override OPT:= $(OPT) -dFPC -d$(CPU)
+
 # Was a config file specified ?
 # Was a config file specified ?
 ifdef CFGFILE
 ifdef CFGFILE
-OPT:=$(OPT) @$(CFGFILE)
+override OPT:=$(OPT) @$(CFGFILE)
 endif
 endif
 
 
-# os independent depends
-SYSTEMDEPS=$(INC)/system.inc $(INC)/systemh.inc $(INC)/mathh.inc $(INC)/real2str.inc \
-	$(INC)/heaph.inc $(INC)/innr.inc $(INC)/sstrings.inc $(INC)/file.inc \
-	$(INC)/text.inc $(INC)/typefile.inc $(INC)/version.inc $(INC)/filerec.inc \
-	$(INC)/textrec.inc \
-	$(PROCINC)/math.inc $(PROCINC)/set.inc $(PROCINC)/heap.inc $(PROCINC)/$(CPU).inc
+# Check for crosscompile
+ifeq ($(CROSSCOMPILE),YES)
+override OPT:= $(OPT) -dCROSSCOMPILE -T$(OS_TARGET)
+endif
 
 
-PPUEXT = .ppu
+#
+# System dependent Commandline Options
+#
 
 
-OEXT = .obj
 
 
+#####################################################################
+# System dependent
+#####################################################################
 
 
-.PHONY: all clean install diffs diffclean
+# Determine needed extensions
+PPUEXT=.ppw
+PPLEXT=.ppl
+OEXT=.obj
+ASMEXT=.s
+LIBEXT=.a
 
 
-all : syswin32$(PPUEXT) strings$(PPUEXT) objpas$(PPUEXT) getopts$(PPUEXT) \
-	base$(PPUEXT)
+# Define Linux Units
+SYSTEMPPU=syswin32$(PPUEXT)
+OBJECTS=strings objpas \
+	base \
+#	 dos crt objects printer \
+	cpu mmx getopts \
 
 
+# No loaders needed
+LOADERS=
 
 
-getopts$(PPUEXT) : $(PROCINC)/getopts.pp syswin32$(PPUEXT)
-	$(COPY) $(PROCINC)/getopts.pp .
-	$(PP) $(OPT) getopts.pp $(REDIR)
-	$(DEL) getopts.pp
+#####################################################################
+# System independent Makefile
+#####################################################################
+
+# OS Independent Depends
+SYSTEMDEPS=system.inc systemh.inc mathh.inc real2str.inc \
+	heaph.inc innr.inc sstrings.inc file.inc \
+	text.inc typefile.inc version.inc filerec.inc \
+	textrec.inc
+
+# Processor Dependent Depends
+SYSPROCDEPS=math.inc set.inc heap.inc $(CPU).inc
+
+# Add Prefix and Suffixes
+OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
+PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
+DSYSTEMDEPS=$(addprefix $(INC)/, $(SYSTEMDEPS))
+DSYSPROCDEPS=$(addprefix $(PROCINC)/, $(SYSPROCDEPS))
+
+
+.PHONY : all install clean \
+	 libs libsclean \
+	 diffs diffclean \
 
 
-strings$(PPUEXT) : $(PROCINC)/strings.pp syswin32$(PPUEXT)
+all : $(OBJLOADERS) $(PPUOBJECTS)
+
+install : all
+	$(MKDIR) $(UNITINSTALLDIR)
+	$(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
+
+clean :
+	-$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *.PPS log
+
+#####################################################################
+# Files
+#####################################################################
+
+#
+# Loaders
+#
+
+#
+# Base Units (System, strings, os-dependent-base-unit)
+#
+
+$(SYSTEMPPU) : syswin32.pp $(DSYSTEMDEPS) $(DSYSPROCDEPS)
+	$(COPY) $(DSYSTEMDEPS) .
+	$(COPY) $(DSYSPROCDEPS) .
+	$(PP) $(OPT) -Us -Sg syswin32.pp $(REDIR)
+	$(DEL) $(SYSTEMDEPS)
+	$(DEL) $(SYSPROCDEPS)
+
+strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
 	$(COPY) $(PROCINC)/strings.pp .
 	$(COPY) $(PROCINC)/strings.pp .
 	$(PP) $(OPT) strings.pp $(REDIR)
 	$(PP) $(OPT) strings.pp $(REDIR)
 	$(DEL) strings.pp
 	$(DEL) strings.pp
 
 
-dos$(PPUEXT) : dos.pp strings$(PPUEXT) syswin32$(PPUEXT)
-	$(PP) $(OPT) dos.pp $(REDIR)
+#
+# Delphi Object Model
+#
 
 
-base$(PPUEXT) : base.pp syswin32$(PPUEXT)
+objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
+	$(COPY) $(OBJPASDIR)/objpas.pp .
+	$(PP) $(OPT) objpas $(REDIR)
+	$(DEL) objpas.pp
+
+#
+# System Dependent Units
+#
+
+base$(PPUEXT) : base.pp $(SYSTEMPPU)
 	$(PP) $(OPT) base.pp $(REDIR)
 	$(PP) $(OPT) base.pp $(REDIR)
 
 
-objpas$(PPUEXT) : ../objpas/objpas.pp system$(PPUEXT)
-        $(COPY) ../objpas/objpas.pp .
-        $(PP) $(OPT) objpas $(REDIR)
-        $(DEL) objpas.pp
-
-syswin32$(PPUEXT) : syswin32.pp $(SYSTEMDEP)
-	$(COPY) $(INC)/*.inc $(PROCINC)/*.inc .
-	$(PP) $(OPT) -Us -Sg syswin32 $(REDIR)
-	$(DEL) systemh.inc system.inc real2str.inc version.inc $(CPU).inc sstrings.inc
-	$(DEL) mathh.inc math.inc set.inc innr.inc heap.inc heaph.inc
-	$(DEL) filerec.inc textrec.inc file.inc typefile.inc text.inc
-
-clean:
-	-$(DEL) *$(OEXT)
-	-$(DEL) *$(PPUEXT)
-	-$(DEL) *.dif
-	-$(DEL) *.s
-	-$(DEL) log
+#
+# TP7 Compatible RTL Units
+#
 
 
-diffclean:
-	-$(DEL) *.dif
+dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
+	       go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
+	$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
+	$(PP) $(OPT) dos $(REDIR)
+	$(DEL) filerec.inc textrec.inc
+
+#crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
+#	 $(COPY) $(INC)/textrec.inc .
+#	 $(PP) $(OPT) crt $(REDIR)
+#	 $(DEL) textrec.inc
+
+#objects$(PPUEXT) : objects.pp $(SYSTEMPPU)
+#	 $(PP) $(OPT) objects.pp $(REDIR)
 
 
-install: all
-	$(MKDIR) $(LIBINSTALLDIR)/units
-	$(INSTALL) *$(OEXT) *$(PPUEXT) $(LIBINSTALLDIR)/units
+#printer$(PPUEXT) : printer.pp $(SYSTEMPPU)
+#	 $(PP) $(OPT) printer.pp $(REDIR)
+
+#
+# Other RTL Units
+#
+
+cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
+	$(COPY) $(PROCINC)/cpu.pp .
+	$(PP) $(OPT) cpu.pp $(REDIR)
+	$(DEL) cpu.pp
+
+mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
+	$(COPY) $(PROCINC)/mmx.pp .
+	$(PP) $(OPT) mmx.pp $(REDIR)
+	$(DEL) mmx.pp
+
+getopts$(PPUEXT) : $(PROCINC)/getopts.pp $(SYSTEMPPU)
+	$(COPY) $(PROCINC)/getopts.pp .
+	$(PP) $(OPT) getopts.pp $(REDIR)
+	$(DEL) getopts.pp
+
+
+#####################################################################
+# Libs
+#####################################################################
+
+libs: all
+
+libsclean : clean
+	-$(DEL) *.$(LIBEXT) *$(PPLEXT)
+
+#####################################################################
+# Diffs
+#####################################################################
 
 
 %.dif : %.pp
 %.dif : %.pp
-	-$(DIFF) $(DIFOPTS) $*.pp $(REFPATH)/win32/$*.pp > $*.dif
+	-$(DIFF) $(DIFFOPTS) $*.pp $(REFPATH)/dos/go32v1/$*.pp > $*.dif
 
 
 %.dif : %.inc
 %.dif : %.inc
-	-$(DIFF) $(DIFOPTS) $*.inc $(REFPATH)/win32/$*.inc > $*.dif
+	-$(DIFF) $(DIFFOPTS) $*.inc $(REFPATH)/dos/go32v1/$*.inc > $*.dif
 
 
 %.dif : %.as
 %.dif : %.as
-	-$(DIFF) $(DIFOPTS) $*.as $(REFPATH)/win32/$*.as > $*.dif
+	-$(DIFF) $(DIFFOPTS) $*.as $(REFPATH)/dos/go32v1/$*.as > $*.dif
+
+diffclean:
+	-$(DEL) *.dif
 
 
 makefile.dif : makefile
 makefile.dif : makefile
-	-$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/os2/makefile > makefile.dif
+	-$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/dos/go32v1/makefile > makefile.dif
+
+diffs: syswin32.dif os.dif makefile.dif dos.dif base.dif struct.dif \
+       winheap.dif messages.dif
+
+#####################################################################
+# Distribution
+#####################################################################
 
 
+distclean : clean libsclean diffclean
 
 
-diffs: syswin32.dif dos.dif os.dif

+ 6 - 6
rtl/win32/syswin32.pp

@@ -13,9 +13,6 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
-
-{ system unit for Win32 }
-{$define Win32}
 unit syswin32;
 unit syswin32;
 
 
 {$I os.inc}
 {$I os.inc}
@@ -194,7 +191,7 @@ end;
     function do_write(h,addr,len : longint) : longint;
     function do_write(h,addr,len : longint) : longint;
 
 
       var
       var
-         size:longint
+         size:longint;
 
 
       begin
       begin
          if writefile(h,pointer(addr),len,size,nil)=0 then
          if writefile(h,pointer(addr),len,size,nil)=0 then
@@ -462,8 +459,11 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.1  1998-03-25 11:18:47  root
-  Initial revision
+  Revision 1.2  1998-03-27 00:50:22  peter
+    * small fixes so it compiles
+
+  Revision 1.1.1.1  1998/03/25 11:18:47  root
+  * Restored version
 
 
   Revision 1.13  1998/03/05 22:37:36  florian
   Revision 1.13  1998/03/05 22:37:36  florian
     * some stuff added
     * some stuff added

+ 6 - 4
rtl/win32/win32.inc

@@ -22,7 +22,6 @@
 
 
     type
     type
        UINT = longint;
        UINT = longint;
-       DWORD = longint;
        LPDWORD = ^DWORD;
        LPDWORD = ^DWORD;
        BOOL = longint;
        BOOL = longint;
 {$ifdef UNICODE}
 {$ifdef UNICODE}
@@ -95,8 +94,11 @@
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.1  1998-03-25 11:18:47  root
-  Initial revision
+  Revision 1.2  1998-03-27 00:50:22  peter
+    * small fixes so it compiles
+
+  Revision 1.1.1.1  1998/03/25 11:18:47  root
+  * Restored version
 
 
   Revision 1.5  1998/03/05 22:37:37  florian
   Revision 1.5  1998/03/05 22:37:37  florian
     * some stuff added
     * some stuff added
@@ -105,7 +107,7 @@
   + Added log at the end
   + Added log at the end
 
 
 
 
-  
+
   Working file: rtl/win32/win32.inc
   Working file: rtl/win32/win32.inc
   description:
   description:
   ----------------------------
   ----------------------------