As of Sqlite 3.2.0, the following code was added (by tool/mkctime.tcl?)

#if SQLITE_INT64_TYPE
  "INT64_TYPE",
#endif

This compiles fine for SQLite, but when we are running this through the
Emscripten compiler (a C compiler that compiles to LLVM), we get the
following error:

-----------------------------
c/sqlite3.c:385:5: error: token is not a valid binary operator in a
preprocessor subexpression
#if SQLITE_INT64_TYPE
^~~~~~~~~~~~~~~~~
:8:32: note: expanded from here
#define SQLITE_INT64_TYPE long long int
~~~~ ^
1 error generated.
-----------------------------

It looks like this should have been written as `#ifdef SQLITE_INT64_TYPE`
instead of `#if SQLITE_INT64_TYPE`. You will notice that later on in the
code, it is indeed written as `#ifdef SQLITE_INT64_TYPE`.
As I mentioned, this does compile correctly with SQLite's default
toolchain, but I'm not sure why, as the error above makes sense to me. I
realize it's not your responsibility to fix bugs that only show up in
alternative C compilers, but it would save us some pre-processing if this
could be fixed in the codebase.

Many thanks,

Taylor
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to