Am 07.06.2019 um 15:34 schrieb Dan Kennedy:
On 7/6/62 20:23, Ulrich Telle wrote:
When I append the source code of the SHA3 extension (shathree.c from
ext/misc directory) to the SQLite3 amalgamation (sqlite3.c), and then
try to
compile it for Android, I get the following error message:
shathree.c:83:7: error: expected identifier or '('
u64 B0, B1, B2, B3, B4;
^
../toolchains/llvm/prebuilt/windows/sysroot/usr/include\asm-generic/termbits.h
:118:12: note:
expanded from macro 'B0'
#define B0 0000000
Are you using up to date source code? It looks like this was fixed back
in 2017:
https://sqlite.org/src/info/3ec7371161
*Ouch*. I simply missed this change and didn't update to the latest
version of shathree.c. Thanks!
Sorry for the noise on this list.
Regards,
Ulrich
As far as I can tell header file termbits.h is pulled in as a side
effect of
including <sys/ioctl.h> (which is one of the "standard include files"
used in
sqlite3.c).
As a workaround I could add a preprocessor check
#ifdef B0
#undef B0
#endif
in front of the source code in shathree.c. However, I would prefer a
general
solution.
Would it be possible for the SQLite developers to adjust the variable
names
used in the extension shathree.c to avoid this name clash with the
macro in
termbits.h? Or what else would be the recommended method to handle this
issue?
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users