[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] non static libs on windows (dll)

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-03-20 03:24:40 CET

On Wed, Mar 19, 2003 at 12:24:26PM +0100, SteveKing wrote:
> Hi,
>
> To use subversion as a dll and not as a statically linked library
> some code changes needed to be made which are included in
> this patch. For *NIX there is no change at all.

Funny that you should send this. I was thinking about it on the drive into
work today :-)

There are a couple problems with the approach in your patch, however:

* each library needs its own set of macros so that libsvn_client.dll has the
  correct linkage to functions in libsvn_subr.dll

* I'd prefer to avoid the "stdcall" stuff and just use C calling conventions
  every where. it avoids a lot of questions with "should this be declared
  _NONSTD?"

* I don't think we want a header named "svn.h"; that feels just a bit too
  generic for something like this. Also, given that we'd have a full set of
  macros for each library, the content will get pretty big. I'd suggest
  putting it into svn_types.h, or create svn__linkage.h or svn__declare.h or
  something, and include that from each header.
  (users would never include the header)

All that said, I'd also like to investigate another approach. The DECLARE
style macros are necessary to avoid .def files. However, what if we
automatically generated .def files from the headers? That is, have the
gen-make system create those files for us by analyzing the headers?

If we're smart, we might even be able to figure out a way to generate the
.def files using ordinals rather than just names. ("smart" meaning to keep
the ordinals stable)

It seems that I also recall hearing that ordinals might not be useful any
more; that the runtime linkloader might be fast enough with names that the
ordinal doesn't buy you much any more.

Thoughts?

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 20 03:22:45 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.