How to check if HAVE_USLEEP is activated?
Hi, I get some "database is locked" errors from Python and following https://beets.io/blog/sqlite-nightmare.html, I would like to check if HAVE_USLEEP is activated. How can I do it reliably?
"PRAGMA compile_options;" doesn't seem to do it.
I also tried to look at the Makefile generated from "./configure" but it doesn't show the "HAVE_USLEEP" flag.
Have a look at config.h
Does that work? IIRC config.h is created on the system where the amalgamation is created - that is not always the machine where the amalgamation or the shell are compiled and linked. So ... one might have USLEEP and the other might not.
In my humble opinion, any development that needs this kind of detail should not use the amalgamation, but rather a checkout of a clone of the SQLite repository.
That said, config.h can be safely removed, and recreated by running ./configure, which will fill in the platform specific details.
make sqlite.c will build the amalgamation again.
Besides, keeping a clone of the repository up to date instead of downloading the amalgamation for every release is network friendly.
Autoconf-based projects avoid installing
config.h by default on purpose. It's a thorny issue, solvable, but not without effort.