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

Re: Proposal: Add #define to show new API element is available

From: Barry Scott <barry_at_barrys-emacs.org>
Date: 2005-04-07 01:41:06 CEST

I'm not a fan of autoconf and its not a solution on windows anyway.

The #define in the svn header would work on all platforms.

Barry

On Apr 4, 2005, at 17:19, kfogel@collab.net wrote:

> Barry Scott <barry@barrys-emacs.org> writes:
>> I've just been adding code to deal with detecting new API functions.
>> I've ended up with code like this:
>>
>> #if (SVN_VER_MAJOR == 1 && SVN_VER_MINOR >= 1) || SVN_VER_MAJOR > 1
>> #define PYSVN_HAS_CLIENT_ADD2
>> #define PYSVN_HAS_CLIENT_EXPORT2
>> #endif
>>
>> #if (SVN_VER_MAJOR == 1 && SVN_VER_MINOR >= 2) || SVN_VER_MAJOR > 1
>> #define PYSVN_HAS_CLIENT_INFO
>> #endif
>>
>> What would have made this all a lot easier is if the feature test
>> macros where
>> defined in the SVN headers.
>>
>> In svn_client.h how about having
>>
>> #define SVN_HAS_CLIENT_ADD2
>>
>> Then code that builds on top of svn can test for features and avoid
>> the version testing code.
>
> It's already possible to test for the presence of an interface
> (autoconf has ways to do this, for example, by attempting to compile a
> small program which calls the interface, and detecting success for
> failure). I think methods like that are the usual way to handle this
> situation.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 7 02:39:55 2005

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