mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 00:09:25 +02:00
* First try to support 64-bit cpu's
git-svn-id: trunk@16466 -
This commit is contained in:
parent
f15141a6f3
commit
cf9a7cda1c
@ -1072,10 +1072,10 @@ begin
|
||||
keyshift:=KeyBoard.GetKeyEventShiftState(key);
|
||||
// some kbds still honour old XT E0 prefix. (org IBM ps/2, win98?) bug #8978
|
||||
if (keycode and $FF = $E0) and
|
||||
(byte(keycode shr 8) in
|
||||
(byte(keycode shr 8) in
|
||||
[$1C,$1D,$2A,$35..$38,$46..$49,$4b,$4d,$4f,$50..$53]) Then
|
||||
keycode := keycode and $FF00;
|
||||
|
||||
|
||||
{ fixup shift-keys }
|
||||
if keyshift and kbShift<>0 then
|
||||
begin
|
||||
@ -1341,10 +1341,10 @@ begin
|
||||
exit;
|
||||
GetVideoMode(StartupScreenMode);
|
||||
GetVideoMode(ScreenMode);
|
||||
{$ifdef win32}
|
||||
{$ifdef OS_WINDOWS}
|
||||
{ Force the console to the current screen mode }
|
||||
Video.SetVideoMode(ScreenMode);
|
||||
{$endif win32}
|
||||
{$endif OS_WINDOWS}
|
||||
|
||||
If (StoreScreenMode.Col<>0) and
|
||||
((StoreScreenMode.color<>ScreenMode.color) or
|
||||
@ -1587,7 +1587,7 @@ BEGIN
|
||||
DetectVideo; { Detect video }
|
||||
{ InitKeyboard;}
|
||||
InitSystemMsg;
|
||||
{$ifdef win32}
|
||||
{$ifdef OS_WINDOWS}
|
||||
SetFileApisToOEM;
|
||||
{$endif}
|
||||
|
||||
|
@ -61,7 +61,7 @@ UNIT FVCommon;
|
||||
{$I platform.inc}
|
||||
{====================================================================}
|
||||
|
||||
{$ifdef win32}
|
||||
{$ifdef OS_WINDOWS}
|
||||
uses
|
||||
Windows;
|
||||
{$endif}
|
||||
@ -99,7 +99,7 @@ CONST
|
||||
{$IFDEF BIT_16} { 16 BIT DEFINITION }
|
||||
MaxBytes = 65520; { Maximum data size }
|
||||
{$ENDIF}
|
||||
{$IFDEF BIT_32} { 32 BIT DEFINITION }
|
||||
{$IFDEF BIT_32_OR_MORE} { 32 BIT DEFINITION }
|
||||
MaxBytes = 128*1024*1024; { Maximum data size }
|
||||
{$ENDIF}
|
||||
MaxWords = MaxBytes DIV SizeOf(Word); { Max words }
|
||||
@ -117,7 +117,7 @@ CONST
|
||||
{ CPU TYPE DEFINITIONS }
|
||||
{---------------------------------------------------------------------------}
|
||||
TYPE
|
||||
{$IFDEF BIT_32} { 32 BIT CODE }
|
||||
{$IFDEF BIT_32_OR_MORE} { 32 BIT CODE }
|
||||
CPUWord = Longint; { CPUWord is 32 bit }
|
||||
CPUInt = Longint; { CPUInt is 32 bit }
|
||||
{$ELSE} { 16 BIT CODE }
|
||||
@ -133,7 +133,7 @@ TYPE
|
||||
Sw_Word = Word; { Standard word }
|
||||
Sw_Integer = Integer; { Standard integer }
|
||||
{$ENDIF}
|
||||
{$IFDEF BIT_32} { 32 BIT DEFINITIONS }
|
||||
{$IFDEF BIT_32_OR_MORE} { 32 BIT DEFINITIONS }
|
||||
Sw_Word = Cardinal; { Long integer now }
|
||||
Sw_Integer = LongInt; { Long integer now }
|
||||
{$ENDIF}
|
||||
|
@ -31,9 +31,12 @@
|
||||
{ - Virtual Pascal 2.0+ (32 Bit) }
|
||||
{ - Speedsoft Sybil 2.0+ (32 Bit) }
|
||||
{ - FPC 0.9912+ (32 Bit) }
|
||||
{ WIN64 - FPC 2.4.3 (64 Bit) }
|
||||
{ OS2 - Virtual Pascal 1.0+ (32 Bit) }
|
||||
{ - C'T patch to BP (16 Bit) }
|
||||
{ LINUX - FPC 0.9912+ (32 Bit) }
|
||||
{ LINUX - FPC 2.4.3 (64 Bit) }
|
||||
{ LINUX - FPC 2.4.3 (64 Bit) }
|
||||
{ }
|
||||
{******************[ REVISION HISTORY ]********************}
|
||||
{ Version Date Who Fix }
|
||||
@ -55,6 +58,7 @@
|
||||
{ 1.32 04 Nov 99 LdB Delphi 5 definitions added }
|
||||
{ 1.33 16 Oct 00 LdB WIN32/WIN16 defines added }
|
||||
{ 1.34 02 May 02 MvdV FreeBSD, NetBSD, OS_UNIX }
|
||||
{ 1.35 28 Nov 10 PM 64 bit OS Linux, Win64, FreeBSD }
|
||||
{**********************************************************}
|
||||
|
||||
{ ****************************************************************************
|
||||
@ -84,9 +88,11 @@
|
||||
FPC PPC_FPC PROC_Protected BIT_32 ASM_FPC
|
||||
|
||||
LINUX OS_LINUX FPC PPC_FPC PROC_Protected BIT_32 ASM_FPC
|
||||
LINUX OS_LINUX FPC PPC_FPC PROC_Protected BIT_64 ASM_FPC
|
||||
OS_UNIX
|
||||
|
||||
FREEBSD OS_FREEBSD FPC PPC_FPC PROC_Protected BIT_32 ASM_FPC
|
||||
FREEBSD OS_FREEBSD FPC PPC_FPC PROC_Protected BIT_64 ASM_FPC
|
||||
OS_UNIX
|
||||
|
||||
NETBSD OS_NETBSD FPC PPC_FPC PROC_Protected BIT_32 ASM_FPC
|
||||
@ -103,6 +109,7 @@
|
||||
VIRTUAL PPC_VIRTUAL PROC_Protected BIT 32 ASM_BP
|
||||
SYBIL2 PPC_SPEED PROC_Protected BIT_32 ASM_BP
|
||||
FPC PPC_FPC PROC_Protected BIT_32 ASM_FPC
|
||||
WINDOWS 64-BITS FPC PPC_FPC PROC_Protected BIT_64 ASM_FPC
|
||||
|
||||
OS2 OS_OS2 BPOS2 PPC_BPOS2 PROC_Protected BIT_16 ASM_BP
|
||||
VIRTUAL PPC_VIRTUAL PROC_Protected BIT_32 ASM_BP
|
||||
@ -153,6 +160,7 @@ FOR FPC THESE ARE THE TRANSLATIONS
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
{ FPC 32 BIT COMPILER changes ASM, 32 bits etc - Updated 27Aug98 LdB }
|
||||
{ FPC 64 BIT COMPILER added - Update 28Nov2010 PM }
|
||||
{---------------------------------------------------------------------------}
|
||||
{$IFDEF FPC}
|
||||
{$mode fpc}
|
||||
@ -160,7 +168,13 @@ FOR FPC THESE ARE THE TRANSLATIONS
|
||||
{$UNDEF PROC_Real}
|
||||
{$DEFINE PROC_Protected}
|
||||
{$UNDEF BIT_16}
|
||||
{$DEFINE BIT_32}
|
||||
{$IFDEF CPU64}
|
||||
{$UNDEF BIT_32}
|
||||
{$DEFINE BIT_64}
|
||||
{$ELSE}
|
||||
{$DEFINE BIT_32}
|
||||
{$UNDEF BIT_64}
|
||||
{$ENDIF}
|
||||
{$UNDEF PPC_BP}
|
||||
{$DEFINE PPC_FPC}
|
||||
{$UNDEF ASM_BP}
|
||||
@ -244,6 +258,18 @@ FOR FPC THESE ARE THE TRANSLATIONS
|
||||
{$DEFINE BIT_32}
|
||||
{$ENDIF}
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
{ 64 BIT WINDOWS COMPILERS changes bit size - Updated 28Nov10 PM }
|
||||
{---------------------------------------------------------------------------}
|
||||
{$IFDEF WIN64}
|
||||
{$IFNDEF WINDOWS}
|
||||
{$DEFINE WINDOWS}
|
||||
{$ENDIF}
|
||||
{$UNDEF BIT_16}
|
||||
{$UNDEF BIT_32}
|
||||
{$DEFINE BIT_64}
|
||||
{$ENDIF}
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
{ WINDOWS COMPILERS change op system and proc mode - Updated 03Nov99 LdB }
|
||||
{---------------------------------------------------------------------------}
|
||||
@ -253,7 +279,7 @@ FOR FPC THESE ARE THE TRANSLATIONS
|
||||
{$UNDEF PROC_Real}
|
||||
{$DEFINE PROC_Protected}
|
||||
{$IFDEF FPC}
|
||||
{$DEFINE WIN32}
|
||||
// {$DEFINE WIN32}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
@ -413,6 +439,7 @@ FOR FPC THESE ARE THE TRANSLATIONS
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
{ WIN16 AND WIN32 set if in windows - Updated 16Oct2000 LdB }
|
||||
{ WIN64 added - Update 28Nov2010 PM }
|
||||
{---------------------------------------------------------------------------}
|
||||
{$IFDEF OS_WINDOWS} { WINDOWS SYSTEM }
|
||||
{$IFDEF BIT_16}
|
||||
@ -421,7 +448,22 @@ FOR FPC THESE ARE THE TRANSLATIONS
|
||||
{$IFDEF BIT_32}
|
||||
{$DEFINE WIN32} { 32 BIT WINDOWS }
|
||||
{$ENDIF}
|
||||
{$IFDEF BIT_64}
|
||||
{$DEFINE WIN64} { 64 BIT WINDOWS }
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
{---------------------------------------------------------------------------}
|
||||
{ BIT_32_OR_MORE }
|
||||
{---------------------------------------------------------------------------}
|
||||
|
||||
{$ifdef BIT_16}
|
||||
{$UNDEF BIT_32_OR_MORE}
|
||||
{$ELSE}
|
||||
{$DEFINE BIT_32_OR_MORE}
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -619,9 +619,9 @@ resourcestring sChangeDirectory='Change Directory';
|
||||
{$ifdef go32v2}
|
||||
{$define NetDrive}
|
||||
{$endif go32v2}
|
||||
{$ifdef win32}
|
||||
{$ifdef OS_WINDOWS}
|
||||
{$define NetDrive}
|
||||
{$endif win32}
|
||||
{$endif OS_WINDOWS}
|
||||
|
||||
procedure RemoveDoubleDirSep(var ExpPath : PathStr);
|
||||
var
|
||||
@ -671,7 +671,7 @@ begin
|
||||
// This function is called on current directories.
|
||||
// If the current dir starts with a . on Linux it is is hidden.
|
||||
// That's why we allow hidden dirs below (bug 6173)
|
||||
FindFirst(ExpPath, Directory+hidden, SR);
|
||||
FindFirst(ExpPath, Directory+hidden, SR);
|
||||
PathValid := (DosError = 0) and (SR.Attr and Directory <> 0);
|
||||
{$ifdef NetDrive}
|
||||
if (DosError<>0) and (length(ExpPath)>2) and
|
||||
@ -2746,11 +2746,11 @@ begin
|
||||
else
|
||||
IllegalChars := ';,=+<>|"[] '+DirSeparator;
|
||||
{$else not go32v2}
|
||||
{$ifdef win32}
|
||||
{$ifdef OS_WINDOWS}
|
||||
IllegalChars := ';,=+<>|"[]'+DirSeparator;
|
||||
{$else not go32v2 and not win32 }
|
||||
{$else not go32v2 and not OS_WINDOWS }
|
||||
IllegalChars := ';,=+<>|"[] '+DirSeparator;
|
||||
{$endif not win32}
|
||||
{$endif not OS_WINDOWS}
|
||||
{$endif not go32v2}
|
||||
{$else not PPC_FPC}
|
||||
IllegalChars := ';,=+<>|"[] '+DirSeparator;
|
||||
|
@ -74,10 +74,10 @@ implementation
|
||||
{$i go32smsg.inc}
|
||||
{$define HAS_SYSMSG}
|
||||
{$endif go32v2}
|
||||
{$ifdef win32}
|
||||
{$ifdef OS_WINDOWS}
|
||||
{$i w32smsg.inc}
|
||||
{$define HAS_SYSMSG}
|
||||
{$endif win32}
|
||||
{$endif OS_WINDOWS}
|
||||
{$ifdef unix}
|
||||
{$i unixsmsg.inc}
|
||||
{$define HAS_SYSMSG}
|
||||
|
@ -292,13 +292,13 @@ PROCEDURE SetTime (Hour, Minute, Second, Sec100: Word);
|
||||
POP BP; { Restore register }
|
||||
END;
|
||||
{$ENDIF}
|
||||
{$IFDEF BIT_32} { 32 BIT WINDOWS CODE }
|
||||
{$IFDEF BIT_32_OR_MORE} { 32 BIT WINDOWS CODE }
|
||||
VAR DT: TSystemTime;
|
||||
BEGIN
|
||||
{$IFDEF PPC_FPC} { FPC WINDOWS COMPILER }
|
||||
GetLocalTime(@DT); { Get the date/time }
|
||||
GetLocalTime(@DT); { Get the date/time }
|
||||
{$ELSE} { OTHER COMPILERS }
|
||||
GetLocalTime(DT); { Get the date/time }
|
||||
GetLocalTime(DT); { Get the date/time }
|
||||
{$ENDIF}
|
||||
DT.wHour := Hour; { Transfer hour }
|
||||
DT.wMinute := Minute; { Transfer minute }
|
||||
@ -417,7 +417,7 @@ PROCEDURE GetTime (Var Hour, Minute, Second, Sec100: Word);
|
||||
STOSW; { Return hours }
|
||||
END;
|
||||
{$ENDIF}
|
||||
{$IFDEF BIT_32} { 32 BIT WINDOWS CODE }
|
||||
{$IFDEF BIT_32_OR_MORE} { 32 BIT WINDOWS CODE }
|
||||
VAR DT: TSystemTime;
|
||||
BEGIN
|
||||
{$IFDEF PPC_FPC} { FPC WINDOWS COMPILER }
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
System independent system interface for win32
|
||||
System independent system interface for win32/win64
|
||||
|
||||
Copyright (c) 2000 by Pierre Muller
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user