From 5999be1f9043c6bff0bbbad5436b261dce4b6e02 Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 14 Feb 2023 22:38:42 +0100 Subject: [PATCH] pas2js: fixed compileserver compile with fpc 3.2.2 --- utils/pas2js/httpcompiler.pp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/utils/pas2js/httpcompiler.pp b/utils/pas2js/httpcompiler.pp index ba77c3aa94..1193cf065a 100644 --- a/utils/pas2js/httpcompiler.pp +++ b/utils/pas2js/httpcompiler.pp @@ -7,6 +7,9 @@ interface uses {$ifdef unix}baseunix,{$endif} + {$IF FPC_FULLVERSION > 30300} + strutils, + {$ENDIF} sysutils, classes, fpjson, contnrs, syncobjs, fpmimetypes, custhttpapp, inifiles, fpwebproxy, webutil, fpwebfile, httproute, httpdefs, dirwatch, Pas2JSFSCompiler, Pas2JSCompilerCfg, ssockets; @@ -156,8 +159,6 @@ Type Implementation -uses strutils; - { TMySimpleFileModule } procedure TMySimpleFileModule.SendFile(const AFileName: String; AResponse: TResponse); @@ -869,10 +870,14 @@ begin {$IF FPC_FULLVERSION > 30300} TFPWebFileLocationAPIModule.RegisterFileLocationAPI(ExtractWord(1,FAPI,[',']),ExtractWord(2,FAPI,[','])); {$ELSE} - Log(etError,'API support missing, Compile with fpc 3.3.1+'); + Log(etError,'API support missing, compile with fpc 3.3.1+'); {$ENDIF} if FCrossOriginIsolation then + {$IF FPC_FULLVERSION > 30300} TSimpleFileModule.DefaultSimpleFileModuleClass:=TMySimpleFileModule; + {$ELSE} + Log(etError,'CrossOriginIsolation support missing, compile with fpc 3.3.1+'); + {$ENDIF} TSimpleFileModule.RegisterDefaultRoute; if InterfaceAddress<>'' then HTTPHandler.Address:=InterfaceAddress;