> -----Original Message-----
> From: MARTIN PHILIP [mailto:codematters_at_ntlworld.com] On Behalf Of
> Philip Martin
> Sent: donderdag 21 maart 2013 09:38
> To: Julian Foad
> Cc: Branko Čibej; dev_at_subversion.apache.org
> Subject: Re: svn commit: r1459058 - in /subversion/trunk/subversion:
> include/private/svn_dep_compat.h include/private/svn_subr_private.h
> libsvn_ra_serf/serf.c libsvn_subr/hash.c libsvn_wc/adm_ops.c svn/notify.c
> Julian Foad <julianfoad_at_btopenworld.com> writes:
> > Philip Martin wrote:
> >> I see similar warning for svn_dbg__preamble, svn_dbg__printf,
> >> svn_dbg__print_props, svn_error__locate, svn_error__trace when
> >> without -DSVN_DEBUG.
> >> The dbg stuff is declared in private/svn_debug.h so I think we could
> >> make the dbg definitions conditional as well.
> > +1 -- sounds sane to me.
> r880483 did that but it was reverted in r880505. It seems that on
> Windows these have to be defined all the time.
> >> The error stuff probably needs to always be built since a 3rd party
> >> using our headers with -DSVN_DEBUG will generate references to the
> >> functions. We should arrange for the prototype to be visible when
> >> compiling error.c
> > +1. Move their declarations outside the '#ifdef' blocks that
> > currently enclose them, in svn_error.h?
> I was thinking of defining SVN_ERR__TRACING in error.c so that the
> prototypes are always visible there. I might see if I can do something
> similar to make the svn_dbg_ prototypes visible in debug.c.
All files that we add to the .def files (using our python based extractor code) must be available as public symbols when linking as shared libraries.
APR and several other projects solve this by using __declspec(dllexport) instead of .def files, so the linker decides what should be public and not... but we decided not to a long time ago.
There is an exception list for functions that we hide somewhere and with some trickery we could enable different versions for debug and release mode.
Received on 2013-03-21 18:11:21 CET