Hi,
These patchs correct the cmd_func type in http_config.inc :
- 2.2-http_config.inc.diff for apache 2.2
- 2.0-http_config.inc.diff for apache 2.0
Thanks

Mailing lists / fpc-devel / 2007-10
16 messages · 5 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi,
These patchs correct the cmd_func type in http_config.inc :
- 2.2-http_config.inc.diff for apache 2.2
- 2.0-http_config.inc.diff for apache 2.0
Thanks
hi,
I am traveling without my computer. I should check and apply when I come back, which means saturday.
thanks,
Ok, have a nice journey ;-)
2007/10/25, Felipe Monteiro de Carvalho :
These patchs correct the cmd_func type in http_config.inc : - 2.2-http_config.inc.diff…
From: "Inoussa OUEDRAOGO"
After your patch a warning appeared when compiling httpd-2.2:
http_config.inc(135,3) Warning: cdecl'ared functions have no high
parameterPlease take a look on it.
Yury.
Ok, have a nice journey ;-) 2007/10/25, Felipe Monteiro de Carvalho : Inoussa O.
Thanks, applied on trunk.
Maybe it could be added to 2.2.2? What are the exact requirements for 2.2.2? And how can one merge revisions into 2.2.2?
thanks,
From: "Inoussa OUEDRAOGO" After your patch a warning appeared when compiling httpd-2.2:…
Yury Sidorov wroteAfter your patch a warning appeared when compiling httpd-2.2: http_config.inc(135,3) Warning: cdecl'ared functions have no high parameter
I just built it with fpc 2.3 and I see no warning ... strange
From: "Felipe Monteiro de Carvalho"
Probably you have warning turned off. I get the following:
Free Pascal Compiler version 2.3.1 [2007/11/01] for i386 Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Win32 for i386
Compiling httpd.pas
http_config.inc(134,3) Warning: cdecl'ared functions have no high parameter
httpd.pas(158,32) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
httpd.pas(165,28) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
9395 lines compiled, 0.2 sec
3 warning(s) issued
Yury.
From: "Inoussa OUEDRAOGO" After your patch a warning appeared when compiling httpd-2.2:…
After your patch a warning appeared when compiling httpd-2.2: http_config.inc(135,3) Warning: cdecl'ared functions have no high parameter
I manage to get a code snipet that produces the warning, I do not known how to suppress this
warning. Here is the code ( I compile with this command fpc -vw C:\tmp\b.pas )
<code>
{$mode objfpc}{$H+}
program test_var_args;
type TFunc = function (argc: Integer; const argv: array of PChar):
PChar; cdecl;
begin
end.
</code>More importantly then supressing it, which I consider something unimportant, would be knowing what it means, and if there is some kind of potential problem it indicates that we are overlooking.
I manage to get a code snipet that produces the warning, I do not known how to suppress…
You can't get rid of that warning, and it should actually even be worded more strongly. It is simply not possible to access C-style varargs parameters at the callee side in FPC (you may be able to hak using pointers which will work on some platforms, but it will crash and burn in most cases).
Jonas
This is the c prototype ( type ) translated, actualy it is a array of PCHAR.
<code taken from apache source>
const char *(*take_argv) (cmd_parms *parms, void *mconfig,
int argc, char *const argv[]);</code>
Is the following translation valid ?
take_argv_t = function (parms: Pcmd_parms; mconfig: Pointer; argc:
cint; argv: array of PChar): PChar; cdecl;I think it's better to do this:
take_argv_t = function (parms: Pcmd_parms; mconfig: Pointer;
argc:cint; argv: PPChar): PChar; cdecl;You can still index it as an array in FPC, but it's clearer what the actual type is that gets passed (an "array of pchar" is the same as a double pointer to char in C). I was indeed wrong about the varargs stuff I said earlier, for some reason I had read "array of pchar" as "array of const".
Jonas
Ok, Thanks.
By the way, h2pas should also be corrected, because it translates <code langage=c>
void f(int a, char* p[]);
</code>to
<code langage=pascal>
procedure f(a:longint; p:array of pchar);cdecl;external;
</code>More importantly then supressing it, which I consider something unimportant, would be…
More importantly then supressing it, which I consider something unimportant, would be knowing what it means, and if there is some kind of potential problem it indicates that we are overlooking.
Agree, clarified by Jonas's response .
By the way, have you been able to make a module on ( Linux + Apache 2.2.x ) ? I tried on
- Ubuntu + Apache 2.2.3/2.2.4
- Fedora + Apache 2.2.4
without succes. Even worse, in the handler proc, r^.handler ( used to test if this request
should be handled by the current module ) always holds some weird string,for a very basic
module. On windows it does work.
Ok, Thanks. By the way, h2pas should also be corrected, because it translates <code…
Please file a bug report with examples, so that it doesn't get forgotten.
done : http://www.freepascal.org/mantis/view.php?id=10156
2007/11/12, Marco van de Voort :