Explorar o código

Remove the rest of the VER3_0 conditionals.

Rika Ichinose hai 10 meses
pai
achega
ce5a632432

+ 1 - 16
compiler/systems.pas

@@ -592,21 +592,6 @@ implementation
 {$ifdef FreeBSD}
 function GetOSRelDate:Longint;
 
-{ FPSysCtl first argument was of type pchar
-  up to commit 35566 from 2017/03/11 
-  and corrected to pcint in that commit.
-  But the following code needs to work with
-  both old 3.0.X definition and new definition using pcint type.
-  Problem solved using a special type called
-  FPSysCtlFirstArgType. }
-{$if defined(VER3_0_0) or defined(VER3_0_2)}  
-type
-  FPSysCtlFirstArgType = PChar;
-{$else}
-type
-  FPSysCtlFirstArgType = pcint;
-{$endif}  
-
 var
         mib  : array[0..1] of cint;
         rval : cint;
@@ -623,7 +608,7 @@ Begin
         mib[1] := KERN_OSRELDATE;
         len    := 4;
         oerrno:= fpgeterrno;
-        if (FPsysctl(FPSysCtlFirstArgType(@mib), 2, pchar(@v), @len, NIL, 0) = -1) Then
+        if (FPsysctl(pcint(@mib), 2, pchar(@v), @len, NIL, 0) = -1) Then
              Begin
                 if (fpgeterrno = ESysENOMEM) Then
                         fpseterrno(oerrno);

+ 0 - 4
packages/fcl-base/src/syncobjs.pp

@@ -172,10 +172,8 @@ type
     class function Exchange(var Target: TObject; Value: TObject): TObject; overload; static; inline;
     class function CompareExchange(var Target: Pointer; Value: Pointer; Comparand: Pointer): Pointer; overload; static; inline;
     class function CompareExchange(var Target: TObject; Value: TObject; Comparand: TObject): TObject; overload; static; inline;
-{$ifndef VER3_0}
     generic class function Exchange<T: class>(var Target: T; Value: T): T; overload; static; inline;
     generic class function CompareExchange<T: class>(var Target: T; Value: T; Comparand: T): T; overload; static; inline;
-{$endif VER3_0}
 {$ENDIF NOPOINTER}
   end;
 
@@ -614,7 +612,6 @@ begin
   Result := TObject(InterLockedExchange(Pointer(Target), Pointer(Value)));
 end;
 
-{$ifndef VER3_0}
 generic class function TInterlocked.CompareExchange<T>(var Target: T; Value: T; Comparand: T): T; overload; static; inline;
 begin
   Result := T(InterlockedCompareExchange(Pointer(Target), Pointer(Value), Pointer(Comparand)));
@@ -624,7 +621,6 @@ generic class function TInterlocked.Exchange<T>(var Target: T; Value: T): T; ove
 begin
   Result := T(InterLockedExchange(Pointer(Target), Pointer(Value)));
 end;
-{$endif VER3_0}
 
 {$ENDIF NOPOINTER}
 

+ 0 - 16
packages/fcl-pdf/src/fppdf.pp

@@ -1480,13 +1480,6 @@ end;
 
 procedure DecompressStream(AFrom: TStream; ATo: TStream);
 
-{$IFDEF VER2_6}
-{$DEFINE NOHEADERWORKADOUND}
-{$ENDIF}
-{$IFDEF VER3_0}
-{$DEFINE NOHEADERWORKADOUND}
-{$ENDIF}
-
 Const
   BufSize = 1024; // 1K
 
@@ -1495,9 +1488,6 @@ Type
 
 var
   d: TDecompressionStream;
-  {$IFDEF NOHEADERWORKADOUND}
-  I: integer;
-  {$ENDIF}
   Count : Integer;
   Buffer : TBuffer;
 
@@ -1511,12 +1501,6 @@ begin
 
   AFrom.Position := 0;
   AFrom.Seek(0,soFromEnd);
-{$IFDEF NOHEADERWORKADOUND}
-  // Work around a paszlib bug, FPC bugtracker 26827
-  I:=0;
-  AFrom.Write(I,SizeOf(I));
-  AFrom.Position:=0;
-{$ENDIF}
   D:=TDecompressionStream.Create(AFrom, False);
   try
     repeat

+ 0 - 4
packages/fcl-report/demos/rptgrouping.pp

@@ -41,11 +41,7 @@ uses
   fpReportStreamer,
   fpTTF,
   fpJSON,
-{$IFDEF VER3_0}  
-  fprepexprpars,
-{$ELSE}  
   fpexprpars,
-{$ENDIF}
   jsonparser;
 
 { TGroupingDemo }

+ 0 - 2
packages/fcl-web/src/restbridge/sqldbrestado.pp

@@ -209,7 +209,6 @@ end;
 procedure TADOOutputStreamer.FinalizeOutput;
 
 begin
-{$IFNDEF VER3_0}
   if Not (ooHumanReadable in OutputOptions) then
     begin
     With TDOMWriter.Create(Stream,FXML) do
@@ -222,7 +221,6 @@ begin
       end;
     end
   else
-{$ENDIF}
   WriteXML(FXML,Stream);
   FreeAndNil(FXML);
 end;

+ 0 - 2
packages/fcl-web/src/restbridge/sqldbrestcds.pp

@@ -254,7 +254,6 @@ end;
 procedure TCDSOutputStreamer.FinalizeOutput;
 
 begin
-{$IFNDEF VER3_0}
   if Not (ooHumanReadable in OutputOptions) then
     begin
     With TDOMWriter.Create(Stream,FXML) do
@@ -267,7 +266,6 @@ begin
       end;
     end
   else
-{$ENDIF}
   WriteXML(FXML,Stream);
   FreeAndNil(FXML);
 end;

+ 2 - 29
packages/fcl-web/src/restbridge/sqldbrestdata.pp

@@ -521,12 +521,7 @@ begin
       rftDateTime : P.AsDateTime:=ScanDateTime(GetString(rpDateTimeFormat),S);
       rftString : P.AsString:=S;
       rftBoolean : P.AsBoolean:=D.AsBoolean;
-      rftBlob :
-{$IFNDEF VER3_0}
-         P.AsBlob:=BytesOf(DecodeStringBase64(S));
-{$ELSE}
-         P.AsBlob:=DecodeStringBase64(S);
-{$ENDIF}
+      rftBlob : P.AsBlob:=BytesOf(DecodeStringBase64(S));
     else
       OtherParamValue(S,N);
     end
@@ -851,23 +846,6 @@ function TSQLDBRestDBHandler.GetGeneratorValue(const aGeneratorName: String
   ): Int64;
 
 begin
-{$IFDEF VER3_0_4}
-  // The 'get next value' SQL in 3.0.4 is wrong, so we need to do this sep
-  if (IO.Connection is TSQLConnector) and SameText((IO.Connection as TSQLConnector).ConnectorType,'Sqlite3') then
-    begin
-    With CreateQuery('SELECT seq+1 FROM sqlite_sequence WHERE name=:aName') do
-      Try
-        ParamByName('aName').AsString:=aGeneratorName;
-        Open;
-        if (EOF and BOF) then
-          DatabaseErrorFmt('Generator %s does not exist',[aGeneratorName]);
-        Result:=Fields[0].asLargeint;
-      Finally
-        Free;
-      end;
-    end
-  else
-{$ENDIF}
   Result:=IO.Connection.GetNextValue(aGeneratorName,1);
 end;
 
@@ -920,12 +898,7 @@ begin
       rftDateTime : DataField.AsDateTime:=ScanDateTime(GetString(rpDateTimeFormat),D.AsString);
       rftString : DataField.AsString:=D.AsString;
       rftBoolean : DataField.AsBoolean:=D.AsBoolean;
-      rftBlob :
-{$IFNDEF VER3_0}
-         DataField.AsBytes:=BytesOf(DecodeStringBase64(D.AsString));
-{$ELSE}
-         DataField.AsString:=DecodeStringBase64(D.AsString);
-{$ENDIF}
+      rftBlob : DataField.AsBytes:=BytesOf(DecodeStringBase64(D.AsString));
     else
       DataField.AsString:=D.AsString;
     end

+ 0 - 2
packages/fcl-web/src/restbridge/sqldbrestxml.pp

@@ -216,7 +216,6 @@ end;
 procedure TXMLOutputStreamer.FinalizeOutput;
 
 begin
-{$IFNDEF VER3_0}
   if Not (ooHumanReadable in OutputOptions) then
     begin
     With TDOMWriter.Create(Stream,FXML) do
@@ -229,7 +228,6 @@ begin
       end;
     end
   else
-{$ENDIF}
   WriteXML(FXML,Stream);
   FreeAndNil(FXML);
 end;

+ 0 - 4
packages/rtl-generics/src/generics.collections.pas

@@ -62,10 +62,6 @@ type
 
   TDuplicates = {$IFDEF FPC_DOTTEDUNITS}System.{$ENDIF}Classes.TDuplicates;
 
-  {$ifdef VER3_0_0}
-  TArray<T> = array of T;
-  {$endif}
-
   // bug #24254 workaround
   // should be TArray = record class procedure Sort<T>(...) etc.
   TBinarySearchResult = record

+ 0 - 2
rtl/arm/int64p.inc

@@ -13,7 +13,6 @@
 
  **********************************************************************}
 
-{$ifndef VER3_0}
 {$if (not defined(CPUTHUMB)) and defined(CPUARM_HAS_UMULL)}
 {$define FPC_SYSTEM_HAS_MUL_QWORD}
 function fpc_mul_qword(f1,f2 : qword) : qword;assembler;nostackframe;[public,alias: 'FPC_MUL_QWORD']; compilerproc;
@@ -88,4 +87,3 @@ asm
   ldmfd sp!,{r4,r5,r6,r15}
 end;
 {$endif (not defined(CPUTHUMB)) and defined(CPUARM_HAS_UMULL)}
-{$endif VER3_0}

+ 0 - 12
rtl/arm/setjump.inc

@@ -23,13 +23,9 @@ function fpc_setjmp(var S : jmp_buf) : longint;assembler;[Public, alias : 'FPC_S
     // fstmiad increases the address register always by 2n+1 words, so fix this
     sub r0,r0,#4
     {$else}
-    {$ifdef VER3_0}
-    fstmiad r0!, {d8-d15}
-    {$else}
     vstmia r0!, {d8-d15}
     {$endif}
     {$endif}
-    {$endif}
 
     {$if defined(CPUTHUMB2)}
     stmia	r0!, {v1-v6, sl, fp}
@@ -74,12 +70,8 @@ procedure fpc_longjmp(var S : jmp_buf;value : longint);assembler;[Public, alias
     it eq
     moveq   r0, #1
     {$if defined(FPUVFPV2) or defined(FPUVFPV3) or defined(FPUVFPV4) or defined(FPUVFPV3_D16)}
-    {$ifdef VER3_0}
-    fldmiad ip!, {d8-d15}
-    {$else}
     vldmia ip!, {d8-d15}
     {$endif}
-    {$endif}
     ldmia   ip!, {v1-v6, sl, fp}
     ldr     sp, [ip]
     add     ip, ip, #4
@@ -116,13 +108,9 @@ procedure fpc_longjmp(var S : jmp_buf;value : longint);assembler;[Public, alias
     // increases fldmiax the address register always by 2n+1 words, so fix this
     sub ip,ip,#4
     {$else}
-    {$ifdef VER3_0}
-    fldmiad ip!, {d8-d15}
-    {$else}
     vldmia ip!, {d8-d15}
     {$endif}
     {$endif}
-    {$endif}
     ldmia   ip,{v1-v6, sl, fp, sp, pc}
     {$endif}
   end;

+ 1 - 13
rtl/bsd/sysctl.pp

@@ -88,19 +88,11 @@ TYPE    CtlNameRec = Record
 //
 
 {$ifdef FPC_USE_LIBC}
-{$if defined(VER3_0_0) or defined(VER3_0_2)}
-function FPsysctl (Name: PAnsiChar; namelen:cuint; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint; cdecl; external name 'sysctl';
-{$else}
 function FPsysctl (Name: pcint; namelen:cuint; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint; cdecl; external name 'sysctl';
-{$endif}
 function FPsysctlbyname (Name: PAnsiChar; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint; cdecl; external name 'sysctlbyname';
 function FPsysctlnametomib (Name: PAnsiChar;mibp:pcint;sizep:psize_t):cint; cdecl; external name 'sysctlnametomib';
 {$else}
-{$if defined(VER3_0_0) or defined(VER3_0_2)}
-function FPsysctl (Name: PAnsiChar; namelen:cuint; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint;
-{$else}
 function FPsysctl (Name: pcint; namelen:cuint; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint;
-{$endif}
 function FPsysctlbyname (Name: PAnsiChar; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint;
 function FPsysctlnametomib (Name: PAnsiChar; mibp:pcint;sizep:psize_t):cint;
 {$endif}
@@ -120,11 +112,7 @@ Uses Syscall;
 CONST  syscall_nr___sysctl                    = 202;
 {$endif}
 
-{$if defined(VER3_0_0) or defined(VER3_0_2)}
-function FPsysctl (Name: PAnsiChar; namelen:cuint; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint;
-{$else}
 function FPsysctl (Name: pcint; namelen:cuint; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint;
-{$endif}
 
 {$ifdef OpenBSD}
 const
@@ -132,7 +120,7 @@ const
 {$endif OpenBSD}
 
 Begin
-        if (pcint(name)[0] <> CTL_USER) Then
+        if (name[0] <> CTL_USER) Then
            exit(do_syscall(syscall_nr___sysctl,TSysParam(name), namelen, TSysParam(oldp), TSysParam(oldlenp), TSysParam(newp), TSysParam(newlen)))
         else
          Exit(0);

+ 1 - 91
rtl/go32v2/go32.pp

@@ -158,19 +158,6 @@ interface
     function unlock_data(var data;size : longint) : boolean;
     function unlock_code(functionaddr : pointer;size : longint) : boolean;
 
-{$ifdef VER3_0}
-    { disables and enables interrupts }
-    procedure disable;
-    procedure enable;
-
-    function inportb(port : word) : byte;
-    function inportw(port : word) : word;
-    function inportl(port : word) : longint;
-
-    procedure outportb(port : word;data : byte);
-    procedure outportw(port : word;data : word);
-    procedure outportl(port : word;data : longint);
-{$else VER3_0}
     { disables and enables interrupts }
     procedure disable;inline;
     procedure enable;inline;
@@ -182,7 +169,7 @@ interface
     procedure outportb(port : word;data : byte);inline;
     procedure outportw(port : word;data : word);inline;
     procedure outportl(port : word;data : longint);inline;
-{$endif VER3_0}
+
     function get_run_mode : word;
 
     function transfer_buffer : longint;
@@ -464,67 +451,7 @@ interface
            end ['ECX','EAX'];
       end;
 
-{$ifdef VER3_0}
-    procedure outportb(port : word;data : byte);
-
-      begin
-         asm
-            movw port,%dx
-            movb data,%al
-            outb %al,%dx
-         end ['EAX','EDX'];
-      end;
-
-    procedure outportw(port : word;data : word);
-
-      begin
-         asm
-            movw port,%dx
-            movw data,%ax
-            outw %ax,%dx
-         end ['EAX','EDX'];
-      end;
-
-    procedure outportl(port : word;data : longint);
-
-      begin
-         asm
-            movw port,%dx
-            movl data,%eax
-            outl %eax,%dx
-         end ['EAX','EDX'];
-      end;
-
-    function inportb(port : word) : byte;
-
-      begin
-         asm
-            movw port,%dx
-            inb %dx,%al
-            movb %al,__RESULT
-         end ['EAX','EDX'];
-      end;
-
-    function inportw(port : word) : word;
 
-      begin
-         asm
-            movw port,%dx
-            inw %dx,%ax
-            movw %ax,__RESULT
-         end ['EAX','EDX'];
-      end;
-
-    function inportl(port : word) : longint;
-
-      begin
-         asm
-            movw port,%dx
-            inl %dx,%eax
-            movl %eax,__RESULT
-         end ['EAX','EDX'];
-      end;
-{$else VER3_0}
     procedure outportb(port : word;data : byte);inline;
       begin
 	    fpc_x86_outportb(port,data);
@@ -554,8 +481,6 @@ interface
       begin
 	    inportl:=fpc_x86_inportl(port);
       end;
-{$endif VER3_0}
-
 
 
     function get_cs : word;assembler;
@@ -1170,19 +1095,6 @@ interface
          end;
       end;
 
-{$ifdef VER3_0}
-    procedure disable;assembler;
-
-      asm
-         cli
-      end;
-
-    procedure enable;assembler;
-
-      asm
-         sti
-      end;
-{$else VER3_0}
     procedure disable;inline;
 
       begin
@@ -1194,8 +1106,6 @@ interface
       begin
          fpc_x86_sti;
       end;
-{$endif VER3_0}
-
 
     var
       _run_mode : word;external name '_run_mode';

+ 0 - 2
rtl/i8086/int64p.inc

@@ -14,7 +14,6 @@
 
  **********************************************************************}
 
-{$ifndef VER3_0}
 {$define FPC_SYSTEM_HAS_MUL_QWORD}
 function fpc_mul_qword( f1, f2: qword): qword; [public,alias: 'FPC_MUL_QWORD']; compilerproc;
 begin
@@ -272,7 +271,6 @@ begin
 @@done:
   end [ 'ax','bx','cx','dx','si','di' ];
 end;
-{$endif VER3_0}
 
 
 {$define FPC_SYSTEM_HAS_MUL_DWORD_TO_QWORD}

+ 0 - 4
rtl/inc/objc1.inc

@@ -60,11 +60,7 @@ type
   }
 
   { ObjCBOOL is one byte and uses 0/1, just like Pascal }
-{$ifndef VER3_0}
   ObjCBOOL = boolean8;
-{$else}
-  ObjCBOOL = boolean;
-{$endif}
   pObjCBOOL = ^ObjCBOOL;
 
   tobjc_class = record

+ 1 - 1
rtl/inc/objcnf.inc

@@ -62,7 +62,7 @@ type
   }
 
   { ObjCBOOL is one byte and uses 0/1, just like Pascal }
-{$if (defined(darwin) and defined(cpuaarch64)) or defined(VER3_0)}
+{$if defined(darwin) and defined(cpuaarch64)}
   ObjCBOOL = boolean;
 {$else}
   ObjCBOOL = boolean8;

+ 0 - 8
rtl/java/jcompproc.inc

@@ -63,11 +63,9 @@ procedure fpc_shortstr_to_chararray(out res: array of AnsiChar; const src: Short
 
 Function  fpc_shortstr_Copy(const s:shortstring;index:SizeInt;count:SizeInt):shortstring;compilerproc;
 function  fpc_char_copy(c:AnsiChar;index : SizeInt;count : SizeInt): shortstring;compilerproc;
-{$ifndef VER3_0}
 Procedure fpc_shortstr_delete(var s:shortstring;index:SizeInt;count:SizeInt); compilerproc:fpc_in_delete_x_y_z;
 Procedure fpc_shortstr_insert(const source:shortstring;var s:shortstring;index:SizeInt); compilerproc:fpc_in_insert_x_y_z;
 Procedure fpc_shortstr_insert_char(source:AnsiChar;var s:shortstring;index:SizeInt); compilerproc:fpc_in_insert_x_y_z;
-{$endif VER3_0}
 
 (*
 {$ifdef FPC_HAS_FEATURE_DYNARRAYS}
@@ -327,10 +325,8 @@ Function fpc_AnsiStr_Compare_equal(const S1,S2 : RawByteString): SizeInt; compil
 { special declaration for the JVM }
 Procedure fpc_AnsiStr_SetLength (Var S : RawByteString; l : SizeInt{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING}); compilerproc;
 Function  fpc_ansistr_Copy (Const S : RawByteString; Index,Size : SizeInt): RawByteString;compilerproc;
-{$ifndef VER3_0}
 Procedure fpc_ansistr_insert (const Source : RawByteString; var S : RawByteString; Index : SizeInt); compilerproc:fpc_in_insert_x_y_z; rtlproc;
 Procedure fpc_ansistr_delete (var S : RawByteString; Index,Size: SizeInt); compilerproc:fpc_in_delete_x_y_z; rtlproc;
-{$endif VER3_0}
 {$ifdef EXTRAANSISHORT}
 //Function fpc_AnsiStr_ShortStr_Compare (Var S1 : Pointer; Var S2 : ShortString): SizeInt; compilerproc;
 {$endif EXTRAANSISHORT}
@@ -366,10 +362,8 @@ Procedure fpc_WideStr_RangeCheck(p: Pointer; index : SizeInt); compilerproc;
 
 Procedure fpc_WideStr_SetLength (Var S : WideString; l : SizeInt); compilerproc;
 Function  fpc_widestr_Copy (Const S : WideString; Index,Size : SizeInt) : WideString;compilerproc;
-{$ifndef VER3_0}
 Procedure fpc_widestr_insert (Const Source : WideString; Var S : WideString; Index : SizeInt); compilerproc:fpc_in_insert_x_y_z;
 Procedure fpc_widestr_delete (Var S : WideString; Index,Size: SizeInt); compilerproc:fpc_in_delete_x_y_z;
-{$endif VER3_0}
 {$ifndef FPC_WINLIKEWIDESTRING}
 function fpc_widestr_Unique(Var S : Pointer): Pointer; compilerproc;
 {$endif FPC_WINLIKEWIDESTRING}
@@ -421,10 +415,8 @@ Function fpc_UnicodeStr_Compare_equal(const S1,S2 : UnicodeString): SizeInt; com
 
 Procedure fpc_UnicodeStr_SetLength (Var S : UnicodeString; l : SizeInt); compilerproc;
 Function  fpc_unicodestr_Copy (Const S : UnicodeString; Index,Size : SizeInt) : UnicodeString;compilerproc;
-{$ifndef VER3_0}
 Procedure fpc_unicodestr_insert (Const Source : UnicodeString; Var S : UnicodeString; Index : SizeInt); compilerproc:fpc_in_insert_x_y_z;
 Procedure fpc_unicodestr_delete (Var S : UnicodeString; Index,Size: SizeInt); compilerproc:fpc_in_delete_x_y_z;
-{$endif VER3_0}
 //function fpc_unicodestr_Unique(Var S : Pointer): Pointer; compilerproc;
 Function fpc_Char_To_UChar(const c : AnsiChar): UnicodeChar; compilerproc;
 Function fpc_UChar_To_Char(const c : UnicodeChar): AnsiChar; compilerproc;

+ 2 - 11
rtl/java/jsystemh.inc

@@ -494,11 +494,6 @@ var
 
 
 { Shortstring functions }
-{$ifdef VER3_0}
-Procedure Delete(var s:shortstring;index:SizeInt;count:SizeInt);
-Procedure Insert(const source:shortstring;var s:shortstring;index:SizeInt);
-Procedure Insert(source:AnsiChar;var s:shortstring;index:SizeInt);
-{$endif VER3_0}
 Function  Pos(const substr:shortstring;const s:shortstring; Offset: Sizeint = 1):SizeInt;
 Function  Pos(C:AnsiChar;const s:shortstring; Offset: Sizeint = 1):SizeInt;
 {$ifdef FPC_HAS_FEATURE_ANSISTRINGS}
@@ -535,9 +530,9 @@ Function  hexStr(Val:Pointer):shortstring;
 {$endif CPUI8086}
 
 { AnsiChar functions }
-{$if defined(VER3_2) or defined(VER3_0)}
+{$if defined(VER3_2)}
 Function Chr(b : byte) : AnsiChar;      [INTERNPROC: fpc_in_chr_byte];
-{$endif defined(VER3_2) or defined(VER3_0)}
+{$endif defined(VER3_2)}
 Function  upCase(c:AnsiChar):AnsiChar;
 Function  lowerCase(c:AnsiChar):AnsiChar; overload;
 function  pos(const substr : shortstring;c:AnsiChar; Offset : Sizeint=1): SizeInt;
@@ -551,10 +546,6 @@ function  pos(const substr : shortstring;c:AnsiChar; Offset : Sizeint=1): SizeIn
 Procedure UniqueString(var S : RawByteString);{$ifdef FPC_HAS_CPSTRING}rtlproc;{$endif FPC_HAS_CPSTRING}{$ifdef SYSTEMINLINE}inline;{$endif}
 Function  Pos (const Substr : RawByteString; const Source : RawByteString; Offset: Sizeint = 1) : SizeInt;
 Function  Pos (c : AnsiChar; const s : RawByteString; Offset: Sizeint = 1) : SizeInt;
-{$ifdef VER3_0}
-Procedure Insert (const Source : RawByteString; var S : RawByteString; Index : SizeInt);{$ifdef FPC_HAS_CPSTRING}rtlproc;{$endif FPC_HAS_CPSTRING}
-Procedure Delete (var S : RawByteString; Index,Size: SizeInt);{$ifdef FPC_HAS_CPSTRING}rtlproc;{$endif FPC_HAS_CPSTRING}
-{$endif VER3_0}
 Function  StringOfChar(c : Ansichar;l : SizeInt) : AnsiString;
 function  upcase(const s : ansistring) : ansistring;
 function  lowercase(const s : ansistring) : ansistring;

+ 2 - 2
rtl/java/justrings.inc

@@ -732,7 +732,7 @@ end;
 
 
 {$define FPC_HAS_DELETE_UNICODESTR}
-Procedure {$ifdef VER3_0}Delete{$else}fpc_unicodestr_delete{$endif} (Var S : UnicodeString; Index,Size: SizeInt);
+Procedure fpc_unicodestr_delete (Var S : UnicodeString; Index,Size: SizeInt);
 Var
   LS : SizeInt;
   sb: JLStringBuilder;
@@ -757,7 +757,7 @@ end;
 
 
 {$define FPC_HAS_INSERT_UNICODESTR}
-Procedure {$ifdef VER3_0}Insert{$else}fpc_unicodestr_insert{$endif} (Const Source : UnicodeString; Var S : UnicodeString; Index : SizeInt);
+Procedure fpc_unicodestr_insert (Const Source : UnicodeString; Var S : UnicodeString; Index : SizeInt);
 var
   Temp : UnicodeString;
   LS : SizeInt;

+ 0 - 9
rtl/linux/system.pp

@@ -40,15 +40,6 @@ Unit System;
 
 {$I sysunixh.inc}
 
-{$if defined(VER3_0) and defined(CPUX86_64)}
-{$define FPC_BOOTSTRAP_INDIRECT_ENTRY}
-const
-  { this constant only exists during bootstrapping of the RTL with FPC 3.0.x,
-    so that the whole condition doesn't need to be repeated in si_intf }
-  indirect_bootstrap = true;
-{$endif defined(VER3_0) and defined(CPUX86_64)}
-
-
 function get_cmdline:PAnsiChar; deprecated 'use paramstr' ;
 property cmdline:PAnsiChar read get_cmdline;
 

+ 0 - 6
rtl/m68k/m68k.inc

@@ -131,12 +131,6 @@ end;
 {$define FPC_SYSTEM_HAS_FILLCHAR}
 procedure FillChar(var x; count : longint; value : byte); assembler; register; nostackframe;
 asm
-{$ifdef VER3_0}
-  move.l   x,a0
-  move.l   count,d0
-  clr.l    d1
-  move.b   value,d1
-{$endif VER3_0}
   { a0 is x, d0 is count, d1 is value }
   tst.l    d0             { anything to fill at all?      }
   ble      @Lquit

+ 0 - 16
rtl/m68k/setjump.inc

@@ -26,19 +26,11 @@ asm
 {$endif}
 
   // Save nonvolatile registers
-{$ifdef ver3_0}
-{$if defined(amiga)}
-  movem.l d2/d3/d4/d5/d6/d7/a2/a3/a4/a6,12(a0)    { amiga uses a5 as fp }
-{$else}
-  movem.l d2/d3/d4/d5/d6/d7/a2/a3/a4/a5,12(a0)
-{$endif}
-{$else}
 {$if defined(amiga)}
   movem.l d2-d7/a2-a4/a6,12(a0)    { amiga uses a5 as fp }
 {$else}
   movem.l d2-d7/a2-a5,12(a0)
 {$endif}
-{$endif}
 
 {$if defined(fpu68881) or defined(fpucoldfire)}
   fmove.l   fpcr,d0
@@ -94,19 +86,11 @@ asm
   move.l 8(a0),-(sp)
 
   // Restore registers
-{$ifdef ver3_0}
-{$if defined(amiga)}
-  movem.l 12(a0),d2/d3/d4/d5/d6/d7/a2/a3/a4/a6    { amiga uses a5 as fp }
-{$else}
-  movem.l 12(a0),d2/d3/d4/d5/d6/d7/a2/a3/a4/a5
-{$endif}
-{$else}
 {$if defined(amiga)}
   movem.l 12(a0),d2-d7/a2-a4/a6    { amiga uses a5 as fp }
 {$else}
   movem.l 12(a0),d2-d7/a2-a5
 {$endif}
-{$endif}
 
 {$if defined(fpu68881) or defined(fpucoldfire)}
   move.l 52(a0),d1

+ 0 - 4
rtl/openbsd/i386/si_dll.inc

@@ -16,11 +16,7 @@
 
 {$asmmode att}
 
-{$ifdef VER3_0}
-procedure _init; cdecl; external name '_init';
-{$else VER3_0}
 procedure _init; cdecl; weakexternal name '_init';
-{$endif VER3_0}
 
 procedure _FPC_shared_lib_start; cdecl; public name 'FPC_LIB_START';
   begin

+ 1 - 3
rtl/openbsd/si_impl.inc

@@ -12,9 +12,7 @@
 
  **********************************************************************}
 
-{$IFNDEF VER3_0}
-  {$I openbsd_ident.inc}
-{$ENDIF VER3_0}
+{$I openbsd_ident.inc}
 
 procedure PascalMain; external name 'PASCALMAIN';
 

+ 0 - 4
rtl/openbsd/x86_64/si_dll.inc

@@ -16,11 +16,7 @@
 
 {$asmmode gas}
 
-{$ifdef VER3_0}
-procedure _init; cdecl; external name '_init';
-{$else VER3_0}
 procedure _init; cdecl; weakexternal name '_init';
-{$endif VER3_0}
 
 procedure _FPC_shared_lib_start; cdecl; public name 'FPC_LIB_START';
   begin

+ 0 - 2
rtl/powerpc/int64p.inc

@@ -140,7 +140,6 @@
         mr   R4,R6
       end;
 
-{$ifndef VER3_0}	
 {$define FPC_SYSTEM_HAS_MUL_QWORD}
     function fpc_mul_qword(f1,f2 : qword) : qword;[public,alias: 'FPC_MUL_QWORD']; compilerproc;
       assembler; nostackframe;
@@ -213,4 +212,3 @@
         mullw   r4,r4,r6    // lsw of product of lsw's
         mr      r3,r8       // get msw of product in correct register
       end;
-{$endif VER3_0}