From 89f8474388558b96d6f5e8f774c5073261c3d70f Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 2 Apr 2006 20:52:17 +0000 Subject: [PATCH] * unified and moved some win32/win64 stuff + more units on win64 compile git-svn-id: trunk@3131 - --- .gitattributes | 39 +++++----- .gitignore | 14 ++-- rtl/inc/mathh.inc | 2 - rtl/objpas/sysutils/datih.inc | 2 +- rtl/objpas/sysutils/filutilh.inc | 24 +++--- rtl/objpas/sysutils/osutil.inc | 8 +- rtl/{win32 => win}/dos.pp | 0 rtl/{win32 => win}/sysutils.pp | 22 +++--- rtl/{win32 => win}/varutils.pp | 0 rtl/{win32 => win}/wininc/Makefile | 0 rtl/{win32 => win}/wininc/ascdef.inc | 0 rtl/{win32 => win}/wininc/ascdef.sed | 0 rtl/{win32 => win}/wininc/ascfun.inc | 0 rtl/{win32 => win}/wininc/base.inc | 8 +- rtl/{win32 => win}/wininc/defines.inc | 0 rtl/{win32 => win}/wininc/errors.inc | 0 rtl/{win32 => win}/wininc/func.inc | 0 rtl/{win32 => win}/wininc/makefile.inc | 0 rtl/{win32 => win}/wininc/messages.inc | 0 rtl/{win32 => win}/wininc/redef.inc | 0 rtl/{win32 => win}/wininc/struct.inc | 0 rtl/{win32 => win}/wininc/unidef.inc | 0 rtl/{win32 => win}/wininc/unidef.sed | 0 rtl/{win32 => win}/wininc/unifun.inc | 0 rtl/{win32 => win}/winsock.pp | 0 rtl/win32/Makefile | 19 +++-- rtl/win32/Makefile.fpc | 17 +++-- rtl/win64/Makefile | 100 +++++++++++++------------ rtl/win64/Makefile.fpc | 39 ++++++---- rtl/win64/windows.pp | 65 ++++++++++++++++ rtl/x86_64/math.inc | 2 - rtl/x86_64/mathu.inc | 3 +- 32 files changed, 223 insertions(+), 141 deletions(-) rename rtl/{win32 => win}/dos.pp (100%) rename rtl/{win32 => win}/sysutils.pp (97%) rename rtl/{win32 => win}/varutils.pp (100%) rename rtl/{win32 => win}/wininc/Makefile (100%) rename rtl/{win32 => win}/wininc/ascdef.inc (100%) rename rtl/{win32 => win}/wininc/ascdef.sed (100%) rename rtl/{win32 => win}/wininc/ascfun.inc (100%) rename rtl/{win32 => win}/wininc/base.inc (99%) rename rtl/{win32 => win}/wininc/defines.inc (100%) rename rtl/{win32 => win}/wininc/errors.inc (100%) rename rtl/{win32 => win}/wininc/func.inc (100%) rename rtl/{win32 => win}/wininc/makefile.inc (100%) rename rtl/{win32 => win}/wininc/messages.inc (100%) rename rtl/{win32 => win}/wininc/redef.inc (100%) rename rtl/{win32 => win}/wininc/struct.inc (100%) rename rtl/{win32 => win}/wininc/unidef.inc (100%) rename rtl/{win32 => win}/wininc/unidef.sed (100%) rename rtl/{win32 => win}/wininc/unifun.inc (100%) rename rtl/{win32 => win}/winsock.pp (100%) create mode 100644 rtl/win64/windows.pp diff --git a/.gitattributes b/.gitattributes index bf27cae80c..db4f2b5d73 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4528,17 +4528,35 @@ rtl/watcom/system.pp svneol=native#text/plain rtl/watcom/sysutils.pp svneol=native#text/plain rtl/watcom/varutils.pp svneol=native#text/plain rtl/watcom/watcom.pp svneol=native#text/plain +rtl/win/dos.pp svneol=native#text/plain rtl/win/sysdir.inc svneol=native#text/plain rtl/win/sysfile.inc svneol=native#text/plain rtl/win/sysheap.inc svneol=native#text/plain rtl/win/sysos.inc svneol=native#text/plain rtl/win/sysosh.inc svneol=native#text/plain rtl/win/systhrd.inc svneol=native#text/plain +rtl/win/sysutils.pp svneol=native#text/plain +rtl/win/varutils.pp svneol=native#text/plain +rtl/win/wininc/Makefile svneol=native#text/plain +rtl/win/wininc/ascdef.inc svneol=native#text/plain +rtl/win/wininc/ascdef.sed -text +rtl/win/wininc/ascfun.inc svneol=native#text/plain +rtl/win/wininc/base.inc svneol=native#text/plain +rtl/win/wininc/defines.inc svneol=native#text/plain +rtl/win/wininc/errors.inc svneol=native#text/plain +rtl/win/wininc/func.inc svneol=native#text/plain +rtl/win/wininc/makefile.inc svneol=native#text/plain +rtl/win/wininc/messages.inc svneol=native#text/plain +rtl/win/wininc/redef.inc svneol=native#text/plain +rtl/win/wininc/struct.inc svneol=native#text/plain +rtl/win/wininc/unidef.inc svneol=native#text/plain +rtl/win/wininc/unidef.sed -text +rtl/win/wininc/unifun.inc svneol=native#text/plain +rtl/win/winsock.pp svneol=native#text/plain rtl/win32/Makefile svneol=native#text/plain rtl/win32/Makefile.fpc svneol=native#text/plain rtl/win32/classes.pp svneol=native#text/plain rtl/win32/crt.pp svneol=native#text/plain -rtl/win32/dos.pp svneol=native#text/plain rtl/win32/dynlibs.inc svneol=native#text/plain rtl/win32/gprt0.as -text rtl/win32/initc.pp svneol=native#text/plain @@ -4550,31 +4568,13 @@ rtl/win32/printer.pp svneol=native#text/plain rtl/win32/signals.pp svneol=native#text/plain rtl/win32/sockets.pp svneol=native#text/plain rtl/win32/system.pp svneol=native#text/plain -rtl/win32/sysutils.pp svneol=native#text/plain rtl/win32/tthread.inc svneol=native#text/plain -rtl/win32/varutils.pp svneol=native#text/plain rtl/win32/video.pp svneol=native#text/plain rtl/win32/wcygprt0.as -text rtl/win32/wdllprt0.as -text rtl/win32/win32res.inc svneol=native#text/plain rtl/win32/windows.pp svneol=native#text/plain rtl/win32/winevent.pp svneol=native#text/plain -rtl/win32/wininc/Makefile svneol=native#text/plain -rtl/win32/wininc/ascdef.inc svneol=native#text/plain -rtl/win32/wininc/ascdef.sed -text -rtl/win32/wininc/ascfun.inc svneol=native#text/plain -rtl/win32/wininc/base.inc svneol=native#text/plain -rtl/win32/wininc/defines.inc svneol=native#text/plain -rtl/win32/wininc/errors.inc svneol=native#text/plain -rtl/win32/wininc/func.inc svneol=native#text/plain -rtl/win32/wininc/makefile.inc svneol=native#text/plain -rtl/win32/wininc/messages.inc svneol=native#text/plain -rtl/win32/wininc/redef.inc svneol=native#text/plain -rtl/win32/wininc/struct.inc svneol=native#text/plain -rtl/win32/wininc/unidef.inc svneol=native#text/plain -rtl/win32/wininc/unidef.sed -text -rtl/win32/wininc/unifun.inc svneol=native#text/plain -rtl/win32/winsock.pp svneol=native#text/plain rtl/win32/winsock2.pp svneol=native#text/plain rtl/win32/winsysut.pp svneol=native#text/plain rtl/win32/wprt0.as -text @@ -4582,6 +4582,7 @@ rtl/win32/wprt0_10.as -text rtl/win64/Makefile svneol=native#text/plain rtl/win64/Makefile.fpc svneol=native#text/plain rtl/win64/system.pp svneol=native#text/plain +rtl/win64/windows.pp svneol=native#text/plain rtl/wince/Makefile svneol=native#text/plain rtl/wince/Makefile.fpc svneol=native#text/plain rtl/wince/arm/wprt0.as svneol=native#text/plain diff --git a/.gitignore b/.gitignore index 706df374e2..21ff160dea 100644 --- a/.gitignore +++ b/.gitignore @@ -2057,6 +2057,13 @@ rtl/win/*.ppu rtl/win/*.s rtl/win/fpcmade.* rtl/win/units +rtl/win/wininc/*.bak +rtl/win/wininc/*.exe +rtl/win/wininc/*.o +rtl/win/wininc/*.ppu +rtl/win/wininc/*.s +rtl/win/wininc/fpcmade.* +rtl/win/wininc/units rtl/win32/*.bak rtl/win32/*.exe rtl/win32/*.o @@ -2064,13 +2071,6 @@ rtl/win32/*.ppu rtl/win32/*.s rtl/win32/fpcmade.* rtl/win32/units -rtl/win32/wininc/*.bak -rtl/win32/wininc/*.exe -rtl/win32/wininc/*.o -rtl/win32/wininc/*.ppu -rtl/win32/wininc/*.s -rtl/win32/wininc/fpcmade.* -rtl/win32/wininc/units rtl/win64/*.bak rtl/win64/*.exe rtl/win64/*.o diff --git a/rtl/inc/mathh.inc b/rtl/inc/mathh.inc index 2900b45cce..2a1a9b75db 100644 --- a/rtl/inc/mathh.inc +++ b/rtl/inc/mathh.inc @@ -23,13 +23,11 @@ {$endif cpui386} {$ifdef cpux86_64} -{$ifndef WIN64} const Default8087CW : word = $1332; procedure Set8087CW(cw:word); function Get8087CW:word; -{$endif WIN64} {$endif cpux86_64} { declarations of the math routines } diff --git a/rtl/objpas/sysutils/datih.inc b/rtl/objpas/sysutils/datih.inc index ce2f567d44..cf6e38bcec 100644 --- a/rtl/objpas/sysutils/datih.inc +++ b/rtl/objpas/sysutils/datih.inc @@ -78,7 +78,7 @@ const } type -{$ifndef win32} +{$if not(defined(win32)) and not(defined(win64)) } { Win32 reuses the struct from the Windows unit } TSystemTime = record Year, Month, Day: word; diff --git a/rtl/objpas/sysutils/filutilh.inc b/rtl/objpas/sysutils/filutilh.inc index e486101917..bba5d12c3c 100644 --- a/rtl/objpas/sysutils/filutilh.inc +++ b/rtl/objpas/sysutils/filutilh.inc @@ -27,7 +27,7 @@ Type {$else unix} FindHandle : THandle; {$endif unix} -{$if defined(Win32) or defined(WinCE)} +{$if defined(Win32) or defined(WinCE) or defined(Win64)} FindData : TWin32FindData; {$endif} {$ifdef netware_clib} @@ -68,23 +68,23 @@ Const fsFromCurrent = 1; fsFromEnd = 2; -Function FileOpen (Const FileName : string; Mode : Integer) : Longint; -Function FileCreate (Const FileName : String) : Longint; -Function FileCreate (Const FileName : String; Mode : Integer) : Longint; -Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint; -Function FileWrite (Handle : Longint; const Buffer; Count : Longint) : Longint; -Function FileSeek (Handle,FOffset,Origin : Longint) : Longint; -Function FileSeek (Handle : Longint; FOffset,Origin : Int64) : Int64; -Procedure FileClose (Handle : Longint); -Function FileTruncate (Handle,Size: Longint) : boolean; +Function FileOpen (Const FileName : string; Mode : Integer) : THandle; +Function FileCreate (Const FileName : String) : THandle; +Function FileCreate (Const FileName : String; Mode : Integer) : THandle; +Function FileRead (Handle : THandle; Var Buffer; Count : longint) : Longint; +Function FileWrite (Handle : THandle; const Buffer; Count : Longint) : Longint; +Function FileSeek (Handle : THandle;FOffset,Origin : Longint) : Longint; +Function FileSeek (Handle : THandle; FOffset,Origin : Int64) : Int64; +Procedure FileClose (Handle : THandle); +Function FileTruncate (Handle : THandle;Size: Longint) : boolean; Function FileAge (Const FileName : String): Longint; Function FileExists (Const FileName : String) : Boolean; Function DirectoryExists (Const Directory : String) : Boolean; Function FindFirst (Const Path : String; Attr : Longint; out Rslt : TSearchRec) : Longint; Function FindNext (Var Rslt : TSearchRec) : Longint; Procedure FindClose (Var F : TSearchrec); -Function FileGetDate (Handle : Longint) : Longint; -Function FileSetDate (Handle,Age : Longint) : Longint; +Function FileGetDate (Handle : THandle) : Longint; +Function FileSetDate (Handle : THandle;Age : Longint) : Longint; Function FileSetDate (Const FileName : String;Age : Longint) : Longint; Function FileGetAttr (Const FileName : String) : Longint; Function FileSetAttr (Const Filename : String; Attr: longint) : Longint; diff --git a/rtl/objpas/sysutils/osutil.inc b/rtl/objpas/sysutils/osutil.inc index 0762491e5d..22b409bd9c 100644 --- a/rtl/objpas/sysutils/osutil.inc +++ b/rtl/objpas/sysutils/osutil.inc @@ -204,24 +204,24 @@ begin Result:=GetTempFileName('',''); end; -{$ifndef win32} +{$if not(defined(win32)) and not(defined(win64))} Function GetTempFileName(Dir,Prefix: PChar; uUnique: DWORD; TempFileName: PChar):DWORD; Var P,Buf : String; L : Integer; - + begin P:=StrPas(Prefix); if (uUnique<>0) then P:=P+format('%.4x',[uUnique]); - Buf:=GetTempFileName(StrPas(Dir),P); + Buf:=GetTempFileName(StrPas(Dir),P); L:=Length(Buf); If (L>0) then Move(Buf[1],TempFileName^,L+1); if (uUnique<>0) then result:=uUnique else - result:=1; + result:=1; end; {$endif} diff --git a/rtl/win32/dos.pp b/rtl/win/dos.pp similarity index 100% rename from rtl/win32/dos.pp rename to rtl/win/dos.pp diff --git a/rtl/win32/sysutils.pp b/rtl/win/sysutils.pp similarity index 97% rename from rtl/win32/sysutils.pp rename to rtl/win/sysutils.pp index 3dd675bd6b..7fd03aa2a3 100644 --- a/rtl/win32/sysutils.pp +++ b/rtl/win/sysutils.pp @@ -133,7 +133,7 @@ end; File Functions ****************************************************************************} -Function FileOpen (Const FileName : string; Mode : Integer) : Longint; +Function FileOpen (Const FileName : string; Mode : Integer) : THandle; const AccessMode: array[0..2] of Cardinal = ( GENERIC_READ, @@ -155,7 +155,7 @@ begin end; -Function FileCreate (Const FileName : String) : Longint; +Function FileCreate (Const FileName : String) : THandle; Var FN : string; begin @@ -165,13 +165,13 @@ begin end; -Function FileCreate (Const FileName : String; Mode:longint) : SizeInt; +Function FileCreate (Const FileName : String; Mode:longint) : THandle; begin FileCreate:=FileCreate(FileName); end; -Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint; +Function FileRead (Handle : THandle; Var Buffer; Count : longint) : Longint; Var res : dword; begin @@ -182,7 +182,7 @@ begin end; -Function FileWrite (Handle : Longint; const Buffer; Count : Longint) : Longint; +Function FileWrite (Handle : THandle; const Buffer; Count : Longint) : Longint; Var Res : dword; begin @@ -193,20 +193,20 @@ begin end; -Function FileSeek (Handle,FOffset,Origin : Longint) : Longint; +Function FileSeek (Handle : THandle;FOffset,Origin : Longint) : Longint; begin Result := longint(SetFilePointer(Handle, FOffset, nil, Origin)); end; -Function FileSeek (Handle : Longint; FOffset,Origin : Int64) : Int64; +Function FileSeek (Handle : THandle; FOffset,Origin : Int64) : Int64; begin {$warning need to add 64bit call } Result := longint(SetFilePointer(Handle, FOffset, nil, Origin)); end; -Procedure FileClose (Handle : Longint); +Procedure FileClose (Handle : THandle); begin if Handle<=4 then exit; @@ -214,7 +214,7 @@ begin end; -Function FileTruncate (Handle,Size: Longint) : boolean; +Function FileTruncate (Handle : THandle;Size: Longint) : boolean; begin Result:=longint(SetFilePointer(handle,Size,nil,FILE_BEGIN))<>-1; If Result then @@ -334,7 +334,7 @@ begin end; -Function FileGetDate (Handle : Longint) : Longint; +Function FileGetDate (Handle : THandle) : Longint; Var FT : TFileTime; begin @@ -345,7 +345,7 @@ begin end; -Function FileSetDate (Handle,Age : Longint) : Longint; +Function FileSetDate (Handle : THandle;Age : Longint) : Longint; Var FT: TFileTime; begin diff --git a/rtl/win32/varutils.pp b/rtl/win/varutils.pp similarity index 100% rename from rtl/win32/varutils.pp rename to rtl/win/varutils.pp diff --git a/rtl/win32/wininc/Makefile b/rtl/win/wininc/Makefile similarity index 100% rename from rtl/win32/wininc/Makefile rename to rtl/win/wininc/Makefile diff --git a/rtl/win32/wininc/ascdef.inc b/rtl/win/wininc/ascdef.inc similarity index 100% rename from rtl/win32/wininc/ascdef.inc rename to rtl/win/wininc/ascdef.inc diff --git a/rtl/win32/wininc/ascdef.sed b/rtl/win/wininc/ascdef.sed similarity index 100% rename from rtl/win32/wininc/ascdef.sed rename to rtl/win/wininc/ascdef.sed diff --git a/rtl/win32/wininc/ascfun.inc b/rtl/win/wininc/ascfun.inc similarity index 100% rename from rtl/win32/wininc/ascfun.inc rename to rtl/win/wininc/ascfun.inc diff --git a/rtl/win32/wininc/base.inc b/rtl/win/wininc/base.inc similarity index 99% rename from rtl/win32/wininc/base.inc rename to rtl/win/wininc/base.inc index f45141fb7d..c72c1d00dc 100644 --- a/rtl/win32/wininc/base.inc +++ b/rtl/win/wininc/base.inc @@ -72,6 +72,10 @@ LONGLONG = int64; PLONGLONG = ^LONGLONG; + INT_PTR = PtrInt; + UINT_PTR = PtrUInt; + LONG_PTR = PtrInt; + ULONG_PTR = PtrUInt; DWORDLONG = qword; { was unsigned long } PDWORDLONG = ^DWORDLONG; @@ -802,14 +806,14 @@ type { argument types are unknown } function MAKEINTATOM(i : longint) : LPTSTR; begin - MAKEINTATOM:=LPTSTR(DWORD(WORD(i))); + MAKEINTATOM:=LPTSTR(ULONG_PTR(WORD(i))); end; { was #define dname(params) def_expr } { argument types are unknown } function MAKEINTRESOURCE(i : longint) : LPTSTR; begin - MAKEINTRESOURCE:=LPTSTR(DWORD(WORD(i))); + MAKEINTRESOURCE:=LPTSTR(ULONG_PTR(WORD(i))); end; { was #define dname(params) def_expr } diff --git a/rtl/win32/wininc/defines.inc b/rtl/win/wininc/defines.inc similarity index 100% rename from rtl/win32/wininc/defines.inc rename to rtl/win/wininc/defines.inc diff --git a/rtl/win32/wininc/errors.inc b/rtl/win/wininc/errors.inc similarity index 100% rename from rtl/win32/wininc/errors.inc rename to rtl/win/wininc/errors.inc diff --git a/rtl/win32/wininc/func.inc b/rtl/win/wininc/func.inc similarity index 100% rename from rtl/win32/wininc/func.inc rename to rtl/win/wininc/func.inc diff --git a/rtl/win32/wininc/makefile.inc b/rtl/win/wininc/makefile.inc similarity index 100% rename from rtl/win32/wininc/makefile.inc rename to rtl/win/wininc/makefile.inc diff --git a/rtl/win32/wininc/messages.inc b/rtl/win/wininc/messages.inc similarity index 100% rename from rtl/win32/wininc/messages.inc rename to rtl/win/wininc/messages.inc diff --git a/rtl/win32/wininc/redef.inc b/rtl/win/wininc/redef.inc similarity index 100% rename from rtl/win32/wininc/redef.inc rename to rtl/win/wininc/redef.inc diff --git a/rtl/win32/wininc/struct.inc b/rtl/win/wininc/struct.inc similarity index 100% rename from rtl/win32/wininc/struct.inc rename to rtl/win/wininc/struct.inc diff --git a/rtl/win32/wininc/unidef.inc b/rtl/win/wininc/unidef.inc similarity index 100% rename from rtl/win32/wininc/unidef.inc rename to rtl/win/wininc/unidef.inc diff --git a/rtl/win32/wininc/unidef.sed b/rtl/win/wininc/unidef.sed similarity index 100% rename from rtl/win32/wininc/unidef.sed rename to rtl/win/wininc/unidef.sed diff --git a/rtl/win32/wininc/unifun.inc b/rtl/win/wininc/unifun.inc similarity index 100% rename from rtl/win32/wininc/unifun.inc rename to rtl/win/wininc/unifun.inc diff --git a/rtl/win32/winsock.pp b/rtl/win/winsock.pp similarity index 100% rename from rtl/win32/winsock.pp rename to rtl/win/winsock.pp diff --git a/rtl/win32/Makefile b/rtl/win32/Makefile index f59f549c6a..8fbc5aa2dd 100644 --- a/rtl/win32/Makefile +++ b/rtl/win32/Makefile @@ -1,5 +1,5 @@ # -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/03/19] +# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/04/02] # default: all MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince powerpc64-linux @@ -237,7 +237,8 @@ RTL=.. INC=$(RTL)/inc COMMON=$(RTL)/common PROCINC=$(RTL)/$(CPU_TARGET) -WININC=wininc +WININC=../win/wininc +WINDIR=../win UNITPREFIX=rtl ifneq ($(findstring 2.0.,$(FPC_VERSION)),) LOADERS=wprt0 wdllprt0 gprt0 wcygprt0 @@ -2109,18 +2110,20 @@ windows$(PPUEXT) : windows.pp $(WINDOWS_SOURCE_FILES) system$(PPUEXT) messages$(PPUEXT): messages.pp $(WININC)/messages.inc system$(PPUEXT) $(COMPILER) -I$(WININC) messages.pp opengl32$(PPUEXT) : opengl32.pp windows$(PPUEXT) system$(PPUEXT) -winsock$(PPUEXT) : winsock.pp windows$(PPUEXT) system$(PPUEXT) +winsock$(PPUEXT) : $(WINDIR)/winsock.pp windows$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(WINDIR)/winsock.pp winsock2$(PPUEXT) : winsock2.pp windows$(PPUEXT) system$(PPUEXT) sockets$(PPUEXT) : sockets.pp windows$(PPUEXT) winsock$(PPUEXT) winsock2$(PPUEXT) system$(PPUEXT) \ $(INC)/sockets.inc $(INC)/socketsh.inc initc$(PPUEXT) : initc.pp system$(PPUEXT) dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT) -dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) system$(PPUEXT) +dos$(PPUEXT) : $(WINDIR)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(WINDIR)/dos.pp crt$(PPUEXT) : crt.pp $(INC)/textrec.inc system$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT) objects$(PPUEXT) : $(INC)/objects.pp system$(PPUEXT) -sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \ +sysutils$(PPUEXT) : $(WINDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \ objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT) sysconst$(PPUEXT) - $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp + $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(WINDIR)/sysutils.pp classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \ sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) sysconst$(PPUEXT) $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp @@ -2131,8 +2134,8 @@ typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT) math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) $(COMPILER) $(OBJPASDIR)/math.pp varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \ - $(OBJPASDIR)/varutilh.inc varutils.pp sysutils$(PPUEXT) - $(COMPILER) -Fi$(OBJPASDIR) varutils.pp + $(OBJPASDIR)/varutilh.inc $(WINDIR)/varutils.pp sysutils$(PPUEXT) + $(COMPILER) -Fi$(OBJPASDIR) $(WINDIR)/varutils.pp variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT) sysutils$(PPUEXT) sysconst$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) $(COMPILER) -Fi$(INC) $(INC)/variants.pp types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) system$(PPUEXT) diff --git a/rtl/win32/Makefile.fpc b/rtl/win32/Makefile.fpc index a581f69bd9..dba47b221b 100644 --- a/rtl/win32/Makefile.fpc +++ b/rtl/win32/Makefile.fpc @@ -40,7 +40,8 @@ RTL=.. INC=$(RTL)/inc COMMON=$(RTL)/common PROCINC=$(RTL)/$(CPU_TARGET) -WININC=wininc +WININC=../win/wininc +WINDIR=../win UNITPREFIX=rtl @@ -114,7 +115,8 @@ messages$(PPUEXT): messages.pp $(WININC)/messages.inc system$(PPUEXT) opengl32$(PPUEXT) : opengl32.pp windows$(PPUEXT) system$(PPUEXT) -winsock$(PPUEXT) : winsock.pp windows$(PPUEXT) system$(PPUEXT) +winsock$(PPUEXT) : $(WINDIR)/winsock.pp windows$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(WINDIR)/winsock.pp winsock2$(PPUEXT) : winsock2.pp windows$(PPUEXT) system$(PPUEXT) @@ -129,7 +131,8 @@ dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT) # TP7 Compatible RTL Units # -dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) system$(PPUEXT) +dos$(PPUEXT) : $(WINDIR)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(WINDIR)/dos.pp crt$(PPUEXT) : crt.pp $(INC)/textrec.inc system$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT) @@ -140,9 +143,9 @@ objects$(PPUEXT) : $(INC)/objects.pp system$(PPUEXT) # Delphi Compatible Units # -sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \ +sysutils$(PPUEXT) : $(WINDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \ objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT) sysconst$(PPUEXT) - $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp + $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(WINDIR)/sysutils.pp classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \ sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) sysconst$(PPUEXT) @@ -158,8 +161,8 @@ math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) $(COMPILER) $(OBJPASDIR)/math.pp varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \ - $(OBJPASDIR)/varutilh.inc varutils.pp sysutils$(PPUEXT) - $(COMPILER) -Fi$(OBJPASDIR) varutils.pp + $(OBJPASDIR)/varutilh.inc $(WINDIR)/varutils.pp sysutils$(PPUEXT) + $(COMPILER) -Fi$(OBJPASDIR) $(WINDIR)/varutils.pp variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT) sysutils$(PPUEXT) sysconst$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) $(COMPILER) -Fi$(INC) $(INC)/variants.pp diff --git a/rtl/win64/Makefile b/rtl/win64/Makefile index 613f881405..6b5af3f941 100644 --- a/rtl/win64/Makefile +++ b/rtl/win64/Makefile @@ -1,5 +1,5 @@ # -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/03/19] +# Don't edit, this file is generated by FPCMake Version 2.0.0 [2006/04/02] # default: all MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-palmos arm-wince powerpc64-linux @@ -237,7 +237,8 @@ RTL=.. INC=$(RTL)/inc COMMON=$(RTL)/common PROCINC=$(RTL)/$(CPU_TARGET) -WININC=wininc +WININC=../win/wininc +WINDIR=../win UNITPREFIX=rtl ifneq ($(findstring 2.0.,$(FPC_VERSION)),) LOADERS=wprt0 wdllprt0 gprt0 wcygprt0 @@ -245,121 +246,121 @@ endif OBJPASDIR=$(RTL)/objpas WINDOWS_SOURCE_FILES=$(addprefix $(WININC)/,$(addsuffix .inc,$(WINDOWS_FILES))) ifeq ($(FULL_TARGET),i386-linux) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-win32) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-os2) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-beos) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-netware) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-emx) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-wince) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),arm-linux) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),arm-wince) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock initc cmem dynlibs signals dos crt objects messages rtlconsts sysconst sysutils math types strutils convutils dateutils varutils variants typinfo classes cpu mmx charset ucomplex getopts winevent sockets printer video mouse keyboard winsysut fpmkunit +override TARGET_UNITS+=system ctypes objpas macpas strings lineinfo heaptrc matrix windows winsock cmem dos objects rtlconsts sysconst sysutils math types strutils convutils dateutils endif ifeq ($(FULL_TARGET),i386-linux) override TARGET_LOADERS+=$(LOADERS) @@ -2108,17 +2109,18 @@ windows$(PPUEXT) : windows.pp $(WINDOWS_SOURCE_FILES) system$(PPUEXT) messages$(PPUEXT): messages.pp $(WININC)/messages.inc system$(PPUEXT) $(COMPILER) -I$(WININC) messages.pp opengl32$(PPUEXT) : opengl32.pp windows$(PPUEXT) system$(PPUEXT) -winsock$(PPUEXT) : winsock.pp windows$(PPUEXT) system$(PPUEXT) +winsock$(PPUEXT) : $(WINDIR)/winsock.pp windows$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(WINDIR)/winsock.pp sockets$(PPUEXT) : sockets.pp windows$(PPUEXT) winsock$(PPUEXT) system$(PPUEXT) \ $(INC)/sockets.inc $(INC)/socketsh.inc -initc$(PPUEXT) : initc.pp system$(PPUEXT) dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT) -dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) system$(PPUEXT) +dos$(PPUEXT) : $(WINDIR)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(WINDIR)/dos.pp crt$(PPUEXT) : crt.pp $(INC)/textrec.inc system$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT) -objects$(PPUEXT) : $(INC)/objects.pp system$(PPUEXT) -sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \ +objects$(PPUEXT) : $(INC)/objects.pp system$(PPUEXT) dos$(PPUEXT) +sysutils$(PPUEXT) : $(WINDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \ objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT) sysconst$(PPUEXT) - $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp + $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(WINDIR)/sysutils.pp classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \ sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) sysconst$(PPUEXT) $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp @@ -2129,8 +2131,8 @@ typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT) math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) $(COMPILER) $(OBJPASDIR)/math.pp varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \ - $(OBJPASDIR)/varutilh.inc varutils.pp sysutils$(PPUEXT) - $(COMPILER) -Fi$(OBJPASDIR) varutils.pp + $(OBJPASDIR)/varutilh.inc $(WINDIR)/varutils.pp sysutils$(PPUEXT) + $(COMPILER) -Fi$(OBJPASDIR) $(WINDIR)/varutils.pp variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT) sysutils$(PPUEXT) sysconst$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) $(COMPILER) -Fi$(INC) $(INC)/variants.pp types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) system$(PPUEXT) diff --git a/rtl/win64/Makefile.fpc b/rtl/win64/Makefile.fpc index c1361c1b89..8a4d28d78f 100644 --- a/rtl/win64/Makefile.fpc +++ b/rtl/win64/Makefile.fpc @@ -9,14 +9,18 @@ main=rtl loaders=$(LOADERS) units=system ctypes objpas macpas strings \ lineinfo heaptrc matrix \ - windows winsock initc cmem dynlibs signals \ - dos crt objects messages \ + windows winsock cmem \ + dos objects \ rtlconsts sysconst sysutils math types \ - strutils convutils dateutils varutils variants typinfo classes \ - cpu mmx charset ucomplex getopts \ - winevent sockets printer \ - video mouse keyboard \ - winsysut fpmkunit + strutils convutils dateutils +# varutils variants typinfo classes \ +# cpu mmx charset ucomplex getopts \ +# winevent sockets printer \ +# video mouse keyboard \ +# winsysut fpmkunit +# dynlibs signals crt messages \ +# no cygwin so far +# initc rsts=math varutils typinfo variants classes dateutils sysconst fpmkunit @@ -40,7 +44,8 @@ RTL=.. INC=$(RTL)/inc COMMON=$(RTL)/common PROCINC=$(RTL)/$(CPU_TARGET) -WININC=wininc +WININC=../win/wininc +WINDIR=../win UNITPREFIX=rtl @@ -114,12 +119,13 @@ messages$(PPUEXT): messages.pp $(WININC)/messages.inc system$(PPUEXT) opengl32$(PPUEXT) : opengl32.pp windows$(PPUEXT) system$(PPUEXT) -winsock$(PPUEXT) : winsock.pp windows$(PPUEXT) system$(PPUEXT) +winsock$(PPUEXT) : $(WINDIR)/winsock.pp windows$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(WINDIR)/winsock.pp sockets$(PPUEXT) : sockets.pp windows$(PPUEXT) winsock$(PPUEXT) system$(PPUEXT) \ $(INC)/sockets.inc $(INC)/socketsh.inc -initc$(PPUEXT) : initc.pp system$(PPUEXT) +# initc$(PPUEXT) : initc.pp system$(PPUEXT) dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT) @@ -127,20 +133,21 @@ dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT) # TP7 Compatible RTL Units # -dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) system$(PPUEXT) +dos$(PPUEXT) : $(WINDIR)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) system$(PPUEXT) + $(COMPILER) $(WINDIR)/dos.pp crt$(PPUEXT) : crt.pp $(INC)/textrec.inc system$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT) -objects$(PPUEXT) : $(INC)/objects.pp system$(PPUEXT) +objects$(PPUEXT) : $(INC)/objects.pp system$(PPUEXT) dos$(PPUEXT) # # Delphi Compatible Units # -sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \ +sysutils$(PPUEXT) : $(WINDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \ objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT) sysconst$(PPUEXT) - $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp + $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(WINDIR)/sysutils.pp classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \ sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) sysconst$(PPUEXT) @@ -156,8 +163,8 @@ math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) $(COMPILER) $(OBJPASDIR)/math.pp varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \ - $(OBJPASDIR)/varutilh.inc varutils.pp sysutils$(PPUEXT) - $(COMPILER) -Fi$(OBJPASDIR) varutils.pp + $(OBJPASDIR)/varutilh.inc $(WINDIR)/varutils.pp sysutils$(PPUEXT) + $(COMPILER) -Fi$(OBJPASDIR) $(WINDIR)/varutils.pp variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT) sysutils$(PPUEXT) sysconst$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) $(COMPILER) -Fi$(INC) $(INC)/variants.pp diff --git a/rtl/win64/windows.pp b/rtl/win64/windows.pp new file mode 100644 index 0000000000..86c65a3d1a --- /dev/null +++ b/rtl/win64/windows.pp @@ -0,0 +1,65 @@ +{ + This file is part of the Free Pascal run time library. + This unit contains the record definition for the Win64 API + Copyright (c) 1999-2006 by Florian KLaempfl, + member of the Free Pascal development team. + + 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. + + **********************************************************************} +unit windows; + +{$ifndef NO_SMART_LINK} +{$smartlink on} +{$endif} + +{ stuff like array of const is used } +{$mode objfpc} +{$calling stdcall} + +interface + +{$define read_interface} +{$undef read_implementation} + +{$i base.inc} +{$i errors.inc} +{$i defines.inc} +{$i struct.inc} +{$i messages.inc} +{$i ascfun.inc} +{$i unifun.inc} +{$ifdef UNICODE} +{$i unidef.inc} +{$else not UNICODE} +{$i ascdef.inc} +{$endif UNICODE} +{$i func.inc} +{$i redef.inc} + +implementation + +{$undef read_interface} +{$define read_implementation} + +{$i base.inc} +{$i errors.inc} +{$i defines.inc} +{$i struct.inc} +{$i messages.inc} +{$i ascfun.inc} +{$i unifun.inc} +{$ifdef UNICODE} +{$i unidef.inc} +{$else not UNICODE} +{$i ascdef.inc} +{$endif UNICODE} +{$i func.inc} +{$i redef.inc} + +end. diff --git a/rtl/x86_64/math.inc b/rtl/x86_64/math.inc index be7a2fc2fd..0b918fe250 100644 --- a/rtl/x86_64/math.inc +++ b/rtl/x86_64/math.inc @@ -36,7 +36,6 @@ FPC_ABSMASK_DOUBLE: FPU Control word ****************************************************************************} -{$ifndef WIN64} procedure Set8087CW(cw:word);assembler; asm movw cw,%ax @@ -58,7 +57,6 @@ FPC_ABSMASK_DOUBLE: fnstcw (%rsp) popq %rax end; -{$endif WIN64} {**************************************************************************** EXTENDED data type routines diff --git a/rtl/x86_64/mathu.inc b/rtl/x86_64/mathu.inc index 091d9b4c24..39bfb99fa5 100644 --- a/rtl/x86_64/mathu.inc +++ b/rtl/x86_64/mathu.inc @@ -12,6 +12,7 @@ **********************************************************************} +{$ifndef WIN64} {$define FPC_MATH_HAS_ARCTAN2} function arctan2(y,x : float) : float;assembler; asm @@ -20,7 +21,7 @@ function arctan2(y,x : float) : float;assembler; fpatan fwait end; - +{$endif WIN64} procedure SetSSECSR(w : dword); var