httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: Naming conflicts
Date Sat, 07 Feb 1998 20:27:38 GMT
Marc Slemko wrote:
> 
> On Sat, 7 Feb 1998, Rodent of Unusual Size wrote:
> 
> > Ralf S. Engelschall wrote:
> > >
> > > In article <9802061638.AA08450@gensym1.gensym.com> you wrote:
> > >
> > > > Could we add a line in conf.h.
> > > >     #include <hide.h>
> > > > Then add that file:
> > >
> > > >[...]
> > > > #define make_array apache_make_array /* libgsi conflicts */
> > >
> > > +1 for the idea, because the same approach Perl already uses with its
> > > .../CORE/embed.h file.  They generate it automatically, so we can do this the
> > > same way. How about a little script which generates such a hide.h file? This
> > > would reduce namespace conflicts in general and we avoid problems with the
> > > various 3rd party modules and libraries someone wants to link to Apache.
> >
> > Maybe I'm not awake yet, but how does this work without going back
> > to the definition of the original identifier and modifying the source?
> > AFAIK, locating the definition of a function in order to rename it
> > requires sentient participation..
> 
> You can redefine function names.
> 
> eg:
> 
> marcs@alive:/tmp$ cat foo.c
> #define mysub yoursub
> 
> void mysub() {
> }
> 
> int main () {
>         mysub();
> }
> marcs@alive:/tmp$ make foo
> cc -O  foo.c  -o foo
> marcs@alive:/tmp$ nm foo | grep sub
> 00001610 T _yoursub

Not only can you, but we already do. Unless someone removed it, that is.
Forget which function, but I did this ages ago.

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 |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Mime
View raw message