httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apache-2.0/src/include http_core.h
Date Wed, 28 Jun 2000 11:19:55 GMT
Call me dense, but I don't see what you mean.

I see API_EXPORT stuff applied to the hook API functions. But the typedef
(HOOK_##name) has no calling convention information. Since it doesn't, I
would presume the the calling convention to be "standard". Therefore, we
should be able to pass an API_EXPORT function into things like
ap_hook_translate_name().

Cheers,
-g

On Wed, Jun 28, 2000 at 05:41:34AM -0500, William A. Rowe, Jr. wrote:
> Greg... diff 1.18 to 1.20 of ap_hooks.h, I think you will see in
> code why this isn't a simple question.
> 
> Bill
> 
> > -----Original Message-----
> > From: Greg Stein [mailto:gstein@lyra.org]
> > Sent: Wednesday, June 28, 2000 3:23 AM
> > To: new-httpd@apache.org
> > Subject: Re: cvs commit: apache-2.0/src/include http_core.h
> > 
> > 
> > On Wed, Jun 28, 2000 at 02:53:46AM -0500, William A. Rowe, Jr. wrote:
> > > > From: Greg Stein [mailto:gstein@lyra.org]
> > > > Sent: Wednesday, June 28, 2000 12:24 AM
> > > > 
> > > > This change is incorrect. ap_core_translate() is called by
> > > > mod_mmap_static.c. Therefore, it must be exported.
> > > > 
> > > > Please put the EXPORT back in. And why does this need to 
> > be NONSTD? It
> > > > doesn't have varargs, and the hook declaration macro doesn't 
> > > > declare as NONSTD.
> > > 
> > > Ahem... yes, it declares as nothing, nada, no linkage spec 
> > whatsoever.
> > > Crack the macro.  Since EXPORT is __stdcall, and EXPORT_NONSTD is 
> > > __cdecl, well, there you have it, the code was broken.
> > 
> > Ah! I see. AP_DECLARE_HOOK needs to have some kind of calling 
> > convention
> > shoved into its typedef for the hook function.
> > (I was mistakenly looking at the API_EXPORT() for the other funcs)
> > 
> > > The export will be in in a few minutes, as NONSTD, and will 
> > compile :)
> > 
> > Hmm. Do we build as cdecl by default or something? Is that 
> > why you must
> > declare it NONSTD? So that the function matches the typedef's 
> > function?
> > 
> > > Ya know... submitted a patch for this exact problem a few 
> > months back.
> > > oh well.  Sorry to break it, and apologize, since we don't see 
> > > mod_mmap_static yet on Win32, we wouldn't have caught that. 
> >  Of course
> > > that's one of the odd things I'm hoping to jump on (mmap that is.)
> > 
> > It's all right. It was probably me that broke the Windows 
> > compile. I changed
> > ap_core_translate just the other day from _NONSTD to plain 
> > API_EXPORT(). I
> > figured "hey, there aren't any varargs, no reason for _NONSTD".
> > 
> > I'm still not clear on why it must be NONSTD. Is there 
> > something we can do
> > to the typedef? I'd like to see a simple rule of "if it has 
> > varargs, it is
> > NONSTD; otherwise, plain." Without that rule, it is too 
> > non-deterministic
> > and you get breakage like what I did...
> > 
> > Cheers,
> > -g
> > 
> > -- 
> > Greg Stein, http://www.lyra.org/
> > 

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message