* win64 compile fixes

git-svn-id: trunk@3296 -
This commit is contained in:
peter 2006-04-20 11:16:46 +00:00
parent cf0c78e7af
commit b36e38ead1
38 changed files with 111 additions and 110 deletions

20
.gitattributes vendored
View File

@ -1015,17 +1015,17 @@ fcl/unix/process.inc svneol=native#text/plain
fcl/unix/resolve.inc svneol=native#text/plain
fcl/unix/simpleipc.inc svneol=native#text/plain
fcl/win/eventlog.inc svneol=native#text/plain
fcl/win/fclel.mc -text
fcl/win/fclel.rc -text
fcl/win/fclel.res -text
fcl/win/fileinfo.pp svneol=native#text/plain
fcl/win/httpapp.pp svneol=native#text/plain
fcl/win/pipes.inc svneol=native#text/plain
fcl/win32/fclel.mc -text
fcl/win32/fclel.rc -text
fcl/win32/fclel.res -text
fcl/win32/fileinfo.pp svneol=native#text/plain
fcl/win32/httpapp.pp svneol=native#text/plain
fcl/win32/process.inc svneol=native#text/plain
fcl/win32/resolve.inc svneol=native#text/plain
fcl/win32/simpleipc.inc svneol=native#text/plain
fcl/win32/syncobjs.pp svneol=native#text/plain
fcl/win32/winreg.inc svneol=native#text/plain
fcl/win/process.inc svneol=native#text/plain
fcl/win/resolve.inc svneol=native#text/plain
fcl/win/simpleipc.inc svneol=native#text/plain
fcl/win/syncobjs.pp svneol=native#text/plain
fcl/win/winreg.inc svneol=native#text/plain
fcl/wince/eventlog.inc svneol=native#text/plain
fcl/wince/fileinfo.pp svneol=native#text/plain
fcl/wince/pipes.inc svneol=native#text/plain

7
.gitignore vendored
View File

@ -417,13 +417,6 @@ fcl/unix/*.ppu
fcl/unix/*.s
fcl/unix/fpcmade.*
fcl/unix/units
fcl/win32/*.bak
fcl/win32/*.exe
fcl/win32/*.o
fcl/win32/*.ppu
fcl/win32/*.s
fcl/win32/fpcmade.*
fcl/win32/units
fcl/xml/*.bak
fcl/xml/*.exe
fcl/xml/*.o

View File

@ -452,7 +452,7 @@ ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_UNITS+=contnrs inifiles ezcgi pipes rtfpars idea base64 gettext iostream zstream cachecls avl_tree xmlreg registry eventlog custapp cgiapp wformat whtml wtex rttiutils bufstream streamex process ssockets resolve fpasync syncobjs simpleipc dbugmsg dbugintf
endif
ifeq ($(FULL_TARGET),x86_64-win64)
override TARGET_UNITS+=contnrs inifiles ezcgi pipes rtfpars idea base64 gettext iostream zstream cachecls avl_tree xmlreg registry eventlog custapp cgiapp wformat whtml wtex rttiutils bufstream streamex
override TARGET_UNITS+=contnrs inifiles ezcgi pipes rtfpars idea base64 gettext iostream zstream cachecls avl_tree xmlreg registry eventlog custapp cgiapp wformat whtml wtex rttiutils bufstream streamex process fileinfo resolve ssockets syncobjs simpleipc dbugmsg dbugintf
endif
ifeq ($(FULL_TARGET),arm-linux)
override TARGET_UNITS+=contnrs inifiles ezcgi pipes rtfpars idea base64 gettext iostream zstream cachecls avl_tree xmlreg registry eventlog custapp cgiapp wformat whtml wtex rttiutils bufstream streamex process resolve ssockets fpasync syncobjs simpleipc dbugmsg dbugintf
@ -2315,8 +2315,8 @@ ifeq ($(FULL_TARGET),x86_64-win64)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_PASJPEG=1
REQUIRE_PACKAGES_NETDB=1
REQUIRE_PACKAGES_PASJPEG=1
endif
ifeq ($(FULL_TARGET),arm-linux)
REQUIRE_PACKAGES_RTL=1

View File

@ -15,6 +15,7 @@ packages_solaris=netdb libasync pthreads
packages_netbsd=netdb libasync
packages_openbsd=netdb libasync
packages_win32=netdb
packages_win64=netdb
packages_wince=netdb
packages_os2=netdb
packages_emx=netdb
@ -35,6 +36,7 @@ units_netbsd=process ssockets resolve fpasync simpleipc dbugmsg dbugintf
units_openbsd=process ssockets resolve fpasync simpleipc dbugmsg dbugintf
units_linux=process resolve ssockets fpasync syncobjs simpleipc dbugmsg dbugintf
units_win32=process fileinfo resolve ssockets syncobjs simpleipc dbugmsg dbugintf
units_win64=process fileinfo resolve ssockets syncobjs simpleipc dbugmsg dbugintf
units_wince=process fileinfo resolve ssockets syncobjs simpleipc dbugmsg dbugintf
units_os2=resolve ssockets
units_emx=resolve ssockets

View File

@ -69,7 +69,7 @@ begin
Result:=0;
If (Message=WM_COPYDATA) then
begin
I:=TWinMsgServerComm(GetWindowLong(HWindow,GWL_USERDATA));
I:=TWinMsgServerComm(GetWindowLongPtr(HWindow,GWL_USERDATA));
If (I<>NIl) then
begin
Msg.Message:=Message;
@ -105,7 +105,7 @@ begin
PChar(aWindowName), WS_POPUP {!0}, 0, 0, 0, 0, 0, 0, HInstance, nil);
if (Result=0) then
Owner.DoError(SErrFailedToCreateWindow,[aWindowName]);
SetWindowLong(Result,GWL_USERDATA,Longint(Self));
SetWindowLongPtr(Result,GWL_USERDATA,PtrInt(Self));
end;
constructor TWinMsgServerComm.Create(AOWner: TSimpleIPCServer);

View File

@ -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/18]
#
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
@ -333,7 +333,7 @@ ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb gdbint libasync graph mysql ibase postgres oracle odbc sqlite pthreads
endif
ifeq ($(FULL_TARGET),x86_64-win64)
override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb
override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb mysql ibase odbc sqlite postgres oracle
endif
ifeq ($(FULL_TARGET),arm-linux)
override TARGET_DIRS+=hash paszlib pasjpeg regexpr netdb gdbint libasync mysql ibase postgres oracle odbc pthreads sqlite graph
@ -1815,6 +1815,12 @@ TARGET_DIRS_PASZLIB=1
TARGET_DIRS_PASJPEG=1
TARGET_DIRS_REGEXPR=1
TARGET_DIRS_NETDB=1
TARGET_DIRS_MYSQL=1
TARGET_DIRS_IBASE=1
TARGET_DIRS_ODBC=1
TARGET_DIRS_SQLITE=1
TARGET_DIRS_POSTGRES=1
TARGET_DIRS_ORACLE=1
endif
ifeq ($(FULL_TARGET),arm-linux)
TARGET_DIRS_HASH=1

View File

@ -9,6 +9,7 @@ dirs_x86_64_linux=libc
dirs_linux=gdbint libasync mysql ibase postgres oracle odbc \
pthreads sqlite graph
dirs_win32=gdbint mysql ibase odbc sqlite postgres oracle graph
dirs_win64=mysql ibase odbc sqlite postgres oracle
dirs_wince=ibase sqlite postgres
dirs_go32v2=gdbint graph
dirs_netbsd=gdbint libasync \

View File

@ -4,7 +4,7 @@
{$ELSEIF defined(BASEPACKAGES)}
Directory:='ibase';
{$ENDIF}
OS:=[linux,win32,netbsd,openbsd,freebsd,darwin];
OS:=[linux,win32,win64,netbsd,openbsd,freebsd,darwin];
T:=Targets.AddUnit('ibase40');
T:=Targets.AddUnit('ibase60');
T:=Targets.AddUnit('ibase60dyn');

View File

@ -21,7 +21,7 @@ Var
fbclib = 'libfbclient.so';
fbembedlib = 'libfbembed.so';
{$ENDIF}
{$IFDEF Win32}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
const
gdslib = 'gds32.dll';

View File

@ -4,7 +4,7 @@
{$ELSEIF defined(BASEPACKAGES)}
Directory:='mysql';
{$ENDIF}
OS:=[linux,win32,netbsd,openbsd,freebsd,darwin];
OS:=[linux,win32,win64,netbsd,openbsd,freebsd,darwin];
T:=Targets.AddUnit('mysql4_com');
T:=Targets.AddUnit('mysql4_version');
T:=Targets.AddUnit('mysql4');

View File

@ -32,7 +32,7 @@ uses
const
mysqllib = 'libmysqlclient.so';
{$ENDIF}
{$IFDEF Win32}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
const
mysqllib = 'libmysql.dll';

View File

@ -27,13 +27,13 @@ uses mysql3_com, mysql3_version;
const
Mysqllib = 'mysqlclient';
{$ENDIF}
{$IFDEF Win32}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
const
Mysqllib = 'libmysql';
{$ENDIF}
{$ifndef win32}
{$ifndef Windows}
{$linklib c}
{$linklib m}
{$linklib mysqlclient}

View File

@ -19,11 +19,11 @@ uses
{$IFDEF Unix}
{$DEFINE extdecl:=cdecl}
{$ENDIF}
{$IFDEF Win32}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
{$ENDIF}
{$ifndef win32}
{$ifndef Windows}
{$linklib c}
{$linklib m}
{$linklib mysqlclient}

View File

@ -22,7 +22,7 @@ uses dynlibs, sysutils;
const
Mysqllib = 'libmysqlclient.so';
{$ENDIF}
{$IFDEF Win32}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
const
Mysqllib = 'libmysql.dll';

View File

@ -8,9 +8,7 @@
{ Extra types introduced for pascal }
Type
pbyte = ^byte;
pcardinal = ^cardinal;
Socket = longint;
Socket = ptrint;
my_bool = byte;
Const

View File

@ -22,7 +22,7 @@ uses dynlibs, classes, sysutils, mysql3_comdyn;
const
Mysqllib = 'libmysqlclient.so';
{$ENDIF}
{$IFDEF Win32}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
const
Mysqllib = 'libmysql.dll';

View File

@ -39,21 +39,12 @@ uses ctypes,my4_sys,mysql4_com;
const
External_library = 'libmysqlclient.so';
{$ENDIF}
{$IFDEF Win32}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
const
External_library = 'libmysql.dll';
{$ENDIF}
{ Pointers to basic pascal types, inserted by h2pas conversion program.}
{ Type
PLongint = ^Longint;
PSmallInt = ^SmallInt;
PByte = ^Byte;
PWord = ^Word;
PDWord = ^DWord;
PDouble = ^Double;}
{$i mysql4types.inc}
function mysql_server_init(argc:longint; argv:PPchar; groups:PPchar):longint;extdecl;external External_library name 'mysql_server_init';

View File

@ -13,7 +13,7 @@ uses
const
External_library = 'libmysqlclient.so';
{$ENDIF}
{$IFDEF Win32}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
const
External_library = 'libmysql.dll';

View File

@ -18,7 +18,7 @@ uses ctypes,my4_sys,dynlibs, sysutils;
const
Mysqllib = 'libmysqlclient.so';
{$ENDIF}
{$IFDEF Win32}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
const
Mysqllib = 'libmysql.dll';

View File

@ -47,7 +47,7 @@ uses ctypes,dynlibs, classes, sysutils, my4_sys, mysql4_comdyn;
const
Mysqllib = 'libmysqlclient.so';
{$ENDIF}
{$IFDEF Win32}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
const
Mysqllib = 'libmysql.dll';

View File

@ -22,7 +22,7 @@ uses
const
odbclib = 'libodbc.so';
{$ENDIF}
{$IFDEF Win32}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
const
odbclib = 'odbc32.dll';

View File

@ -25,12 +25,7 @@ uses ctypes,
const
ocilib = 'libociei.so';
{$ENDIF}
{$IFDEF Win32}
{$DEFINE extdecl:=stdcall}
const
ocilib = 'oci.dll';
{$ENDIF}
{$IFDEF Wince}
{$IFDEF Windows}
{$DEFINE extdecl:=stdcall}
const
ocilib = 'oci.dll';

View File

@ -18,11 +18,7 @@ uses
const
pqlib = 'libpq.so';
{$ENDIF}
{$IFDEF Win32}
const
pqlib = 'libpq.dll';
{$ENDIF}
{$IFDEF Wince}
{$IFDEF Windows}
const
pqlib = 'libpq.dll';
{$ENDIF}

View File

@ -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/18]
#
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
@ -311,6 +311,9 @@ endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_DIRS+=unzip zlib fftw x11 opengl gtk gtk2 syslog forms svgalib ggi libpng libgd utmp bfd gdbm ncurses fpgtk tcl imlib gnome1
endif
ifeq ($(FULL_TARGET),x86_64-win64)
override TARGET_DIRS+=unzip opengl gtk gtk2 zlib tcl cdrom fpgtk winunits fftw
endif
ifeq ($(FULL_TARGET),arm-linux)
override TARGET_DIRS+=unzip zlib fftw x11 opengl gtk gtk2 syslog forms svgalib ggi libpng libgd utmp bfd gdbm ncurses tcl cdrom imlib gnome1 fpgtk unixutil newt uuid
endif
@ -1859,6 +1862,18 @@ TARGET_DIRS_TCL=1
TARGET_DIRS_IMLIB=1
TARGET_DIRS_GNOME1=1
endif
ifeq ($(FULL_TARGET),x86_64-win64)
TARGET_DIRS_UNZIP=1
TARGET_DIRS_OPENGL=1
TARGET_DIRS_GTK=1
TARGET_DIRS_GTK2=1
TARGET_DIRS_ZLIB=1
TARGET_DIRS_TCL=1
TARGET_DIRS_CDROM=1
TARGET_DIRS_FPGTK=1
TARGET_DIRS_WINUNITS=1
TARGET_DIRS_FFTW=1
endif
ifeq ($(FULL_TARGET),arm-linux)
TARGET_DIRS_UNZIP=1
TARGET_DIRS_ZLIB=1

View File

@ -20,6 +20,7 @@ dirs_openbsd=unzip zlib \
forms svgalib ggi libpng libgd \
utmp bfd gdbm ncurses fpgtk tcl imlib gnome1
dirs_win32=unzip opengl gtk gtk2 zlib tcl cdrom fpgtk winunits fftw
dirs_win64=unzip opengl gtk gtk2 zlib tcl cdrom fpgtk winunits fftw
dirs_wince=unzip zlib tcl fftw
dirs_os2=os2units \
rexx \

View File

@ -440,7 +440,7 @@ type
LPCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG;
{$EXTERNALSYM LPCRITICAL_SECTION_DEBUG}
TCriticalSectionDebug = CRITICAL_SECTION_DEBUG;
PCriticalSectionDebug = PCRITICAL_SECTION_DEBUG;
PCriticalSectionDebug = PCRITICAL_SECTION_DEBUG;
LPLDT_ENTRY = PLDT_ENTRY;
{$EXTERNALSYM LPLDT_ENTRY}
@ -5930,7 +5930,7 @@ type
{$EXTERNALSYM PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA}
TActCtxSectionKeyedDataAssemblyMetadata = ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
PActCtxSectionKeyedDataAssemblyMetadata = PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA;
tagACTCTX_SECTION_KEYED_DATA = record
cbSize: ULONG;
ulDataFormatVersion: ULONG;
@ -6031,7 +6031,7 @@ const
//
// String are placed after the structs.
//
function QueryActCtxW(dwFlags: DWORD; hActCtx: HANDLE; pvSubInstance: PVOID;
ulInfoClass: ULONG; pvBuffer: PVOID; cbBuffer: SIZE_T;
pcbWrittenOrRequired: PSIZE_T): BOOL; stdcall;
@ -6144,12 +6144,20 @@ end;
function InterlockedExchangePointer(var Target: PVOID; Value: PVOID): PVOID;
begin
{$ifdef cpu64}
Result := PVOID(InterlockedExchange64(LONGLONG(Target), LONGLONG(Value)));
{$else}
Result := PVOID(InterlockedExchange(LONG(Target), LONG(Value)));
{$endif cpu64}
end;
function InterlockedCompareExchangePointer(var Destination: PVOID; Exchange, Comperand: PVOID): PVOID;
begin
{$ifdef cpu64}
Result := PVOID(InterlockedCompareExchange64(LONGLONG(Destination), LONGLONG(Exchange), LONGLONG(Comperand)));
{$else cpu64}
Result := PVOID(InterlockedCompareExchange(LONG(Destination), LONG(Exchange), LONG(Comperand)));
{$endif cpu64}
end;
function UnlockResource(hResData: HANDLE): BOOL;

View File

@ -622,11 +622,13 @@ type
// writers to not leave them inadvertantly in their code.
//
{$ifdef cpui386}
function GetFiberData: PVOID;
{$EXTERNALSYM GetFiberData}
function GetCurrentFiber: PVOID;
{$EXTERNALSYM GetCurrentFiber}
{$endif cpui386}
//
// Define the size of the 80387 save area, which is in the context frame.
@ -709,7 +711,7 @@ type
type
PContext = ^CONTEXT;
_CONTEXT = record
{$ifdef cpui386}
//
// The flags values within this flag control the contents of
// a CONTEXT record.
@ -791,6 +793,7 @@ type
//
ExtendedRegisters: array [0..MAXIMUM_SUPPORTED_EXTENSION - 1] of BYTE;
{$endif cpui386}
end;
{$EXTERNALSYM _CONTEXT}
CONTEXT = _CONTEXT;
@ -950,7 +953,7 @@ type
PACCESS_MASK = ^ACCESS_MASK;
{$EXTERNALSYM PACCESS_MASK}
TAccessMask = ACCESS_MASK;
PAccessMask = PACCESS_MASK;
PAccessMask = PACCESS_MASK;
////////////////////////////////////////////////////////////////////////
// //
@ -1907,7 +1910,7 @@ type
PACCESS_ALLOWED_CALLBACK_ACE = ^ACCESS_ALLOWED_CALLBACK_ACE;
{$EXTERNALSYM PACCESS_ALLOWED_CALLBACK_ACE}
TAccessAllowedCallBackAce = ACCESS_ALLOWED_CALLBACK_ACE;
PAccessAllowedCallBackAce = PACCESS_ALLOWED_CALLBACK_ACE;
PAccessAllowedCallBackAce = PACCESS_ALLOWED_CALLBACK_ACE;
_ACCESS_DENIED_CALLBACK_ACE = record
Header: ACE_HEADER;
@ -2806,7 +2809,7 @@ type
PTOKEN_ORIGIN = ^TOKEN_ORIGIN;
{$EXTERNALSYM PTOKEN_ORIGIN}
TTokenOrigin = TOKEN_ORIGIN;
PTokenOrigin = PTOKEN_ORIGIN;
PTokenOrigin = PTOKEN_ORIGIN;
//
// Security Tracking Mode
@ -2872,7 +2875,7 @@ type
PSECURITY_INFORMATION = ^SECURITY_INFORMATION;
{$EXTERNALSYM PSECURITY_INFORMATION}
TSecurityInformation = SECURITY_INFORMATION;
PSecurityInformation = PSECURITY_INFORMATION;
PSecurityInformation = PSECURITY_INFORMATION;
const
OWNER_SECURITY_INFORMATION = $00000001;
@ -3109,8 +3112,10 @@ type
// Define function to return the current Thread Environment Block
//
{$ifdef cpui386}
function NtCurrentTeb: PNT_TIB;
{$EXTERNALSYM NtCurrentTeb}
{$endif cpui386}
const
THREAD_BASE_PRIORITY_LOWRT = 15; // value that gets a thread to LowRealtime-1
@ -3170,7 +3175,7 @@ type
PQUOTA_LIMITS_EX = ^QUOTA_LIMITS_EX;
{$EXTERNALSYM PQUOTA_LIMITS_EX}
TQuotaLimitsEx = QUOTA_LIMITS_EX;
PQuotaLimitsEx = PQUOTA_LIMITS_EX;
PQuotaLimitsEx = PQUOTA_LIMITS_EX;
PIO_COUNTERS = ^IO_COUNTERS;
{$EXTERNALSYM PIO_COUNTERS}
@ -3324,7 +3329,7 @@ type
PJOBOBJECT_JOBSET_INFORMATION = ^JOBOBJECT_JOBSET_INFORMATION;
{$EXTERNALSYM PJOBOBJECT_JOBSET_INFORMATION}
TJobObjectSetInformation = JOBOBJECT_JOBSET_INFORMATION;
PJobObjectSetInformation = PJOBOBJECT_JOBSET_INFORMATION;
PJobObjectSetInformation = PJOBOBJECT_JOBSET_INFORMATION;
const
JOB_OBJECT_TERMINATE_AT_END_OF_JOB = 0;
@ -3536,7 +3541,7 @@ type
{$EXTERNALSYM SYSTEM_LOGICAL_PROCESSOR_INFORMATION}
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION = ^SYSTEM_LOGICAL_PROCESSOR_INFORMATION;
TSystemLogicalProcessorInformation = SYSTEM_LOGICAL_PROCESSOR_INFORMATION;
PSystemLogicalProcessorInformation = PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
PSystemLogicalProcessorInformation = PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
const
PROCESSOR_INTEL_386 = 386;
@ -5146,7 +5151,7 @@ type
function IMAGE_FIRST_SECTION(NtHeader: PImageNtHeaders): PImageSectionHeader;
{$EXTERNALSYM IMAGE_FIRST_SECTION}
const
IMAGE_SIZEOF_SECTION_HEADER = 40;
{$EXTERNALSYM IMAGE_SIZEOF_SECTION_HEADER}
@ -7156,7 +7161,7 @@ type
PSLIST_ENTRY = PSINGLE_LIST_ENTRY;
{$EXTERNALSYM PSLIST_ENTRY}
TSListEntry = SLIST_ENTRY;
PSListEntry = PSLIST_ENTRY;
PSListEntry = PSLIST_ENTRY;
type
_SLIST_HEADER = record
@ -7174,7 +7179,7 @@ type
PSLIST_HEADER = ^SLIST_HEADER;
{$EXTERNALSYM PSLIST_HEADER}
TSListHeader = SLIST_HEADER;
PSListHeader = PSLIST_HEADER;
PSListHeader = PSLIST_HEADER;
procedure RtlInitializeSListHead(ListHead: PSLIST_HEADER); stdcall;
{$EXTERNALSYM RtlInitializeSListHead}
@ -7637,8 +7642,8 @@ type
//
// Filled by verifier provider DLL
//
//
ProviderNtdllHeapFreeCallback: RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK;
end;
{$EXTERNALSYM _RTL_VERIFIER_PROVIDER_DESCRIPTOR}
@ -8978,6 +8983,7 @@ begin
// ( sizeof(TOKEN_AUDIT_POLICY) + (((C) > ANYSIZE_ARRAY) ? (sizeof(TOKEN_AUDIT_POLICY_ELEMENT) * ((C) - ANYSIZE_ARRAY)) : 0) )
end;
{$ifdef cpui386}
function NtCurrentTeb: PNT_TIB;
asm
MOV EAX, FS:[0]
@ -8993,6 +8999,7 @@ function GetCurrentFiber: PVOID;
asm
MOV EAX, FS:[$10]
end;
{$endif cpui386}
function Int32x32To64(a, b: LONG): LONGLONG;
begin

View File

@ -608,7 +608,7 @@ type
end;
{$EXTERNALSYM _LUID}
LUID = _LUID;
{$EXTERNALSYM LUID}
{$EXTERNALSYM LUID}
TLuid = LUID;
DWORDLONG = ULONGLONG;
@ -644,8 +644,10 @@ function UInt32x32To64(a, b: DWORD): ULONGLONG;
function Int64ShllMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
{$ifdef cpui386}
{$EXTERNALSYM Int64ShllMod32}
function Int64ShraMod32(Value: LONGLONG; ShiftCount: DWORD): LONGLONG;
{$endif cpui386}
{$EXTERNALSYM Int64ShraMod32}
function Int64ShrlMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
{$EXTERNALSYM Int64ShrlMod32}
@ -822,7 +824,7 @@ type
//
PLIST_ENTRY32 = ^LIST_ENTRY32;
{$EXTERNALSYM PLIST_ENTRY32}
{$EXTERNALSYM PLIST_ENTRY32}
{$EXTERNALSYM PLIST_ENTRY32}
LIST_ENTRY32 = record
Flink: DWORD;
@ -1323,7 +1325,7 @@ type
HWINEVENTHOOK = HANDLE;
{$EXTERNALSYM HWINEVENTHOOK}
HUMPD = HANDLE;
{$EXTERNALSYM HUMPD}
{$EXTERNALSYM HUMPD}
HFILE = {$IFDEF USE_DELPHI_TYPES} Windows.HFILE {$ELSE} Longword {$ENDIF};
{$EXTERNALSYM HFILE}
@ -1679,14 +1681,11 @@ begin
end;
function Int64ShllMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
asm
MOV ECX, ShiftCount
MOV EAX, DWORD PTR [Value]
MOV EDX, DWORD PTR [Value + 4]
SHLD EDX, EAX, CL
SHL EAX, CL
begin
Result:=Value shl Shiftcount;
end;
{$ifdef cpui386}
function Int64ShraMod32(Value: LONGLONG; ShiftCount: DWORD): LONGLONG;
asm
MOV ECX, ShiftCount
@ -1695,14 +1694,11 @@ asm
SHRD EAX, EDX, CL
SAR EDX, CL
end;
{$endif cpui386}
function Int64ShrlMod32(Value: ULONGLONG; ShiftCount: DWORD): ULONGLONG;
asm
MOV ECX, ShiftCount
MOV EAX, DWORD PTR [Value]
MOV EDX, DWORD PTR [Value + 4]
SHRD EAX, EDX, CL
SHR EDX, CL
begin
Result:=Value shr Shiftcount;
end;
procedure ListEntry32To64(l32: PLIST_ENTRY32; l64: PLIST_ENTRY64);

View File

@ -16,18 +16,10 @@ unit types;
interface
{$ifdef Win32}
{$define Win32orCE}
{$endif Win32}
{$ifdef Wince}
{$define Win32orCE}
{$endif Wince}
{$ifdef Win32orCE}
{$ifdef Windows}
uses
Windows;
{$endif Win32orCE}
{$endif Windows}
const
RT_RCDATA = PChar(10);
@ -55,7 +47,7 @@ type
TStringDynArray = array of AnsiString;
TWideStringDynArray = array of WideString;
{$ifdef Win32orCE}
{$ifdef Windows}
TPoint = Windows.TPoint;
{$else}
TPoint =
@ -70,7 +62,7 @@ type
PPoint = ^TPoint;
tagPOINT = TPoint;
{$ifdef Win32orCE}
{$ifdef Windows}
TRect = Windows.TRect;
{$else}
TRect =
@ -82,10 +74,10 @@ type
0: (Left,Top,Right,Bottom : Longint);
1: (TopLeft,BottomRight : TPoint);
end;
{$endif Win32orCE}
{$endif Windows}
PRect = ^TRect;
{$ifdef Win32orCE}
{$ifdef Windows}
TSize = Windows.TSize;
{$else}
TSize =
@ -96,7 +88,7 @@ type
cx : Longint;
cy : Longint;
end;
{$endif Win32orCE}
{$endif Windows}
PSize = ^TSize;
tagSIZE = TSize;
SIZE = TSize;
@ -117,7 +109,7 @@ type
POleStr = PWideChar;
PPOleStr = ^POleStr;
{$ifndef win32orCE}
{$ifndef Windows}
const
STGTY_STORAGE = 1;
@ -259,7 +251,7 @@ type
Function Stat(out statstg : TStatStg;grfStatFlag : Longint) : HRESULT;stdcall;
function Clone(out stm : IStream) : HRESULT;stdcall;
end;
{$endif win32orCE}
{$endif Windows}
function EqualRect(const r1,r2 : TRect) : Boolean;
function Rect(Left,Top,Right,Bottom : Integer) : TRect;