[Mod_ftpd] win32 support for mod_ftpd

Yussef Alkhamrichi yalkhamrichi at hotmail.com
Tue Jan 4 07:05:43 EST 2005


Hi guys,

I've read in the archive that there has been some small tweaking to get the 
mod_ftpd module running on Apache 2.0 for Win32. I'm willing to help with 
testing this 'port'.

First I fetched the latest version from the trunk from the subversion 
repository. Then I've created a VS.NET 2003 C++ project to compile this 
module and then I encountered the following things:

- the PACKAGE_NAME"/"PACKAGE_VERSION string thing doesn't work nicely in 
VC++, this has to be changed (minor item)

- the FTPD_DECLARE(_....) defines include dllimport/dllexport directives, 
the problem is that inside a .c file the definition of a function may not 
have the dllimport directive, my question is: why do we need 
dllimport/export on WIN32, the .so module is linked against the Apache API, 
why the need for extra external hooks?

- I've a problem compiling the following line from ftp_core.c:

AP_OPTIONAL_HOOK(status_hook,status_hook,NULL,NULL,APR_HOOK_MIDDLE);

If I have had a look at the APR headers where I found these defines:

#define AP_OPTIONAL_HOOK(name,fn,pre,succ,order) \
        APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order)

#define APR_OPTIONAL_HOOK(ns,name,pfn,aszPre,aszSucc,nOrder) do { \
  ns##_HOOK_##name##_t *apu__hook = pfn; \
  apr_optional_hook_add(#name,(void (*)(void))apu__hook,aszPre, aszSucc, 
nOrder); \
} while (0)

my C++ is a bit rusty (I've been working in C# a lot last years), but 
shouldn't there be a definition like

int (*ap_HOOK_status_hook_t) (request_rec*,int);

in the ftp_core.c ?

It would be nice to get this great module running on Win32 :)

Grtx,

Yussef

_________________________________________________________________
MSN Search, for accurate results! http://search.msn.nl



More information about the Mod_ftpd mailing list