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

Re: sqlite3.c won't compile with -std=c89

From: Mattias Engdegård <mattiase_at_bredband.net>
Date: Mon, 25 Mar 2013 23:03:23 +0100

25 mar 2013 kl. 05.42 skrev Branko ÄŒibej:

> I'm not too happy with this patch because the hack is not restricted
> to only those versions of OS X that actually need it. It's not
> needed, to my knowledge, at least since 10.6; the latest version
> of that header uses __inline rather than inline, which apparently
> all recent Apple compilers support (and, AFAIK, gcc has supported
> since before OS X existed).

That is unlikely to be a problem, since the headers would only be
affected if they used inline, but if they did they would get in
trouble with -std=c89, which according to you they don't - QED.
However, I'm happy to oblige; new patch attached.

[[[
Work around a problem on older OS X systems: sqlite3.c includes
<libkern/OSAtomic.h>, which uses 'inline' and thus cannot be compiled
with -std=c89 that we are using for all files.

* subversion/libsvn_subr/sqlite3wrapper.c
   (toplevel): Define 'inline' as '__inline__' (which gcc accepts even
in c89
    mode) during a pre-emptive inclusion of <libkern/OSAtomic.h>.
* subversion/tests/libsvn_wc/wc-queries-test.c
   (toplevel): Likewise.
]]]

Received on 2013-03-25 23:04:00 CET

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.