[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: Ben Reser <ben_at_reser.org>
Date: Sat, 23 Mar 2013 18:39:00 -0700

On Sat, Mar 23, 2013 at 4:00 PM, Mattias Engdegård
<mattiase_at_bredband.net> wrote:
> sqlite3.c (from the amalgamation) cannot in general be compiled with
> -std=c89, which the Subversion build universally uses in trunk. How do we
> make an exception for a single file, to have it compiled with a different
> set of flags?
> On OS X, sqlite3.c includes a system header file, <libkern/OSAtomic.h>,
> which at least on this system cannot be compiled with gcc -std=c89 because
> it uses constructs that are not permitted in pure C89. The reasons for using
> -std=c89 for the rest of the code are understood but clearly do not extend
> to sqlite.
> Not finding an obvious and easy solution, I gave up and am now patching the
> Makefiles after generating them. I would be happy if someone could direct me
> to a proper solution.

I build trunk on OS X at least once a day with sqlite-amalgamation and
it builds fine for me. It throws a bunch of warnings but I don't
think the warnings have anything to do with -std=c89. What errors or
problems are you seeing? What compiler are you using? What config
options are you using? What version of sqlite3 are using? What
version of OS X?

Also at least for me:
 gcc -std=c89 /usr/include/libkern/OSAtomic.h -o /dev/null

Doesn't produce any errors.
Received on 2013-03-24 02:39:36 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.