You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1998/03/13 20:23:10 UTC

cvs commit: apache-1.3/src/main http_config.c (fwd)

Here's one that I fixed recently.  This looks well used enough to me.

Incidentally, nobody commented on my _NONSTD observation.  It would be
nice to fix all the _NONSTD exports because I really don't think they're
required in many cases.

Dean

---------- Forwarded message ----------
Date: 21 Feb 1998 11:08:31 -0000
From: dgaudet@hyperreal.org
To: apache-1.3-cvs@hyperreal.org
Subject: cvs commit: apache-1.3/src/main http_config.c
Reply-To: new-httpd@apache.org

dgaudet     98/02/21 03:08:31

  Modified:    src/main http_config.c
  Log:
  The prototype of set_file_slot already includes API_EXPORT_NONSTD... fix
  the declaration.
  
  BTW, I think _NONSTD is only required for functions which have variable
  length parameter lists.  i.e. bputs and rputs... but *not* vbprintf since
  that has a fixed parameter list.
  
  Revision  Changes    Path
  1.97      +1 -1      apache-1.3/src/main/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_config.c,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- http_config.c	1998/02/06 18:19:56	1.96
  +++ http_config.c	1998/02/21 11:08:30	1.97
  @@ -920,7 +920,7 @@
       return NULL;
   }
   
  -const char *set_file_slot(cmd_parms *cmd, char *struct_ptr, char *arg)
  +API_EXPORT_NONSTD(const char *) set_file_slot(cmd_parms *cmd, char *struct_ptr, char *arg)
   {
       /* Prepend server_root to relative arg.
          This allows .htaccess to be independent of server_root,
  
  
  


Re: cvs commit: apache-1.3/src/main http_config.c (fwd)

Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
> 
> On Fri, 13 Mar 1998, Ben Laurie wrote:
> 
> > BTW, since you are the performance freak you'll want to know this:
> > __stdcall is supposed to be slightly faster than C calling and also
> > takes less code.
> 
> Depends on which rev of which processor you're using too ;)  I believe the
> reason for this difference is that __stdcall is "callee pops" meaning the
> called function pops its arguments when done, which you can't do with C
> calling because the called function has no clue how many args it has in
> general (i.e. varargs).

You got it.

> > > Cool.  Stuff that in a .h file somehwere ;)
> >
> > I'll try to remember. Any suggestions which one?
> 
> Wherever API_EXPORT and API_EXPORT_NONSTD are defined.

That's the trouble; they're OS dependent. So they're defined in more
than one place. What I need is CVS SSI ;->

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: cvs commit: apache-1.3/src/main http_config.c (fwd)

Posted by Dean Gaudet <dg...@arctic.org>.

On Fri, 13 Mar 1998, Ben Laurie wrote:

> BTW, since you are the performance freak you'll want to know this:
> __stdcall is supposed to be slightly faster than C calling and also
> takes less code.

Depends on which rev of which processor you're using too ;)  I believe the
reason for this difference is that __stdcall is "callee pops" meaning the
called function pops its arguments when done, which you can't do with C
calling because the called function has no clue how many args it has in
general (i.e. varargs). 

> > Cool.  Stuff that in a .h file somehwere ;)
> 
> I'll try to remember. Any suggestions which one?

Wherever API_EXPORT and API_EXPORT_NONSTD are defined.

Dean


Re: cvs commit: apache-1.3/src/main http_config.c (fwd)

Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
> 
> On Fri, 13 Mar 1998, Ben Laurie wrote:
> 
> > Dean Gaudet wrote:
> > >
> > > Here's one that I fixed recently.  This looks well used enough to me.
> > >
> > > Incidentally, nobody commented on my _NONSTD observation.  It would be
> > > nice to fix all the _NONSTD exports because I really don't think they're
> > > required in many cases.
> >
> > Oh right - yeah, they're only needed on varargs _OR_ functions that have
> > their addresses handed around and may be either exported or local. If
> > you see what I mean. That's one of the things I had to fix recently to
> > make Windoze compile.
> 
> Ahhh... I see.  That makes sense -- _NONSTD gives the function C calling
> conventions, which is what you'd need to be stuffed into a command_rec or
> handler_rec.  (because the function casts for those indirect calls assume
> C calling conventions)

Zackly. In fact this one was used as a cleanup function(!)

BTW, since you are the performance freak you'll want to know this:
__stdcall is supposed to be slightly faster than C calling and also
takes less code.

> Cool.  Stuff that in a .h file somehwere ;)

I'll try to remember. Any suggestions which one?

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: cvs commit: apache-1.3/src/main http_config.c (fwd)

Posted by Ben Laurie <be...@algroup.co.uk>.
Alexei Kosut wrote:
> 
> On Fri, 13 Mar 1998, Dean Gaudet wrote:
> 
> > > Oh right - yeah, they're only needed on varargs _OR_ functions that have
> > > their addresses handed around and may be either exported or local. If
> > > you see what I mean. That's one of the things I had to fix recently to
> > > make Windoze compile.
> >
> > Ahhh... I see.  That makes sense -- _NONSTD gives the function C calling
> > conventions, which is what you'd need to be stuffed into a command_rec or
> > handler_rec.  (because the function casts for those indirect calls assume
> > C calling conventions)
> 
> Actually, _NONSTD doesn't need to be used for varags. VC++ automatically
> ignores __stdcall for varags functions. Although it is correct to
> explicitly not use the keyword, it's not neccessary. *shrug*

How strange. Not like us to do something that is correct but not
necessary. :-)

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: cvs commit: apache-1.3/src/main http_config.c (fwd)

Posted by Alexei Kosut <ak...@leland.Stanford.EDU>.
On Fri, 13 Mar 1998, Dean Gaudet wrote:

> > Oh right - yeah, they're only needed on varargs _OR_ functions that have
> > their addresses handed around and may be either exported or local. If
> > you see what I mean. That's one of the things I had to fix recently to
> > make Windoze compile.
> 
> Ahhh... I see.  That makes sense -- _NONSTD gives the function C calling
> conventions, which is what you'd need to be stuffed into a command_rec or
> handler_rec.  (because the function casts for those indirect calls assume
> C calling conventions)

Actually, _NONSTD doesn't need to be used for varags. VC++ automatically
ignores __stdcall for varags functions. Although it is correct to
explicitly not use the keyword, it's not neccessary. *shrug*

> Cool.  Stuff that in a .h file somehwere ;)

-- Alexei Kosut <ak...@stanford.edu> <http://www.stanford.edu/~akosut/>
   Stanford University, Class of 2001 * Apache <http://www.apache.org> *



Re: cvs commit: apache-1.3/src/main http_config.c (fwd)

Posted by Dean Gaudet <dg...@arctic.org>.
On Fri, 13 Mar 1998, Ben Laurie wrote:

> Dean Gaudet wrote:
> > 
> > Here's one that I fixed recently.  This looks well used enough to me.
> > 
> > Incidentally, nobody commented on my _NONSTD observation.  It would be
> > nice to fix all the _NONSTD exports because I really don't think they're
> > required in many cases.
> 
> Oh right - yeah, they're only needed on varargs _OR_ functions that have
> their addresses handed around and may be either exported or local. If
> you see what I mean. That's one of the things I had to fix recently to
> make Windoze compile.

Ahhh... I see.  That makes sense -- _NONSTD gives the function C calling
conventions, which is what you'd need to be stuffed into a command_rec or
handler_rec.  (because the function casts for those indirect calls assume
C calling conventions)

Cool.  Stuff that in a .h file somehwere ;)

Dean


Re: cvs commit: apache-1.3/src/main http_config.c (fwd)

Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
> 
> Here's one that I fixed recently.  This looks well used enough to me.
> 
> Incidentally, nobody commented on my _NONSTD observation.  It would be
> nice to fix all the _NONSTD exports because I really don't think they're
> required in many cases.

Oh right - yeah, they're only needed on varargs _OR_ functions that have
their addresses handed around and may be either exported or local. If
you see what I mean. That's one of the things I had to fix recently to
make Windoze compile.

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache