httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <ad...@rowe-clan.net>
Subject Re: cvs commit: httpd-2.0 CHANGES
Date Thu, 17 May 2001 02:40:29 GMT
From: "Doug MacEachern" <dougm@covalent.net>
Sent: Wednesday, May 16, 2001 4:57 PM


> On Wed, 16 May 2001, Bill Stoddard wrote:
> 
> > This breaks the Windows compile on this line...
> > 
> >     {"Post-Read Request", ap_hook_get_post_read_request},
> > 
> > because the ap_hook_* functions are all declared as standard call but the
> > declaration of hook_get_t presumes the calling convention is non standard.
> > At least I believe this is why the compile fails :-)
> 
> i think this will fix it, but its pretty ugly.  maybe we just need another
> macro for this sort of thing?
> 
> --- modules/generators/mod_info.c       2001/05/15 04:25:15     1.36
> +++ modules/generators/mod_info.c       2001/05/16 21:55:18
> @@ -257,7 +257,11 @@
>      int nOrder;
>  } hook_struct_t;
>  
> -typedef apr_array_header_t * (*hook_get_t)(void);
> +typedef apr_array_header_t * (
> +#ifdef WIN32
> +    _stdcall_
> +#endif
> +    *hook_get_t)(void);

First, APR has fn typedefs for fn's, not fnptrs, so we'd drop the [*]hook_get_t

This has been answered in other modules before.  I'll look shortly.

The bigger issue, look at the cb function.  Are obscure languages that _require_
the stdcall model going to support returning a pointer and manipulating an
apr_array_header_t?

I think not, simply make hook_get callbacks NONSTD

Bill


Mime
View raw message