Re: [fpc-devel] Strange things with the apache header files on Linux

2008-10-02 Thread Marco van de Voort
In our previous episode, ABorka said:
 On Linux (Ubuntu 8.04), latest SVN, in fpc/packages/httpd22/...

If you use 2.2.3 branch, I had a feeling I had seen something like this
before and found bug 11460, so I merged the fixes for bug 11460 from 2.3.1
to 2.2.1

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Strange things with the apache header files on Linux

2008-10-02 Thread ABorka
I am using the latest checkout for both fpc and lazarus (well, 2 or 3 
days old checkout now).
Bug 11460 only fixes the apr_off_t to be int64 which is already in the 
checked out code. It does not fix the problem currently for apache 
modules. Compiled apache modules are not working (example programs 
included in the fcl package directory httpd22/examples)
The record length for module_struct and request_rec are the same for the 
fpc compiled apache module and a C compiled module, still the fpc 
compiled one does not work.


Marco van de Voort wrote:

In our previous episode, ABorka said:

On Linux (Ubuntu 8.04), latest SVN, in fpc/packages/httpd22/...


If you use 2.2.3 branch, I had a feeling I had seen something like this
before and found bug 11460, so I merged the fixes for bug 11460 from 2.3.1
to 2.2.1

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] Strange things with the apache header files on Linux

2008-10-01 Thread ABorka

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


Re: [fpc-devel] Strange things with the apache header files on Linux

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



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel