mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 12:29:08 +02:00
Fixed apache 1.3 compilation and windows defines.
git-svn-id: trunk@4887 -
This commit is contained in:
parent
982fa40caa
commit
acebe35bba
@ -1,131 +1,484 @@
|
||||
{*******************************************************************
|
||||
* Test library of the Apache Pascal Headers
|
||||
*******************************************************************}
|
||||
library mod_hello;
|
||||
|
||||
{$i define.inc}
|
||||
|
||||
uses SysUtils, httpd {$ifndef Apache1_3}, apr{$endif};
|
||||
|
||||
var
|
||||
test_module: module; {$ifdef Unix} public name 'test_module'; {$endif}
|
||||
|
||||
const
|
||||
MODULE_NAME = 'mod_hello.so';
|
||||
|
||||
{*******************************************************************
|
||||
* Free Pascal only supports exporting variables on Windows
|
||||
*******************************************************************}
|
||||
{$ifdef WINDOWS}
|
||||
exports
|
||||
test_module name 'test_module';
|
||||
{$endif}
|
||||
|
||||
{*******************************************************************
|
||||
* Handles apache requests
|
||||
*******************************************************************}
|
||||
function DefaultHandler(r: Prequest_rec): Integer; cdecl;
|
||||
var
|
||||
RequestedHandler: string;
|
||||
begin
|
||||
RequestedHandler := r^.handler;
|
||||
|
||||
{ We decline to handle a request if hello-handler is not the value of r->handler }
|
||||
if not SameText(RequestedHandler, 'testapache-handler') then
|
||||
begin
|
||||
Result := DECLINED;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
{ The following line just prints a message to the errorlog }
|
||||
ap_log_error(MODULE_NAME, 54, APLOG_NOERRNO or APLOG_NOTICE,
|
||||
{$ifndef Apache1_3}0,{$endif} r^.server,
|
||||
'mod_hello: %s', [PChar('Before content is output')]);
|
||||
|
||||
{ We set the content type before doing anything else }
|
||||
{$ifdef Apache1_3}
|
||||
r^.content_type := 'text/html';
|
||||
ap_send_http_header(r);
|
||||
{$else}
|
||||
ap_set_content_type(r, 'text/html');
|
||||
{$endif}
|
||||
|
||||
{ If the request is for a header only, and not a request for
|
||||
the whole content, then return OK now. We don't have to do
|
||||
anything else. }
|
||||
if (r^.header_only <> 0) then
|
||||
begin
|
||||
Result := OK;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
{ Now we just print the contents of the document using the
|
||||
ap_rputs and ap_rprintf functions. More information about
|
||||
the use of these can be found in http_protocol.inc }
|
||||
ap_rputs(DOCTYPE_HTML_4_0T, r);
|
||||
ap_rputs('<HTML>' + LineEnding, r);
|
||||
ap_rputs('<HEAD>' + LineEnding, r);
|
||||
ap_rputs('<TITLE>Hello There</TITLE>' + LineEnding, r);
|
||||
ap_rputs('</HEAD>' + LineEnding, r);
|
||||
ap_rputs('<BODY BGCOLOR="#FFFFFF">' + LineEnding ,r);
|
||||
ap_rputs('<H1>Hello world</H1>' + LineEnding, r);
|
||||
ap_rputs('This is the first Apache Module working with the new binding from Free Pascal' + LineEnding, r);
|
||||
ap_rprintf(r, '<br>A sample line generated by %s <br>' + LineEnding, [PChar('ap_rprintf')]);
|
||||
ap_rputs('</BODY></HTML>' + LineEnding, r);
|
||||
|
||||
{ We can either return OK or DECLINED at this point. If we return
|
||||
* OK, then no other modules will attempt to process this request }
|
||||
Result := OK;
|
||||
end;
|
||||
|
||||
{*******************************************************************
|
||||
* Registers the hooks
|
||||
*******************************************************************}
|
||||
{$ifdef apache1_3}
|
||||
|
||||
procedure hw_init(s: PServer_rec; p: PPool); cdecl;
|
||||
begin
|
||||
end;
|
||||
|
||||
var
|
||||
hw_handlers: array[0..1] of handler_rec =
|
||||
(
|
||||
(content_type: 'testapache-handler'; handler: @DefaultHandler),
|
||||
(content_type: nil; handler: nil)
|
||||
);
|
||||
|
||||
{$else}
|
||||
|
||||
procedure RegisterHooks(p: Papr_pool_t); cdecl;
|
||||
begin
|
||||
ap_hook_handler(@DefaultHandler, nil, nil, APR_HOOK_MIDDLE);
|
||||
end;
|
||||
|
||||
{$endif}
|
||||
|
||||
{*******************************************************************
|
||||
* Library initialization code
|
||||
*******************************************************************}
|
||||
begin
|
||||
FillChar(test_module, SizeOf(test_module), 0);
|
||||
|
||||
{$ifdef apache1_3}
|
||||
STANDARD_MODULE_STUFF(test_module);
|
||||
|
||||
with test_module do
|
||||
begin
|
||||
name := MODULE_NAME;
|
||||
init := @hw_init;
|
||||
handlers := hw_handlers;
|
||||
end;
|
||||
{$else}
|
||||
STANDARD20_MODULE_STUFF(test_module);
|
||||
|
||||
with test_module do
|
||||
begin
|
||||
name := MODULE_NAME;
|
||||
register_hooks := @RegisterHooks;
|
||||
end;
|
||||
{$endif}
|
||||
end.
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="5"/>
|
||||
<General>
|
||||
<MainUnit Value="0"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
<ActiveEditorIndexAtStart Value="10"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<UseVersionInfo Value="False"/>
|
||||
<AutoIncrementBuild Value="False"/>
|
||||
<CurrentVersionNr Value="0"/>
|
||||
<CurrentMajorRevNr Value="0"/>
|
||||
<CurrentMinorRevNr Value="0"/>
|
||||
<CurrentBuildNr Value="0"/>
|
||||
<ProjectVersion Value=""/>
|
||||
<Language Value=""/>
|
||||
<CharSet Value=""/>
|
||||
<Comments Value=""/>
|
||||
<CompanyName Value=""/>
|
||||
<FileDescription Value=""/>
|
||||
<InternalName Value=""/>
|
||||
<LegalCopyright Value=""/>
|
||||
<LegalTrademarks Value=""/>
|
||||
<OriginalFilename Value=""/>
|
||||
<ProductName Value=""/>
|
||||
</VersionInfo>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<Units Count="37">
|
||||
<Unit0>
|
||||
<Filename Value="mod_hello.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="mod_hello"/>
|
||||
<CursorPos X="19" Y="8"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="mod_hello.pp"/>
|
||||
<UnitName Value="mod_hello"/>
|
||||
<CursorPos X="7" Y="4"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="..\httpd-1.3\httpd.pas"/>
|
||||
<UnitName Value="httpd"/>
|
||||
<CursorPos X="6" Y="23"/>
|
||||
<TopLine Value="19"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="define.inc"/>
|
||||
<CursorPos X="8" Y="16"/>
|
||||
<TopLine Value="12"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="..\httpd-1.3\ap.inc"/>
|
||||
<CursorPos X="10" Y="40"/>
|
||||
<TopLine Value="25"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="..\httpd-1.3\ap_alloc.inc"/>
|
||||
<CursorPos X="9" Y="397"/>
|
||||
<TopLine Value="382"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="..\httpd-1.3\ap_config.inc"/>
|
||||
<CursorPos X="31" Y="1185"/>
|
||||
<TopLine Value="1170"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="..\httpd-1.3\ap_mmn.inc"/>
|
||||
<CursorPos X="54" Y="95"/>
|
||||
<TopLine Value="80"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="..\httpd-1.3\buff.inc"/>
|
||||
<CursorPos X="21" Y="227"/>
|
||||
<TopLine Value="204"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="..\httpd-1.3\hsregex.inc"/>
|
||||
<CursorPos X="8" Y="8"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="..\httpd-1.3\httpd.inc"/>
|
||||
<CursorPos X="16" Y="1132"/>
|
||||
<TopLine Value="1117"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="..\httpd-1.3\http_core.inc"/>
|
||||
<CursorPos X="16" Y="330"/>
|
||||
<TopLine Value="315"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="..\httpd-1.3\http_log.inc"/>
|
||||
<CursorPos X="9" Y="50"/>
|
||||
<TopLine Value="35"/>
|
||||
<EditorIndex Value="9"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="..\httpd-1.3\readdir.inc"/>
|
||||
<CursorPos X="18" Y="41"/>
|
||||
<TopLine Value="28"/>
|
||||
<EditorIndex Value="10"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="..\httpd-1.3\win32_os.inc"/>
|
||||
<CursorPos X="15" Y="44"/>
|
||||
<TopLine Value="20"/>
|
||||
<EditorIndex Value="11"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="..\httpd-2.0\httpd.pas"/>
|
||||
<UnitName Value="httpd"/>
|
||||
<CursorPos X="9" Y="34"/>
|
||||
<TopLine Value="19"/>
|
||||
<EditorIndex Value="12"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="..\httpd-2.0\ap_config.inc"/>
|
||||
<CursorPos X="14" Y="227"/>
|
||||
<TopLine Value="212"/>
|
||||
<EditorIndex Value="13"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="..\httpd-2.0\ap_mmn.inc"/>
|
||||
<CursorPos X="60" Y="80"/>
|
||||
<TopLine Value="65"/>
|
||||
<EditorIndex Value="14"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="..\httpd-2.0\httpd.inc"/>
|
||||
<CursorPos X="58" Y="1457"/>
|
||||
<TopLine Value="1442"/>
|
||||
<EditorIndex Value="15"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="..\httpd-2.0\apr\apr.pas"/>
|
||||
<UnitName Value="apr"/>
|
||||
<CursorPos X="9" Y="36"/>
|
||||
<TopLine Value="21"/>
|
||||
<EditorIndex Value="16"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="..\httpd-2.0\apr\apr_errno.inc"/>
|
||||
<CursorPos X="9" Y="274"/>
|
||||
<TopLine Value="259"/>
|
||||
<EditorIndex Value="17"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="..\httpd-2.0\apr\apr_user.inc"/>
|
||||
<CursorPos X="9" Y="186"/>
|
||||
<TopLine Value="167"/>
|
||||
<EditorIndex Value="18"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="..\httpd-2.0\apr\apr_thread_proc.inc"/>
|
||||
<CursorPos X="21" Y="134"/>
|
||||
<TopLine Value="119"/>
|
||||
<EditorIndex Value="19"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
<Filename Value="..\httpd-2.0\apr\apr_general.inc"/>
|
||||
<CursorPos X="59" Y="167"/>
|
||||
<TopLine Value="152"/>
|
||||
<EditorIndex Value="20"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
<Filename Value="..\httpd-2.0\apr\apr_file_info.inc"/>
|
||||
<CursorPos X="72" Y="325"/>
|
||||
<TopLine Value="310"/>
|
||||
<EditorIndex Value="21"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
<Filename Value="..\httpd-2.0\apriconv\apriconv.pas"/>
|
||||
<UnitName Value="apriconv"/>
|
||||
<CursorPos X="9" Y="36"/>
|
||||
<TopLine Value="21"/>
|
||||
<EditorIndex Value="22"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit25>
|
||||
<Unit26>
|
||||
<Filename Value="..\httpd-2.0\apriconv\apr_iconv.inc"/>
|
||||
<CursorPos X="16" Y="49"/>
|
||||
<TopLine Value="34"/>
|
||||
<EditorIndex Value="23"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit26>
|
||||
<Unit27>
|
||||
<Filename Value="..\httpd-2.0\aprutil\aprutil.pas"/>
|
||||
<UnitName Value="aprutil"/>
|
||||
<CursorPos X="9" Y="36"/>
|
||||
<TopLine Value="21"/>
|
||||
<EditorIndex Value="24"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit27>
|
||||
<Unit28>
|
||||
<Filename Value="..\httpd-2.2\httpd.pas"/>
|
||||
<UnitName Value="httpd"/>
|
||||
<CursorPos X="9" Y="34"/>
|
||||
<TopLine Value="19"/>
|
||||
<EditorIndex Value="25"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit28>
|
||||
<Unit29>
|
||||
<Filename Value="..\httpd-2.2\ap_config.inc"/>
|
||||
<CursorPos X="14" Y="227"/>
|
||||
<TopLine Value="212"/>
|
||||
<EditorIndex Value="26"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit29>
|
||||
<Unit30>
|
||||
<Filename Value="..\httpd-2.2\apr\apr_file_info.inc"/>
|
||||
<CursorPos X="14" Y="122"/>
|
||||
<TopLine Value="107"/>
|
||||
<EditorIndex Value="27"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit30>
|
||||
<Unit31>
|
||||
<Filename Value="..\httpd-2.2\apr\apr_user.inc"/>
|
||||
<CursorPos X="16" Y="154"/>
|
||||
<TopLine Value="131"/>
|
||||
<EditorIndex Value="29"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit31>
|
||||
<Unit32>
|
||||
<Filename Value="..\httpd-2.2\apriconv\apriconv.pas"/>
|
||||
<UnitName Value="apriconv"/>
|
||||
<CursorPos X="9" Y="36"/>
|
||||
<TopLine Value="21"/>
|
||||
<EditorIndex Value="30"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit32>
|
||||
<Unit33>
|
||||
<Filename Value="..\httpd-2.2\aprutil\aprutil.pas"/>
|
||||
<UnitName Value="aprutil"/>
|
||||
<CursorPos X="9" Y="36"/>
|
||||
<TopLine Value="21"/>
|
||||
<EditorIndex Value="31"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit33>
|
||||
<Unit34>
|
||||
<Filename Value="..\httpd-2.2\apriconv\apr_iconv.inc"/>
|
||||
<CursorPos X="16" Y="49"/>
|
||||
<TopLine Value="34"/>
|
||||
<EditorIndex Value="32"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit34>
|
||||
<Unit35>
|
||||
<Filename Value="..\httpd-2.2\apr\apr_thread_proc.inc"/>
|
||||
<CursorPos X="21" Y="134"/>
|
||||
<TopLine Value="119"/>
|
||||
<EditorIndex Value="33"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit35>
|
||||
<Unit36>
|
||||
<Filename Value="..\httpd-2.2\apr\apr.pas"/>
|
||||
<UnitName Value="apr"/>
|
||||
<CursorPos X="9" Y="36"/>
|
||||
<TopLine Value="21"/>
|
||||
<EditorIndex Value="28"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit36>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="..\httpd-2.0\apr\apr_thread_proc.inc"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="..\httpd-2.0\apr\apr_general.inc"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="..\httpd-2.0\apr\apr_file_info.inc"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="..\httpd-2.0\apriconv\apriconv.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="..\httpd-2.0\apriconv\apr_iconv.inc"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="..\httpd-2.0\aprutil\aprutil.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="..\httpd-2.0\aprutil\aprutil.pas"/>
|
||||
<Caret Line="36" Column="9" TopLine="21"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="..\httpd-2.2\httpd.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="..\httpd-2.2\ap_config.inc"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="..\httpd-2.2\ap_config.inc"/>
|
||||
<Caret Line="54" Column="16" TopLine="39"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="..\httpd-2.2\ap_config.inc"/>
|
||||
<Caret Line="101" Column="14" TopLine="86"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="..\httpd-2.2\ap_config.inc"/>
|
||||
<Caret Line="111" Column="14" TopLine="96"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="..\httpd-2.2\apr\apr_file_info.inc"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="..\httpd-2.2\apr\apr_user.inc"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="..\httpd-2.2\apr\apr_user.inc"/>
|
||||
<Caret Line="46" Column="16" TopLine="53"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="..\httpd-2.2\apr\apr_user.inc"/>
|
||||
<Caret Line="115" Column="16" TopLine="112"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="..\httpd-2.2\apriconv\apriconv.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="..\httpd-2.2\aprutil\aprutil.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="..\httpd-2.2\apriconv\apr_iconv.inc"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="..\httpd-2.2\apr\apr_thread_proc.inc"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="..\httpd-2.2\apr\apr_file_info.inc"/>
|
||||
<Caret Line="122" Column="21" TopLine="107"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="..\httpd-2.2\apr\apr.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="..\httpd-2.2\httpd.pas"/>
|
||||
<Caret Line="34" Column="9" TopLine="19"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="..\httpd-2.0\aprutil\aprutil.pas"/>
|
||||
<Caret Line="36" Column="9" TopLine="21"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="..\httpd-2.0\apriconv\apriconv.pas"/>
|
||||
<Caret Line="36" Column="9" TopLine="21"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="..\httpd-2.0\apr\apr_user.inc"/>
|
||||
<Caret Line="186" Column="16" TopLine="167"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="..\httpd-2.0\apr\apr.pas"/>
|
||||
<Caret Line="36" Column="9" TopLine="21"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="..\httpd-2.0\httpd.pas"/>
|
||||
<Caret Line="34" Column="9" TopLine="19"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="..\httpd-1.3\win32_os.inc"/>
|
||||
<Caret Line="190" Column="19" TopLine="161"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="..\httpd-1.3\readdir.inc"/>
|
||||
<Caret Line="72" Column="19" TopLine="43"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<PathDelim Value="\"/>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Options>
|
||||
<ExecutableType Value="Library"/>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
||||
|
6
packages/base/httpd/httpd-1.3/ap_alloc.inc
vendored
6
packages/base/httpd/httpd-1.3/ap_alloc.inc
vendored
@ -36,9 +36,9 @@
|
||||
}
|
||||
|
||||
{ Need declaration of DIR on Win32 }
|
||||
{$ifdef WIN32}
|
||||
//#include "readdir.h"
|
||||
{$endif}
|
||||
{.$ifdef Windows}
|
||||
{$include readdir.inc}
|
||||
{.$endif}
|
||||
|
||||
type
|
||||
pool = record end;
|
||||
|
2
packages/base/httpd/httpd-1.3/ap_config.inc
vendored
2
packages/base/httpd/httpd-1.3/ap_config.inc
vendored
@ -895,7 +895,7 @@ typedef int rlim_t;
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
{$else}{$if defined(WIN32)}
|
||||
{$else}{$if defined(WINDOWS)}
|
||||
|
||||
{ All windows stuff is now in os/win32/os.h }
|
||||
|
||||
|
8
packages/base/httpd/httpd-1.3/buff.inc
vendored
8
packages/base/httpd/httpd-1.3/buff.inc
vendored
@ -79,7 +79,7 @@ type
|
||||
{ could also put pointers to the basic I/O routines here }
|
||||
fd: cint; { the file descriptor }
|
||||
fd_in: cint; { input file descriptor, if different }
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
hFH: HANDLE; { Windows filehandle }
|
||||
{$endif}
|
||||
|
||||
@ -117,7 +117,7 @@ function ap_bcreate(p: PPool; flags: cint): PBUFF;
|
||||
procedure ap_bpushfd(fb: PBUFF; fd_in, fd_out: cint);
|
||||
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
|
||||
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
|
||||
procedure ap_bpushh(fb: PBUFF; hFH: HANDLE);
|
||||
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
|
||||
@ -185,7 +185,7 @@ API_EXPORT(int) ap_bfilbuf(BUFF *fb);
|
||||
|
||||
type
|
||||
child_info = record
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
{
|
||||
* These handles are used by ap_call_exec to call
|
||||
* create process with pipe handles.
|
||||
@ -224,7 +224,7 @@ function ap_bfileno(fb: PBUFF; direction: cint): cint;
|
||||
procedure ap_bhalfduplex(fb: PBUFF);
|
||||
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
|
||||
|
||||
{$if defined(WIN32) or defined(NETWARE) or defined(CYGWIN_WINSOCK)}
|
||||
{$if defined(WINDOWS) or defined(NETWARE) or defined(CYGWIN_WINSOCK)}
|
||||
|
||||
{ ap_recvwithtimeout/ap_sendwithtimeout socket primitives for WinSock }
|
||||
//API_EXPORT(int) ap_sendwithtimeout(int sock, const char *buf, int len, int flags);
|
||||
|
4
packages/base/httpd/httpd-1.3/hsregex.inc
vendored
4
packages/base/httpd/httpd-1.3/hsregex.inc
vendored
@ -21,7 +21,9 @@
|
||||
type
|
||||
regoff_t = Integer;
|
||||
|
||||
// off_t = regoff_t;
|
||||
{$ifdef windows}
|
||||
off_t = regoff_t;
|
||||
{$endif}
|
||||
|
||||
Pregex_t = ^regex_t;
|
||||
|
||||
|
4
packages/base/httpd/httpd-1.3/http_core.inc
vendored
4
packages/base/httpd/httpd-1.3/http_core.inc
vendored
@ -143,7 +143,7 @@ API_EXPORT(const char *) ap_auth_nonce (request_rec *);
|
||||
API_EXPORT(int) ap_satisfies (request_rec *r);
|
||||
API_EXPORT(const array_header *) ap_requires (request_rec *); }
|
||||
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
{
|
||||
* CGI Script stuff for Win32...
|
||||
}
|
||||
@ -327,7 +327,7 @@ type
|
||||
sec: Parray_header;
|
||||
r: Pregex_t;
|
||||
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
{ Where to find interpreter to run scripts }
|
||||
script_interpreter_source: interpreter_source_e;
|
||||
{$endif}
|
||||
|
2
packages/base/httpd/httpd-1.3/http_log.inc
vendored
2
packages/base/httpd/httpd-1.3/http_log.inc
vendored
@ -44,7 +44,7 @@
|
||||
{$endif}
|
||||
|
||||
APLOG_NOERRNO = (APLOG_LEVELMASK + 1);
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
{ Set to indicate that error msg should come from Win32's GetLastError(),
|
||||
* not errno. }
|
||||
APLOG_WIN32ERROR = ((APLOG_LEVELMASK + 1) * 2);
|
||||
|
10
packages/base/httpd/httpd-1.3/httpd.inc
vendored
10
packages/base/httpd/httpd-1.3/httpd.inc
vendored
@ -106,7 +106,7 @@ const
|
||||
DEFAULT_GROUP = '#-1';
|
||||
|
||||
{$ifndef DEFAULT_ERRORLOG}
|
||||
{$if defined(OS2) or defined(WIN32)}
|
||||
{$if defined(OS2) or defined(WINDOWS)}
|
||||
DEFAULT_ERRORLOG = 'logs/error.log';
|
||||
{$else}
|
||||
DEFAULT_ERRORLOG = 'logs/error_log';
|
||||
@ -172,7 +172,7 @@ const
|
||||
|
||||
{ The path to the shell interpreter, for parsed docs }
|
||||
|
||||
{$if defined(OS2) or defined(WIN32)}
|
||||
{$if defined(OS2) or defined(WINDOWS)}
|
||||
{ Set default for OS/2 and Windows file system }
|
||||
SHELL_PATH = 'CMD.EXE';
|
||||
{$else}
|
||||
@ -233,7 +233,7 @@ const
|
||||
* the overhead.
|
||||
}
|
||||
{$ifndef HARD_SERVER_LIMIT}
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
HARD_SERVER_LIMIT = 1024;
|
||||
{$else}{$if defined(NETWARE)}
|
||||
HARD_SERVER_LIMIT = 2048;
|
||||
@ -1033,7 +1033,7 @@ API_EXPORT(char *) ap_pbase64encode(pool *p, char *string);
|
||||
API_EXPORT(char *) ap_uudecode(pool *p, const char *bufcoded);
|
||||
API_EXPORT(char *) ap_uuencode(pool *p, char *string); }
|
||||
|
||||
{$if defined(OS2) or defined(WIN32)}
|
||||
{$if defined(OS2) or defined(WINDOWS)}
|
||||
//API_EXPORT(char *) ap_double_quotes(pool *p, const char *str);
|
||||
//API_EXPORT(char *) ap_caret_escape_args(pool *p, const char *str);
|
||||
{$endif}
|
||||
@ -1129,7 +1129,7 @@ procedure ap_chdir_file(const file_: PChar);
|
||||
#define ap_os_systemcase_filename(p,f) (f)}
|
||||
{$else}
|
||||
//API_EXPORT(char *) ap_os_canonical_filename(pool *p, const char *file);
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
//API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, const char *szFile);
|
||||
//API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, const char *szFile);
|
||||
{$else}{$ifdef OS2}
|
||||
|
150
packages/base/httpd/httpd-1.3/readdir.inc
vendored
150
packages/base/httpd/httpd-1.3/readdir.inc
vendored
@ -1,73 +1,77 @@
|
||||
{ Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
}
|
||||
|
||||
{
|
||||
* Structures and types used to implement opendir/readdir/closedir
|
||||
* on Windows 95/NT.
|
||||
}
|
||||
|
||||
{$ifdef WIN32}
|
||||
|
||||
{#include <io.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef API_EXPORT
|
||||
# define API_EXPORT(type) __declspec(dllexport) type __stdcall
|
||||
#endif}
|
||||
|
||||
{ struct dirent - same as Unix }
|
||||
type
|
||||
dirent = record
|
||||
d_ino: clong; { inode (always 1 in WIN32) }
|
||||
d_off: off_t; { offset to this dirent }
|
||||
d_reclen: cushort; { length of d_name }
|
||||
d_name: array[_MAX_FNAME+1] of Char; { filename (null terminated) }
|
||||
end;
|
||||
|
||||
{ typedef DIR - not the same as Unix }
|
||||
DIR = record
|
||||
handle: clong; { _findfirst/_findnext handle }
|
||||
offset: cshort; { offset into directory }
|
||||
finished: cshort; { 1 if there are not more files }
|
||||
// struct _finddata_t fileinfo; { from _findfirst/_findnext }
|
||||
fileinfo: Pointer; { from _findfirst/_findnext }
|
||||
dir: PChar; { the dir we are reading }
|
||||
dent: dirent; { the dirent to return }
|
||||
end;
|
||||
|
||||
PDIR = ^DIR;
|
||||
|
||||
{ Function prototypes }
|
||||
{API_EXPORT(DIR *) opendir(const char *);
|
||||
API_EXPORT(struct dirent *) readdir(DIR *);
|
||||
API_EXPORT(int) closedir(DIR *);}
|
||||
|
||||
va_list = Pointer;
|
||||
|
||||
{
|
||||
* Simplified declarations for other platforms
|
||||
}
|
||||
|
||||
{$else}
|
||||
|
||||
PDIR = Pointer;
|
||||
|
||||
va_list = Pointer;
|
||||
|
||||
{$endif} { WIN32 }
|
||||
|
||||
{ Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
}
|
||||
|
||||
{
|
||||
* Structures and types used to implement opendir/readdir/closedir
|
||||
* on Windows 95/NT.
|
||||
}
|
||||
|
||||
{$ifdef WINDOWS}
|
||||
|
||||
{#include <io.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef API_EXPORT
|
||||
# define API_EXPORT(type) __declspec(dllexport) type __stdcall
|
||||
#endif}
|
||||
|
||||
{ struct dirent - same as Unix }
|
||||
|
||||
const
|
||||
_MAX_FNAME = 256;
|
||||
|
||||
type
|
||||
dirent = record
|
||||
d_ino: clong; { inode (always 1 in WIN32) }
|
||||
d_off: off_t; { offset to this dirent }
|
||||
d_reclen: cushort; { length of d_name }
|
||||
d_name: array[0.._MAX_FNAME] of Char; { filename (null terminated) }
|
||||
end;
|
||||
|
||||
{ typedef DIR - not the same as Unix }
|
||||
DIR = record
|
||||
handle: clong; { _findfirst/_findnext handle }
|
||||
offset: cshort; { offset into directory }
|
||||
finished: cshort; { 1 if there are not more files }
|
||||
// struct _finddata_t fileinfo; { from _findfirst/_findnext }
|
||||
fileinfo: Pointer; { from _findfirst/_findnext }
|
||||
dir: PChar; { the dir we are reading }
|
||||
dent: dirent; { the dirent to return }
|
||||
end;
|
||||
|
||||
PDIR = ^DIR;
|
||||
|
||||
{ Function prototypes }
|
||||
{API_EXPORT(DIR *) opendir(const char *);
|
||||
API_EXPORT(struct dirent *) readdir(DIR *);
|
||||
API_EXPORT(int) closedir(DIR *);}
|
||||
|
||||
va_list = Pointer;
|
||||
|
||||
{
|
||||
* Simplified declarations for other platforms
|
||||
}
|
||||
|
||||
{$else}
|
||||
|
||||
PDIR = Pointer;
|
||||
|
||||
va_list = Pointer;
|
||||
|
||||
{$endif} { WINDOWS }
|
||||
|
||||
|
4
packages/base/httpd/httpd-1.3/win32_os.inc
vendored
4
packages/base/httpd/httpd-1.3/win32_os.inc
vendored
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
}
|
||||
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
|
||||
{
|
||||
* Compile the server including all the Windows NT 4.0 header files by
|
||||
@ -187,5 +187,5 @@ API_EXPORT(const char *) ap_os_dso_error(void);}
|
||||
|
||||
//#define gettid() ((tid_t)GetCurrentThreadId())
|
||||
|
||||
{$endif} { WIN32 }
|
||||
{$endif} { WINDOWS }
|
||||
|
||||
|
@ -131,7 +131,7 @@ type
|
||||
}
|
||||
invoked: PChar;
|
||||
{$endif}
|
||||
{$if defined(WIN32) or defined(DOXYGEN)}
|
||||
{$if defined(WINDOWS) or defined(DOXYGEN)}
|
||||
{ (Win32 only) Creator's handle granting access to the process
|
||||
* @remark This handle is closed and reset to NULL in every case
|
||||
* corresponding to a waitpid() on Unix which returns the exit status.
|
||||
|
@ -32,7 +32,7 @@
|
||||
* Structure for determining user ownership.
|
||||
}
|
||||
type
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
apr_uid_t = PSID;
|
||||
{$else}
|
||||
apr_uid_t = uid_t;
|
||||
@ -43,7 +43,7 @@ type
|
||||
{
|
||||
* Structure for determining group ownership.
|
||||
}
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
apr_gid_t = PSID;
|
||||
{$else}
|
||||
apr_gid_t = gid_t;
|
||||
@ -128,7 +128,7 @@ function apr_uid_homepath_get(dirname: PPChar; const username: PChar;
|
||||
* APR_EMISMATCH if not, APR_BADARG if an apr_uid_t is invalid.
|
||||
* @remark This function is available only if APR_HAS_USER is defined.
|
||||
}
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
//APR_DECLARE(apr_status_t) apr_uid_compare(apr_uid_t left, apr_uid_t right);
|
||||
|
||||
{ @deprecated @see apr_uid_compare }
|
||||
@ -183,7 +183,7 @@ function apr_gid_get(groupid: Papr_gid_t; const groupname: PChar;
|
||||
* APR_EMISMATCH if not, APR_BADARG if an apr_gid_t is invalid.
|
||||
* @remark This function is available only if APR_HAS_USER is defined.
|
||||
}
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
//APR_DECLARE(apr_status_t) apr_gid_compare(apr_gid_t left, apr_gid_t right);
|
||||
{ @deprecated @see apr_gid_compare }
|
||||
//APR_DECLARE(apr_status_t) apr_compare_groups(apr_gid_t left, apr_gid_t right);
|
||||
|
@ -119,7 +119,7 @@ type
|
||||
}
|
||||
apr_fileperms_t = apr_int32_t;
|
||||
|
||||
{$if defined(WIN32) or defined(NETWARE)}
|
||||
{$if defined(WINDOWS) or defined(NETWARE)}
|
||||
{
|
||||
* Structure for determining the inode of the file.
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ type
|
||||
}
|
||||
invoked: PChar;
|
||||
{$endif}
|
||||
{$if defined(WIN32) or defined(DOXYGEN)}
|
||||
{$if defined(WINDOWS) or defined(DOXYGEN)}
|
||||
{ (Win32 only) Creator's handle granting access to the process
|
||||
* @remark This handle is closed and reset to NULL in every case
|
||||
* corresponding to a waitpid() on Unix which returns the exit status.
|
||||
|
@ -32,7 +32,7 @@
|
||||
* Structure for determining user ownership.
|
||||
}
|
||||
type
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
apr_uid_t = PSID;
|
||||
{$else}
|
||||
apr_uid_t = uid_t;
|
||||
@ -43,7 +43,7 @@ type
|
||||
{
|
||||
* Structure for determining group ownership.
|
||||
}
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
apr_gid_t = PSID;
|
||||
{$else}
|
||||
apr_gid_t = gid_t;
|
||||
@ -112,7 +112,7 @@ function apr_uid_homepath_get(dirname: PPChar; const username: PChar;
|
||||
* APR_EMISMATCH if not, APR_BADARG if an apr_uid_t is invalid.
|
||||
* @remark This function is available only if APR_HAS_USER is defined.
|
||||
}
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
//APR_DECLARE(apr_status_t) apr_uid_compare(apr_uid_t left, apr_uid_t right);
|
||||
|
||||
{$else}
|
||||
@ -151,7 +151,7 @@ function apr_gid_get(groupid: Papr_gid_t; const groupname: PChar;
|
||||
* APR_EMISMATCH if not, APR_BADARG if an apr_gid_t is invalid.
|
||||
* @remark This function is available only if APR_HAS_USER is defined.
|
||||
}
|
||||
{$ifdef WIN32}
|
||||
{$ifdef WINDOWS}
|
||||
//APR_DECLARE(apr_status_t) apr_gid_compare(apr_gid_t left, apr_gid_t right);
|
||||
{$else}
|
||||
//#define apr_gid_compare(left,right) (((left) == (right)) ? APR_SUCCESS : APR_EMISMATCH)
|
||||
|
Loading…
Reference in New Issue
Block a user