* patches from Attila Borka. Mantis 12373. One minor addition.

git-svn-id: trunk@11927 -
This commit is contained in:
marco 2008-10-18 17:57:23 +00:00
parent 99a8b98d40
commit 7ecb64fc15
10 changed files with 209 additions and 109 deletions

View File

@ -1,5 +1,5 @@
#
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/06/15]
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/10/12]
#
default: all
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
@ -115,6 +115,10 @@ FPC:=$(shell $(FPCPROG) -PB)
endif
ifneq ($(findstring Error,$(FPC)),)
override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
else
ifeq ($(strip $(wildcard $(FPC))),)
FPC:=$(firstword $(FPCPROG))
endif
endif
else
override FPC=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
@ -261,178 +265,178 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(F
override PACKAGE_NAME=fcl-web
override PACKAGE_VERSION=2.0.0
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-go32v2)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-win32)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-os2)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-freebsd)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-beos)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-haiku)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-solaris)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-qnx)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-netware)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-openbsd)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-wdosx)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-darwin)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-emx)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-watcom)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-wince)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-embedded)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-symbian)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),m68k-amiga)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),m68k-atari)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),m68k-palmos)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),m68k-embedded)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),powerpc-linux)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),powerpc-amiga)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),powerpc-macos)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),sparc-solaris)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),sparc-embedded)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),x86_64-linux)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),x86_64-darwin)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),x86_64-win64)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),arm-linux)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),arm-palmos)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),arm-darwin)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),arm-wince)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),arm-gba)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),arm-nds)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),arm-embedded)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),arm-symbian)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),powerpc64-darwin)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),avr-embedded)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),armeb-linux)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi
override TARGET_UNITS+=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb webutil fpdatasetform cgiapp ezcgi fpapache
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_RSTS+=fpcgi fphtml fpweb websession cgiapp

View File

@ -8,7 +8,7 @@ version=2.0.0
[target]
units=httpdefs fphttp custcgi fpcgi fptemplate fphtml websession fpweb \
webutil fpdatasetform cgiapp ezcgi
webutil fpdatasetform cgiapp ezcgi fpapache
rsts=fpcgi fphtml fpweb websession cgiapp
[require]

View File

@ -160,5 +160,5 @@ template tag with the ~Column1, ~Column2 for the HEADER parameter, and the
~Column1Value, ~Column2Value in the ONEROW parameter while looping through a
sql query result set.
Or if there is nothing to list, just use the NOTFOUND parameter as a replace
text for the whole RESULT template tag.
text for the whole REPORTRESULT template tag.

View File

@ -12,7 +12,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$define CGIDEBUG}
{ $define CGIDEBUG}
{$mode objfpc}
{$H+}
@ -222,7 +222,15 @@ end;
Function TCustomCGIApplication.GetTempCGIFileName : String;
begin
Result:=GetTempFileName('/tmp/','CGI')
//Result:=GetTempFileName('/tmp/','CGI') {Hard coded path no good for all OS-es}
{
GetTempDir returns the OS temporary directory if possible, or from the
environment variable TEMP . For CGI programs you need to pass global environment
variables, it is not automatic. For example in the Apache httpd.conf with a
"PassEnv TEMP" or "SetEnv TEMP /pathtotmpdir" line so the web server passes this
global environment variable to the CGI programs' local environment variables.
}
Result := GetTempFileName(GetTempDir, 'CGI');
end;
Procedure TCustomCGIApplication.DeleteFormFiles;

View File

@ -17,7 +17,8 @@ unit fpapache;
interface
uses SysUtils,Classes,CustApp,httpDefs,fpHTTP,httpd, apr;
uses
SysUtils,Classes,CustApp,httpDefs,fpHTTP,httpd, apr, SyncObjs;
Type
@ -69,6 +70,10 @@ Type
TCustomApacheApplication = Class(TCustomApplication)
private
FMaxRequests: Integer; //Maximum number of simultaneous web module requests (default=64, if set to zero no limit)
FWorkingWebModules: TList; //List of currently running web modules handling requests
FIdleWebModules: TList; //List of idle web modules available
FCriticalSection: TCriticalSection;
FAdministrator: String;
FBaseLocation: String;
FBeforeRequest: TBeforeRequestEvent;
@ -83,6 +88,8 @@ Type
function GetModules(Index: integer): TStrings;
procedure SetModules(Index: integer; const AValue: TStrings);
procedure ShowRequestException(R: TResponse; E: Exception);
function GetIdleModuleCount : Integer;
function GetWorkingModuleCount : Integer;
Protected
Function ProcessRequest(P : PRequest_Rec) : Integer; virtual;
Function GetModuleName(ARequest : TRequest) : string;
@ -91,6 +98,7 @@ Type
Function AllowRequest(P : PRequest_Rec) : Boolean; virtual;
Public
Constructor Create(AOwner : TComponent); override;
Destructor Destroy; override;
Procedure SetModuleRecord(Var ModuleRecord : Module);
Procedure Initialize; override;
Procedure ShowException(E : Exception); override;
@ -107,6 +115,9 @@ Type
Property BeforeRequest : TBeforeRequestEvent Read FBeforeRequest Write FBeforeRequest;
Property Email : String Read FEmail Write FEmail;
Property Administrator : String Read FAdministrator Write FAdministrator;
Property MaxRequests: Integer read FMaxRequests write FMaxRequests;
Property IdleWebModuleCount: Integer read GetIdleModuleCount;
Property WorkingWebModuleCount: Integer read GetWorkingModuleCount;
end;
TApacheApplication = Class(TCustomApacheApplication)
@ -118,6 +129,9 @@ Type
Property OnGetModule;
Property BaseLocation;
Property ModuleName;
Property MaxRequests;
Property IdleWebModuleCount;
Property WorkingWebModuleCount;
end;
@ -135,6 +149,7 @@ resourcestring
SErrNoModuleForRequest = 'Could not determine HTTP module for request "%s"';
SErrNoModuleRecord = 'No module record location set.';
SErrNoModuleName = 'No module name set';
SErrTooManyRequests = 'Too many simultaneous requests.';
SModuleError = 'Module Error';
SAppEncounteredError = 'The application encountered the following error:';
SError = 'Error: ';
@ -166,7 +181,7 @@ Function DefaultApacheHandler(P : PRequest_Rec) : integer;cdecl;
begin
If (AlternateHandler<>Nil) then
Result:=AlterNateHandler(P)
Result:=AlternateHandler(P)
else
If Application.AllowRequest(P) then
Result:=Application.ProcessRequest(P)
@ -218,6 +233,8 @@ begin
Resp:=TApacheResponse.CreateApache(Req);
Try
HandleRequest(Req,Resp);
If Not Resp.ContentSent then
Resp.SendContent;
Finally
Result:=OK;
Resp.Free;
@ -228,9 +245,8 @@ begin
end;
function TCustomApacheApplication.GetModuleName(Arequest: TRequest): string;
begin
if (Pos('/', pchar(@ARequest.PathInfo[2])) <= 0) and AllowDefaultModule then Exit;//There is only 1 '/' in ARequest.PathInfo -> only ActionName is there -> use default module
Result:=ARequest.GetNextPathInfo;
end;
@ -271,8 +287,26 @@ begin
inherited Create(AOwner);
FAllowDefaultModule:=True;
FPriority:=hpMiddle;
FMaxRequests:=64;
FWorkingWebModules:=TList.Create;
FIdleWebModules:=TList.Create;
FCriticalSection:=TCriticalSection.Create;
end;
destructor TCustomApacheApplication.Destroy;
var I:Integer;
begin
FCriticalSection.Free;
for I := FIdleWebModules.Count - 1 downto 0 do
TComponent(FIdleWebModules[I]).Free;
FIdleWebModules.Free;
for I := FWorkingWebModules.Count - 1 downto 0 do
TComponent(FWorkingWebModules[I]).Free;
FWorkingWebModules.Free;
inherited Destroy;
end;
procedure TCustomApacheApplication.SetModuleRecord(var ModuleRecord: Module);
begin
FModuleRecord:=@ModuleRecord;
@ -350,6 +384,26 @@ begin
Reference:=AClass.Create(Self);
end;
function TCustomApacheApplication.GetIdleModuleCount : Integer;
begin
FCriticalSection.Enter;
try
Result := FIdleWebModules.Count;
finally
FCriticalSection.Leave;
end;
end;
function TCustomApacheApplication.GetWorkingModuleCount : Integer;
begin
FCriticalSection.Enter;
try
Result := FWorkingWebModules.Count;
finally
FCriticalSection.Leave;
end;
end;
procedure TCustomApacheApplication.HandleRequest(ARequest: TRequest; AResponse: TResponse);
Var
@ -357,14 +411,44 @@ Var
M : TCustomHTTPModule;
MN : String;
MI : TModuleItem;
Procedure GetAWebModule;
Var II:Integer;
begin
FCriticalSection.Enter;
try
if (FMaxRequests>0) and (FWorkingWebModules.Count>=FMaxRequests) then
Raise EFPApacheError.Create(SErrTooManyRequests);
if (FIdleWebModules.Count>0) then
begin
II := FIdleWebModules.Count - 1;
while (II>=0) and not (TComponent(FIdleWebModules[II]) is MC) do
Dec(II);
if (II>=0) then
begin
M:=TCustomHTTPModule(FIdleWebModules[II]);
FIdleWebModules.Delete(II);
end;
end;
if (M=nil) then
begin
M:=MC.Create(Self);
M.Name := '';
end;
FWorkingWebModules.Add(M);
finally
FCriticalSection.Leave;
end;
end;
begin
try
MC:=Nil;
M := Nil;
If (OnGetModule<>Nil) then
OnGetModule(Self,ARequest,MC);
If (MC=Nil) then
begin
begin
MN:=GetModuleName(ARequest);
If (MN='') and Not AllowDefaultModule then
Raise EFPApacheError.Create(SErrNoModuleNameForRequest);
@ -372,20 +456,20 @@ begin
If (MI=Nil) and (ModuleFactory.Count=1) then
MI:=ModuleFactory[0];
if (MI=Nil) then
begin
Raise EFPApacheError.CreateFmt(SErrNoModuleForRequest,[MN]);
end;
MC:=MI.ModuleClass;
end;
M:=FindModule(MC); // Check if a module exists already
If (M=Nil) then
begin
If MC.UseStreaming then
M:=MC.Create(Self)
else
M:=MC.CreateNew(Self,0);
end;
end;
GetAWebModule;
M.HandleRequest(ARequest,AResponse);
FCriticalSection.Enter;
try
FWorkingWebModules.Remove(M);
FIdleWebModules.Add(M);
finally
FCriticalSection.Leave;
end;
except
On E : Exception do
ShowRequestException(AResponse,E);
@ -576,8 +660,15 @@ begin
Inherited Create(Req);
end;
function __dummythread(p: pointer): ptrint;
begin
//empty
end;
Initialization
BeginThread(@__dummythread);//crash prevention for simultaneous requests
sleep(300);
InitApache;
Finalization

View File

@ -75,18 +75,12 @@ end;
function TCGIApplication.GetModuleName(Arequest: TRequest): string;
Var
S : String;
begin
If (FModuleVar<>'') then
Result:=ARequest.QueryFields.Values[FModuleVar];//Module name from query parameter using the FModuleVar as parameter name (default is 'Module')
If (Result='') then
begin
S:=ARequest.PathInfo;
Delete(S,1,1);
if (Pos('/',S) <= 0) and AllowDefaultModule then
Exit;//There is only 1 '/' in ARequest.PathInfo -> only ActionName is there -> use default module
if (Pos('/', pchar(@ARequest.PathInfo[2])) <= 0) and AllowDefaultModule then Exit;//There is only 1 '/' in ARequest.PathInfo -> only ActionName is there -> use default module
Result:=ARequest.GetNextPathInfo;
end;
end;
@ -129,7 +123,7 @@ Var
begin
MC:=Nil;
M:=Nil;
M:=NIL;
If (OnGetModule<>Nil) then
OnGetModule(Self,ARequest,MC);
If (MC=Nil) then
@ -148,12 +142,7 @@ begin
end;
M:=FindModule(MC); // Check if a module exists already
If (M=Nil) then
begin
If MC.UseStreaming then
M:=MC.Create(Self)
else
M:=MC.CreateNew(Self,0);
end;
M:=MC.Create(Self);
M.HandleRequest(ARequest,AResponse);
end;

View File

@ -94,7 +94,6 @@ Type
TCustomHTTPModule = Class(TDataModule)
public
Class Function UseStreaming : Boolean; virtual;
Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); virtual; abstract;
end;
@ -408,14 +407,6 @@ begin
Dec(Result);
end;
{ TCustomHTTPModule }
Class Function TCustomHTTPModule.UseStreaming : Boolean;
begin
Result:=True;
end;
Initialization
ModuleFactory:=TModuleFactory.Create(TModuleItem);

View File

@ -109,7 +109,6 @@ Type
procedure SetActionVar(const AValue: String);
procedure SetOnGetAction(const AValue: TGetActionEvent);
procedure SetTemplate(const AValue: TFPTemplate);
Protected
Procedure DoBeforeRequest(ARequest : TRequest); virtual;
Procedure DoAfterResponse(AResponse : TResponse); virtual;
@ -146,7 +145,7 @@ Type
Property OnNewSession;
Property OnSessionExpired;
end;
EFPWebError = Class(HTTPError);
resourcestring
@ -160,6 +159,9 @@ implementation
uses dbugintf;
{$endif cgidebug}
{ TFPWebAction }
procedure TFPWebAction.GetContent(ARequest: TRequest; Content: TStream; Var Handled : Boolean);
begin

View File

@ -663,9 +663,9 @@ end;
destructor THttpHeader.Destroy;
begin
FreeAndNil(FCookieFields);
FreeAndNil(FQueryFields);
FreeAndNil(FContentFields);
FreeAndNil(FQueryFields);
FreeAndNil(FCookieFields);
inherited Destroy;
end;
@ -893,10 +893,16 @@ Var
begin
P:=PathInfo;
if (P <> '') and (P[length(P)] = '/') then
Delete(P, length(P), 1);//last char is '/'
If (P<>'') and (P[1]='/') then
Delete(P,1,1);
Delete(P,1,Length(FReturnedPathInfo));
I:=Pos('/',P);
If (I>0) then
begin//only if there was a module name, otherwise only the action name is there
Delete(P,1,Length(FReturnedPathInfo));
I:=Pos('/',P);
end;
If (I=0) then
I:=Length(P)+1;
Result:=Copy(P,1,I-1);
@ -1049,6 +1055,14 @@ end;
function TRequest.GetTempUploadFileName: String;
begin
//Result:=GetTempFileName('/tmp/','CGI') {Hard coded path no good for all OS-es}
{
GetTempDir returns the OS temporary directory if possible, or from the
environment variable TEMP . For CGI programs you need to pass global environment
variables, it is not automatic. For example in the Apache httpd.conf with a
"PassEnv TEMP" or "SetEnv TEMP /pathtotmpdir" line so the web server passes this
global environment variable to the CGI programs' local environment variables.
}
Result := GetTempFileName(GetTempDir, 'CGI');
end;
@ -1239,6 +1253,7 @@ end;
destructor TResponse.destroy;
begin
FreeAndNil(FCookies);
FreeAndNil(FContents);
inherited destroy;
end;

View File

@ -14,7 +14,7 @@
unit websession;
{$mode objfpc}{$H+}
{$define cgidebug}
{ $define cgidebug}
interface
uses