[fpc-devel] Strange things with the apache header files on Linux
ABorka
fpc-devel at aborka.com
Thu Oct 2 04:27:21 CEST 2008
When copying the files from httpd22 dir to my project directory and
recompiling them with my project the record sizes are OK and same as the
C compiled apache module.
Yet, the apache module compiled with FPC/Lazarus is not working. The
hooked DefaultHandler function is never called, just an empty web page
is returned. Everything works under Windows, but not on Linux.
ABorka wrote:
> On Linux (Ubuntu 8.04), latest SVN, in fpc/packages/httpd22/...
>
> in httpd.inc inside request_rec:
> { body byte count, for easy access }
> bytes_sent: apr_off_t;
> { Last modified time of the requested resource }
> mtime: apr_time_t;
>
> in apr.pas :
> apr_off_t = Int64;
> apr_int64_t = Int64;
>
> in apr_time.inc :
> apr_time_t = apr_int64_t;
>
> Using an example apache module compiled with FPC/Lazarus (the
> initialization part is executed when apache loads):
> sizeof(apr_int64_t) gives 4
> sizeof(apr_off_t) gives 4
> sizeof(apr_time_t) gives 8
> sizeof(request_rec.bytes_sent) gives 4
> sizeof(request_rec.mtime) gives 8
>
> Shouldn't all be 8 bytes? Or am I missing something?
> And why apr_time_t is the correct 8 if the others are 4?
>
> One of the reasons that the C compiled apache modules have 412 bytes
> (correctly) in "request_rec" instead of the 384 bytes (incorrectly) in
> the FPC compiled ones is that sizeof(apr_off_t) is 4 instead of 8.
> This might be the reason that apache modules are not working on Linux
> compiled with FPC/lazarus, unless I'm way off track...
>
> Any thoughts?
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
More information about the fpc-devel
mailing list