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

Re: [RFC] Preprocessor flags to target code to a specific API version

From: Dani Church <dchurch_at_cheri.shyou.org>
Date: Sun, 26 Sep 2010 18:42:00 -0400 (EDT)

On Sun, 26 Sep 2010, Daniel Shahaf wrote:

> Greg Stein wrote on Sun, Sep 26, 2010 at 16:01:53 -0400:
>> Wrapping declarations with #if SVN_TARGET_API is a non-starter, I
>> believe. That sounds like it would obfuscate the headers a bit too
>> much. In your original email, you mentioned something about "gcc
>> poison" which made it sound like you could flag certain declarations
>> to gcc as "bad to use".
> What advantages does 'poison' have over, you know, attempting to compile
> an application against an old set of headers?
> gcc -I https://svn.apache.org/repos/asf/subversion/tags/1.4.0/subversion/include/

The advantage is that if you're working on an open-source project for
which the policy is "we want to support any version of libsvn_client from
1.4 onwards", you can make sure that no one submits code that breaks the
policy by associating the codebase itself with the 1.4 API, rather than
having to tell everyone to download the 1.4.0 headers and change their
include path. There are a couple other reasons why I like the idea, but
pinning a project to a given API is the big one.

-Dani Church
Received on 2010-09-27 00:42:39 CEST

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