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@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to