httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject Re: cvs commit: apache-2.0/src/include http_core.h
Date Wed, 28 Jun 2000 08:23:29 GMT
On Wed, Jun 28, 2000 at 02:53:46AM -0500, William A. Rowe, Jr. wrote:
> > From: Greg Stein []
> > 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...


Greg Stein,

View raw message