diff --git a/httpd/httpd_2_0/apr/apr.pas b/httpd/httpd_2_0/apr/apr.pas index dc67ecb0d..9814784f1 100644 --- a/httpd/httpd_2_0/apr/apr.pas +++ b/httpd/httpd_2_0/apr/apr.pas @@ -41,6 +41,8 @@ interface {$PACKRECORDS C} {$endif} +{$define Apache2_0} + uses {$ifdef WINDOWS} Windows, winsock, diff --git a/httpd/httpd_2_0/apr/apr_poll.inc b/httpd/httpd_2_0/apr/apr_poll.inc index 8f4fbac4f..3af63c300 100644 --- a/httpd/httpd_2_0/apr/apr_poll.inc +++ b/httpd/httpd_2_0/apr/apr_poll.inc @@ -108,7 +108,7 @@ function apr_poll_setup(new_poll: PPapr_pollfd_t; num: apr_int32_t; function apr_poll(aprset: Papr_pollfd_t; numsock: apr_int32_t; nsds: Papr_int32_t; timeout: apr_interval_time_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_poll' + LibSuff16; + external LibAPR name LibNamePrefix + 'apr_poll' + LibSuff20; { * Add a socket to the poll structure. @@ -255,5 +255,5 @@ function apr_pollset_remove(pollset: Papr_pollset_t; function apr_pollset_poll(pollset: Papr_pollset_t; timeout: apr_interval_time_t; num: Papr_int32_t; const descriptors: PPapr_pollfd_t): apr_status_t; {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} - external LibAPR name LibNamePrefix + 'apr_pollset_poll' + LibSuff16; + external LibAPR name LibNamePrefix + 'apr_pollset_poll' + LibSuff20; diff --git a/httpd/httpd_2_0/httpd.pas b/httpd/httpd_2_0/httpd.pas index acb94d47a..50ede9581 100644 --- a/httpd/httpd_2_0/httpd.pas +++ b/httpd/httpd_2_0/httpd.pas @@ -39,6 +39,8 @@ unit httpd; {$PACKRECORDS C} {$endif} +{$define Apache2_0} + interface uses diff --git a/httpd/httpd_2_2/httpd.pas b/httpd/httpd_2_2/httpd.pas index 08dd9291e..fb269ea1e 100644 --- a/httpd/httpd_2_2/httpd.pas +++ b/httpd/httpd_2_2/httpd.pas @@ -39,6 +39,8 @@ unit httpd; {$PACKRECORDS C} {$endif} +{$define Apache2_2} + interface uses diff --git a/httpd/mod_hello.lpi b/httpd/mod_hello.lpi index 3ba33b37c..fdb4be189 100644 --- a/httpd/mod_hello.lpi +++ b/httpd/mod_hello.lpi @@ -7,7 +7,7 @@ - + @@ -41,15 +41,15 @@ - + - + - + @@ -97,11 +97,10 @@ - - - - + + + @@ -112,9 +111,9 @@ - - - + + + @@ -329,11 +328,9 @@ - - - + + - @@ -355,20 +352,16 @@ - + - - - + - - @@ -386,11 +379,9 @@ - - - + + - @@ -464,11 +455,9 @@ - + - - @@ -550,11 +539,9 @@ - + - - @@ -570,19 +557,15 @@ - + - - - + - - @@ -640,11 +623,9 @@ - + - - @@ -672,20 +653,16 @@ - + - - - + - - @@ -701,11 +678,9 @@ - + - - @@ -713,60 +688,54 @@ + + + + + + + + + + + + + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - diff --git a/httpd/mod_hello.lpr b/httpd/mod_hello.lpr index d238086a0..371c48f8a 100644 --- a/httpd/mod_hello.lpr +++ b/httpd/mod_hello.lpr @@ -17,11 +17,10 @@ library mod_hello; {$define Apache2_0} -uses SysUtils, httpd {$ifndef Apache1_3}, apr{$endif}; +uses SysUtils, httpd, {$ifndef Apache1_3} apr{$endif}; var test_module: module; {$ifdef Unix} public name 'test_module'; {$endif} - default_module_ptr: Pmodule; const MODULE_NAME = 'mod_hello.so'; @@ -58,7 +57,7 @@ begin { We set the content type before doing anything else } {$ifdef Apache1_3} r^.content_type := 'text/html'; -// ap_send_http_header(r); + ap_send_http_header(r); {$else} ap_set_content_type(r, 'text/html'); {$endif} @@ -82,7 +81,7 @@ begin ap_rputs('' + LineEnding ,r); ap_rputs('

Hello world

' + LineEnding, r); ap_rputs('This is the first Apache Module working with the new binding from Free Pascal' + LineEnding, r); -// ap_rprintf(r, '
A sample line generated by ap_rprintf
' + LineEnding, []); + ap_rprintf(r, '
A sample line generated by ap_rprintf
' + LineEnding, []); ap_rputs('' + LineEnding, r); { We can either return OK or DECLINED at this point. If we return @@ -118,8 +117,7 @@ end; * Library initialization code *******************************************************************} begin - default_module_ptr := @test_module; - FillChar(default_module_ptr^, SizeOf(default_module_ptr^), 0); + FillChar(test_module, SizeOf(test_module), 0); {$ifdef apache1_3} STANDARD_MODULE_STUFF(test_module);