diff --git a/rtl/inc/file.inc b/rtl/inc/file.inc index 464fcd7f36..1a54d53f74 100644 --- a/rtl/inc/file.inc +++ b/rtl/inc/file.inc @@ -195,52 +195,84 @@ Procedure BlockWrite(Var f:File;Const Buf;Count:Longint;var Result:Longint);[IOC { Write Count records from Buf to file f, return written records in result } +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); +end; +{$else EXCLUDE_COMPLEX_PROCS} var l : Int64; Begin BlockWrite(f,Buf,Count,l); Result:=longint(l); End; +{$endif EXCLUDE_COMPLEX_PROCS} Procedure BlockWrite(Var f:File;Const Buf;Count:Word;var Result:Word);[IOCheck]; { Write Count records from Buf to file f, return written records in Result } +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); + end; +{$else EXCLUDE_COMPLEX_PROCS} var l : Int64; Begin BlockWrite(f,Buf,Count,l); Result:=word(l); End; +{$endif EXCLUDE_COMPLEX_PROCS} + Procedure BlockWrite(Var f:File;Const Buf;Count:Cardinal;var Result:Cardinal);[IOCheck]; { Write Count records from Buf to file f, return written records in Result } +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); + end; +{$else EXCLUDE_COMPLEX_PROCS} var l : Int64; Begin BlockWrite(f,Buf,Count,l); Result:=l; End; +{$endif EXCLUDE_COMPLEX_PROCS} + Procedure BlockWrite(Var f:File;Const Buf;Count:Word;var Result:Integer);[IOCheck]; { Write Count records from Buf to file f, return written records in Result } +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); + end; +{$else EXCLUDE_COMPLEX_PROCS} var l : Int64; Begin BlockWrite(f,Buf,Count,l); Result:=integer(l); End; +{$endif EXCLUDE_COMPLEX_PROCS} + Procedure BlockWrite(Var f:File;Const Buf;Count:Longint);[IOCheck]; { Write Count records from Buf to file f, if none a Read and Count>0 then InOutRes is set } +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); + end; +{$else EXCLUDE_COMPLEX_PROCS} var Result : Int64; Begin @@ -248,6 +280,8 @@ Begin If (InOutRes=0) and (Result0) Then InOutRes:=101; End; +{$endif EXCLUDE_COMPLEX_PROCS} + Procedure BlockRead(var f:File;var Buf;Count:Int64;var Result:Int64);[IOCheck]; { @@ -272,54 +306,87 @@ Procedure BlockRead(var f:File;var Buf;Count:Longint;var Result:Longint);[IOChec Read Count records from file f ro Buf, return number of read records in Result } +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); + end; +{$else EXCLUDE_COMPLEX_PROCS} var l : int64; Begin BlockRead(f,Buf,Count,l); Result:=longint(l); End; +{$endif EXCLUDE_COMPLEX_PROCS} + Procedure BlockRead(var f:File;var Buf;count:Word;var Result:Word);[IOCheck]; { Read Count records from file f to Buf, return number of read records in Result } +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); + end; +{$else EXCLUDE_COMPLEX_PROCS} var l : int64; Begin BlockRead(f,Buf,Count,l); Result:=word(l); End; +{$endif EXCLUDE_COMPLEX_PROCS} + Procedure BlockRead(var f:File;var Buf;count:Cardinal;var Result:Cardinal);[IOCheck]; { Read Count records from file f to Buf, return number of read records in Result } +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); + end; +{$else EXCLUDE_COMPLEX_PROCS} var l : int64; Begin BlockRead(f,Buf,Count,l); Result:=l; End; +{$endif EXCLUDE_COMPLEX_PROCS} + Procedure BlockRead(var f:File;var Buf;count:Word;var Result:Integer);[IOCheck]; { Read Count records from file f to Buf, return number of read records in Result } +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); + end; +{$else EXCLUDE_COMPLEX_PROCS} var l : int64; Begin BlockRead(f,Buf,Count,l); Result:=integer(l); End; +{$endif EXCLUDE_COMPLEX_PROCS} + Procedure BlockRead(Var f:File;Var Buf;Count:Int64);[IOCheck]; { Read Count records from file f to Buf, if none are read and Count>0 then InOutRes is set } +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); + end; +{$else EXCLUDE_COMPLEX_PROCS} var Result : int64; Begin @@ -327,6 +394,7 @@ Begin If (InOutRes=0) and (Result0) Then InOutRes:=100; End; +{$endif EXCLUDE_COMPLEX_PROCS} Function FilePos(var f:File):Int64;[IOCheck]; diff --git a/rtl/inc/generic.inc b/rtl/inc/generic.inc index 1b5eb8c296..32379c5dfa 100644 --- a/rtl/inc/generic.inc +++ b/rtl/inc/generic.inc @@ -2133,6 +2133,11 @@ end; {$ifndef FPC_SYSTEM_HAS_INT_STR_INT64} procedure int_str(l:int64;out s:shortstring); +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); +end; +{$else EXCLUDE_COMPLEX_PROCS} var m,m1 : qword; pcstart, @@ -2170,12 +2175,18 @@ begin end; s[0]:=char(pc2-pc2start); end; +{$endif EXCLUDE_COMPLEX_PROCS} {$endif ndef FPC_SYSTEM_HAS_INT_STR_INT64} {$ifndef FPC_SYSTEM_HAS_INT_STR_QWORD} procedure int_str_unsigned(l:qword;out s:shortstring); +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); +end; +{$else EXCLUDE_COMPLEX_PROCS} var m1 : qword; pcstart, @@ -2205,6 +2216,7 @@ begin end; s[0]:=char(pc2-pc2start); end; +{$endif EXCLUDE_COMPLEX_PROCS} {$endif ndef FPC_SYSTEM_HAS_INT_STR_QWORD} diff --git a/rtl/inc/int64.inc b/rtl/inc/int64.inc index ff2eeee582..384aaa0ae2 100644 --- a/rtl/inc/int64.inc +++ b/rtl/inc/int64.inc @@ -375,8 +375,15 @@ function fpc_mul_int64_compilerproc(f1,f2 : int64;checkoverflow : longbool) : int64; external name 'FPC_MUL_INT64'; function fpc_mul_longint_to_int64(f1,f2 : longint) : int64;[public,alias: 'FPC_MUL_LONGINT_TO_INT64']; compilerproc; +{$ifdef EXCLUDE_COMPLEX_PROCS} + begin + runerror(217); + end; +{$else EXCLUDE_COMPLEX_PROCS} begin fpc_mul_longint_to_int64:=fpc_mul_int64_compilerproc(f1,f2,false); end; +{$endif EXCLUDE_COMPLEX_PROCS} + {$endif FPC_SYSTEM_HAS_MUL_LONGINT_TO_INT64} diff --git a/rtl/inc/sstrings.inc b/rtl/inc/sstrings.inc index 21fc053b6b..348d9852f0 100644 --- a/rtl/inc/sstrings.inc +++ b/rtl/inc/sstrings.inc @@ -873,6 +873,11 @@ end; {$ifndef CPU64} procedure fpc_chararray_qword(v : qword;len : SizeInt;out a : array of char);compilerproc; +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(219); +end; +{$else EXCLUDE_COMPLEX_PROCS} var ss : shortstring; maxlen : SizeInt; @@ -886,9 +891,15 @@ begin maxlen:=high(a)+1; fpc_shortstr_chararray_intern_charmove(ss,a,maxlen); end; +{$endif EXCLUDE_COMPLEX_PROCS} procedure fpc_chararray_int64(v : int64;len : SizeInt;out a : array of char);compilerproc; +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(219); +end; +{$else EXCLUDE_COMPLEX_PROCS} var ss : shortstring; maxlen : SizeInt; @@ -902,6 +913,7 @@ begin maxlen:=high(a)+1; fpc_shortstr_chararray_intern_charmove(ss,a,maxlen); end; +{$endif EXCLUDE_COMPLEX_PROCS} {$endif CPU64} @@ -1029,6 +1041,11 @@ end; {$ifndef FPC_HAS_CHARARRAY_CURRENCY} {$define FPC_HAS_CHARARRAY_CURRENCY} procedure fpc_chararray_Currency(c : Currency;len,fr : SizeInt;out a : array of char);compilerproc; +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); +end; +{$else EXCLUDE_COMPLEX_PROCS} var ss : shortstring; maxlen : SizeInt; @@ -1040,6 +1057,7 @@ begin maxlen:=high(a)+1; fpc_shortstr_chararray_intern_charmove(ss,a,maxlen); end; +{$endif EXCLUDE_COMPLEX_PROCS} {$endif FPC_HAS_STR_CURRENCY} {***************************************************************************** @@ -1956,6 +1974,11 @@ function fpc_val_enum_shortstr(str2ordindex:pointer;const s:shortstring;out code {$endif FPC_STR_ENUM_INTERN} function fpc_Val_Currency_ShortStr(const s : shortstring; out Code : ValSInt): currency; [public, alias:'FPC_VAL_CURRENCY_SHORTSTR']; compilerproc; +{$ifdef EXCLUDE_COMPLEX_PROCS} +begin + runerror(217); +end; +{$else EXCLUDE_COMPLEX_PROCS} const MaxInt64 : Int64 = $7FFFFFFFFFFFFFFF; Int64Edge : Int64 = ($7FFFFFFFFFFFFFFF - 10) div 10; @@ -2088,6 +2111,7 @@ begin fpc_Val_Currency_ShortStr:=PCurrency(@res[0])^; Code:=0; end; +{$endif EXCLUDE_COMPLEX_PROCS} {$ifndef FPC_HAS_SETSTRING_SHORTSTR} diff --git a/rtl/inc/text.inc b/rtl/inc/text.inc index 6400d587ec..6ee5e1bd48 100644 --- a/rtl/inc/text.inc +++ b/rtl/inc/text.inc @@ -1235,6 +1235,11 @@ end; {$ifdef FPC_HAS_STR_CURRENCY} Procedure fpc_Write_Text_Currency(fixkomma,Len : Longint;var t : Text;c : Currency); iocheck; compilerproc; +{$ifdef EXCLUDE_COMPLEX_PROCS} + begin + runerror(217); + end; +{$else EXCLUDE_COMPLEX_PROCS} var s : String; Begin @@ -1243,6 +1248,8 @@ Begin str(c:Len:fixkomma,s); Write_Str(Len,t,s); End; +{$endif EXCLUDE_COMPLEX_PROCS} + {$endif FPC_HAS_STR_CURRENCY} Procedure fpc_Write_Text_Boolean(Len : Longint;var t : Text;b : Boolean); iocheck; compilerproc;