You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Peter Samuelson <pe...@p12n.org> on 2012/11/30 03:52:24 UTC

Re: svn commit: r1415451 [1/9] - in /subversion/branches/fsfs-format7/subversion/libsvn_fs_fs: fs.c fs_fs.c fs_fs.h low_level.c low_level.h rep-cache.c revprops.c revprops.h util.c util.h

[stefan2@apache.org]
> * subversion/libsvn_fs_fs/util.h
>   (RECOVERABLE_RETRY_COUNT,
    [...]
>    move_into_place): lib-locally declare functions previously
>    private in fs_fs.c

This is a problem - on many OSes[*], all global functions and variables
that are not 'static', i.e., anything not file-scoped, are exported and
available to third parties from the shared library.  We don't want to
export something like move_into_place() or read_content(), even if we
don't declare it in a header file.  This is what the fs_fs__ prefix,
with double underscore, is for.

Peter

[*] On ELF platforms such as Linux, it is generally possible to have a
    symbol private to a library but not file-scoped, but I'm pretty
    sure we don't use this ability.  On other non-ELF Unix platforms,
    this may not be possible at all.  On Windows, I guess symbols are
    always exported explicitly to a DLL.

Re: svn commit: r1415451 [1/9] - in /subversion/branches/fsfs-format7/subversion/libsvn_fs_fs: fs.c fs_fs.c fs_fs.h low_level.c low_level.h rep-cache.c revprops.c revprops.h util.c util.h

Posted by Stefan Fuhrmann <st...@wandisco.com>.
On Fri, Nov 30, 2012 at 3:52 AM, Peter Samuelson <pe...@p12n.org> wrote:

>
> [stefan2@apache.org]
> > * subversion/libsvn_fs_fs/util.h
> >   (RECOVERABLE_RETRY_COUNT,
>     [...]
> >    move_into_place): lib-locally declare functions previously
> >    private in fs_fs.c
>
> This is a problem - on many OSes[*], all global functions and variables
> that are not 'static', i.e., anything not file-scoped, are exported and
> available to third parties from the shared library.  We don't want to
> export something like move_into_place() or read_content(), even if we
> don't declare it in a header file.  This is what the fs_fs__ prefix,
> with double underscore, is for.
>

Thanks for the feedback. Refactoring fs_fs.c has only
about started. Once I managed to untangle most of it,
new interfaces (e.g. similar to svn_fs_fs__dag_*) will
be introduced.

Since that will take a while and is a preparation for the
format7 changes, I do all that work on the same dev branch.

-- Stefan^2.

-- 
Certified & Supported Apache Subversion Downloads:
*

http://www.wandisco.com/subversion/download
*