On Sat, Mar 23, 2013 at 4:00 PM, Mattias Engdegård <matti...@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.