[fpc-pascal] freepascal and apache

Alexey Voytsehovich ironwit at gmail.com
Wed Oct 7 09:19:44 CEST 2009


Hello Michael,

Wednesday, October 7, 2009, 10:13:08 AM, you wrote:


> On the command-line, define one of FPCAPACHE_2_0 or FPCAPACHE_2_2 (as in -dFPCAPACHE_2_0)
> (or delete the units in units/httpd-1.3)

build string
fpc -dFPCAPACHE_2_2 mod_hello.pp
all unit code
--

library mod_hello;
{$ifdef fpc}
  {$mode objfpc}{$H+}
{$endif}

{$IFDEF WIN32}
  {$DEFINE WINDOWS}
{$ENDIF}

{$define Apache2_2}
{$define FPCAPACHE_2_2}

uses SysUtils, httpd;

function read_Post(r: Prequest_rec; data: string): boolean;
var
  types: string;
begin
  Result := True;
  if (r^.method_number <> M_POST) then
    Exit;
  ap_set_content_type(r, 'text/html');
  types := ap_table_get(r^.headers_in, 'Content-Type');
end;

begin
end.

--

mod_hello.pp(23,24) Error: Identifier not found "ap_table_get"

-- 
Best regards,
 Alexey Voytsehovich                            mailto:ironwit at gmail.com




More information about the fpc-pascal mailing list