mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-19 06:32:03 +02:00
* More ver1_0 defines removed
* Update compiler options git-svn-id: trunk@3453 -
This commit is contained in:
parent
2cbd7fddcd
commit
b87109913c
@ -254,7 +254,6 @@ begin
|
||||
dup2:=false;
|
||||
end;
|
||||
|
||||
{$ifndef ver1_0}
|
||||
function fpdup(fh:longint):longint;
|
||||
begin
|
||||
if not dup(fh,fpdup) then
|
||||
@ -268,33 +267,32 @@ begin
|
||||
else
|
||||
fpdup2:=-1;
|
||||
end;
|
||||
{$endif ver1_0}
|
||||
|
||||
|
||||
Function {$ifdef ver1_0}fdclose{$else}fpclose{$endif} (Handle : Longint) : boolean;
|
||||
function fpclose(Handle : Longint) : boolean;
|
||||
var Regs: registers;
|
||||
begin
|
||||
Regs.Eax := $3e00;
|
||||
Regs.Ebx := Handle;
|
||||
MsDos(Regs);
|
||||
{$ifdef ver1_0}fdclose{$else}fpclose{$endif}:=(Regs.Flags and fCarry)=0;
|
||||
fpclose:=(Regs.Flags and fCarry)=0;
|
||||
end;
|
||||
|
||||
{$endif def go32v2}
|
||||
|
||||
{$ifdef Windows}
|
||||
Function {$ifdef ver1_0}fdclose{$else}fpclose{$endif} (Handle : Longint) : boolean;
|
||||
Function fpclose(Handle : Longint) : boolean;
|
||||
begin
|
||||
{ Do we need this ?? }
|
||||
{$ifdef ver1_0}fdclose{$else}fpclose{$endif}:=true;
|
||||
fpclose:=true;
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
{$ifdef os2}
|
||||
Function {$ifdef ver1_0}fdclose{$else}fpclose{$endif} (Handle : Longint) : boolean;
|
||||
Function fpclose (Handle : Longint) : boolean;
|
||||
begin
|
||||
{ Do we need this ?? }
|
||||
{$ifdef ver1_0}fdclose{$else}fpclose{$endif}:=true;
|
||||
fpclose:=true;
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
@ -302,9 +300,8 @@ end;
|
||||
Function {$ifdef ver1_0}fdclose{$else}fpclose{$endif} (Handle : Longint) : boolean;
|
||||
begin
|
||||
{ if executed as under GO32 this hangs the DOS-prompt }
|
||||
{$ifdef ver1_0}fdclose{$else}fpclose{$endif}:=true;
|
||||
fpclose:=true;
|
||||
end;
|
||||
|
||||
{$endif}
|
||||
|
||||
{$I-}
|
||||
@ -397,13 +394,8 @@ function ChangeRedirOut(Const Redir : String; AppendToFile : Boolean) : Boolean;
|
||||
{$ifdef Windows}
|
||||
if SetStdHandle(Std_Output_Handle,FileRec(FOUT^).Handle) then
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}
|
||||
dup(StdOutputHandle,TempHOut);
|
||||
dup2(FileRec(FOUT^).Handle,StdOutputHandle);
|
||||
{$else}
|
||||
TempHOut:=fpdup(StdOutputHandle);
|
||||
fpdup2(FileRec(FOUT^).Handle,StdOutputHandle);
|
||||
{$endif}
|
||||
if (TempHOut<>UnusedHandle) and
|
||||
(StdOutputHandle<>UnusedHandle) then
|
||||
{$endif not Windows}
|
||||
@ -435,13 +427,8 @@ function ChangeRedirIn(Const Redir : String) : Boolean;
|
||||
{$ifdef Windows}
|
||||
if SetStdHandle(Std_Input_Handle,FileRec(FIN^).Handle) then
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}
|
||||
dup(StdInputHandle,TempHIn);
|
||||
dup2(FileRec(FIn^).Handle,StdInputHandle);
|
||||
{$else}
|
||||
TempHIn:=fpdup(StdInputHandle);
|
||||
fpdup2(FileRec(FIn^).Handle,StdInputHandle);
|
||||
{$endif}
|
||||
if (TempHIn<>UnusedHandle) and
|
||||
(StdInputHandle<>UnusedHandle) then
|
||||
{$endif not Windows}
|
||||
@ -477,13 +464,8 @@ function ChangeRedirError(Const Redir : String; AppendToFile : Boolean) : Boolea
|
||||
{$ifdef Windows}
|
||||
if SetStdHandle(Std_Error_Handle,FileRec(FERR^).Handle) then
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}
|
||||
dup(StdErrorHandle,TempHError);
|
||||
dup2(FileRec(FERR^).Handle,StdErrorHandle);
|
||||
{$else}
|
||||
TempHError:=fpdup(StdErrorHandle);
|
||||
fpdup2(FileRec(FERR^).Handle,StdErrorHandle);
|
||||
{$endif}
|
||||
if (TempHError<>UnusedHandle) and
|
||||
(StdErrorHandle<>UnusedHandle) then
|
||||
{$endif not Windows}
|
||||
@ -541,11 +523,11 @@ end;
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Output_Handle,StdOutputHandle);
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHOut,StdOutputHandle);
|
||||
fpdup2(TempHOut,StdOutputHandle);
|
||||
{$endif not Windows}
|
||||
{$endif FPC}
|
||||
Close (FOUT^);
|
||||
{$ifdef ver1_0}fdclose{$else}fpclose{$endif}(TempHOut);
|
||||
fpclose(TempHOut);
|
||||
RedirChangedOut:=false;
|
||||
end;
|
||||
|
||||
@ -562,11 +544,11 @@ end;
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Input_Handle,StdInputHandle);
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHIn,StdInputHandle);
|
||||
fpdup2(TempHIn,StdInputHandle);
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
Close (FIn^);
|
||||
{$ifdef ver1_0}fdclose{$else}fpclose{$endif}(TempHIn);
|
||||
fpclose(TempHIn);
|
||||
RedirChangedIn:=false;
|
||||
end;
|
||||
|
||||
@ -583,7 +565,7 @@ end;
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Input_Handle,StdInputHandle);
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHIn,StdInputHandle);
|
||||
fpdup2(TempHIn,StdInputHandle);
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
InRedirDisabled:=True;
|
||||
@ -603,7 +585,7 @@ end;
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Input_Handle,FileRec(FIn^).Handle);
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(FileRec(FIn^).Handle,StdInputHandle);
|
||||
fpdup2(FileRec(FIn^).Handle,StdInputHandle);
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
InRedirDisabled:=False;
|
||||
@ -622,7 +604,7 @@ end;
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Output_Handle,StdOutputHandle);
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHOut,StdOutputHandle);
|
||||
fpdup2(TempHOut,StdOutputHandle);
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
OutRedirDisabled:=True;
|
||||
@ -642,7 +624,7 @@ end;
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Output_Handle,FileRec(FOut^).Handle);
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(FileRec(FOut^).Handle,StdOutputHandle);
|
||||
fpdup2(FileRec(FOut^).Handle,StdOutputHandle);
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
OutRedirDisabled:=False;
|
||||
@ -661,11 +643,11 @@ end;
|
||||
{$ifdef Windows}
|
||||
SetStdHandle(Std_Error_Handle,StdErrorHandle);
|
||||
{$else not Windows}
|
||||
{$ifdef ver1_0}dup2{$else}fpdup2{$endif}(TempHError,StdErrorHandle);
|
||||
fpdup2(TempHError,StdErrorHandle);
|
||||
{$endif not Windows}
|
||||
{$endif}
|
||||
Close (FERR^);
|
||||
{$ifdef ver1_0}fdclose{$else}fpclose{$endif}(TempHError);
|
||||
fpclose(TempHError);
|
||||
RedirChangedError:=false;
|
||||
end;
|
||||
|
||||
|
@ -783,6 +783,8 @@ const
|
||||
opt_tp7compatibility = 'TP/BP ~7~.0 compatibility';
|
||||
opt_delphicompatibility = 'Del~p~hi compatibility';
|
||||
opt_allowstaticinobjects = 'A~l~low STATIC in objects';
|
||||
opt_assertions = 'Include ~a~ssertion code';
|
||||
opt_kylix = 'Load ~K~ylix compat. unit fpcylix';
|
||||
opt_strictvarstrings = 'Strict ~v~ar-strings';
|
||||
opt_extendedsyntax = 'E~x~tended syntax';
|
||||
opt_allowmmxoperations = 'Allow MMX op~e~rations';
|
||||
@ -799,6 +801,9 @@ const
|
||||
opt_stackchecking = '~S~tack checking';
|
||||
opt_iochecking = '~I~/O checking';
|
||||
opt_overflowchecking = 'Integer ~o~verflow checking';
|
||||
opt_objmethcallvalid = 'Object ~m~ethod call checking';
|
||||
{ Code generation }
|
||||
opt_pic = '~P~osition independend code';
|
||||
{ Code options }
|
||||
opt_generatefastercode = 'Generate ~f~aster code';
|
||||
opt_generatesmallercode = 'Generate s~m~aller code';
|
||||
@ -846,6 +851,7 @@ const
|
||||
opt_exeppudirectories = '~E~XE output directory';
|
||||
opt_ppuoutputdirectory = '~P~PU output directory';
|
||||
opt_cross_tools_directory = '~C~ross tools directory';
|
||||
opt_dynamic_linker = '~D~ynamic linker path';
|
||||
{ Library options }
|
||||
opt_librariesdefault = '~T~arget default';
|
||||
opt_dynamiclibraries = 'Link to ~D~ynamic libraries';
|
||||
|
@ -29,7 +29,8 @@ const
|
||||
type
|
||||
TParamID =
|
||||
(idNone,idAlign,idRangeChecks,idStackChecks,idIOChecks,
|
||||
idOverflowChecks,idAsmDirect,idAsmATT,idAsmIntel,idAsmMot,
|
||||
idOverflowChecks,idObjMethCallChecks,
|
||||
idAsmDirect,idAsmATT,idAsmIntel,idAsmMot,
|
||||
idSymInfNone,idSymInfGlobalOnly,idSymInfGlobalLocal,
|
||||
idStackSize,idHeapSize,idStrictVarStrings,idExtendedSyntax,
|
||||
idMMXOps,idTypedAddress,idPackRecords,idPackEnum,idStackFrames,
|
||||
@ -969,6 +970,8 @@ begin
|
||||
AddBooleanItem(opt_tp7compatibility,'o',idNone);
|
||||
AddBooleanItem(opt_delphicompatibility,'d',idNone);
|
||||
AddBooleanItem(opt_allowstaticinobjects,'s',idNone);
|
||||
AddBooleanItem(opt_assertions,'a',idNone);
|
||||
AddBooleanItem(opt_kylix,'k',idNone);
|
||||
{ Useless as they are not passed to the compiler PM
|
||||
AddBooleanItem(opt_strictvarstrings,'/',idStrictVarStrings);
|
||||
AddBooleanItem(opt_extendedsyntax,'/',idExtendedSyntax);
|
||||
@ -992,6 +995,8 @@ begin
|
||||
AddBooleanItem(opt_stackchecking,'t',idStackChecks);
|
||||
AddBooleanItem(opt_iochecking,'i',idIOChecks);
|
||||
AddBooleanItem(opt_overflowchecking,'o',idOverflowChecks);
|
||||
AddBooleanItem(opt_objmethcallvalid,'R',idObjMethCallChecks);
|
||||
{ AddBooleanItem(opt_pic,'g',idNone);}
|
||||
end;
|
||||
New(OptimizingGoalSwitches,InitSelect('O'));
|
||||
with OptimizingGoalSwitches^ do
|
||||
@ -1041,7 +1046,7 @@ begin
|
||||
with AsmReaderSwitches^ do
|
||||
begin
|
||||
{$ifdef I386}
|
||||
AddSelectItem(opt_directassembler,'direct',idAsmDirect);
|
||||
{ AddSelectItem(opt_directassembler,'direct',idAsmDirect);}
|
||||
AddSelectItem(opt_attassembler,'att',idAsmATT);
|
||||
AddSelectItem(opt_intelassembler,'intel',idAsmIntel);
|
||||
{$endif I386}
|
||||
@ -1099,6 +1104,7 @@ begin
|
||||
AddStringItem(opt_exeppudirectories,'E',idNone,true,true);
|
||||
AddStringItem(opt_ppuoutputdirectory,'U',idNone,true,true);
|
||||
AddStringItem(opt_cross_tools_directory,'D',idNone,true,true);
|
||||
AddStringItem(opt_dynamic_linker,'L',idNone,false,false);
|
||||
end;
|
||||
|
||||
New(LibLinkerSwitches,InitSelect('X'));
|
||||
@ -1244,6 +1250,7 @@ begin
|
||||
idStackChecks : AddSwitch('S'+P^.GetSwitchStr(SM));
|
||||
idIOChecks : AddSwitch('I'+P^.GetSwitchStr(SM));
|
||||
idOverflowChecks : AddSwitch('Q'+P^.GetSwitchStr(SM));
|
||||
idObjMethCallChecks: AddSwitch('OBJECTCHECKS'+P^.GetSwitchStr(SM));
|
||||
{ idAsmDirect : if P^.GetParamValueBool[SM] then AddParam('ASMMODE DIRECT');
|
||||
idAsmATT : if P^.GetParamValueBool[SM] then AddParam('ASMMODE ATT');
|
||||
idAsmIntel : if P^.GetParamValueBool[SM] then AddParam('ASMMODE INTEL');
|
||||
|
Loading…
Reference in New Issue
Block a user