Hi,

I'm not sure whether it's a problem with my english or the SQLite code.
SQLite in version 2 and 3 knows several macros which defined or not add
or remove certain functionalities to eventually reduce the memory
footprint of the SQLite library.

SQLiteInt.h introduces:
/*
** When building SQLite for embedded systems where memory is scarce,
** you can define one or more of the following macros to omit extra
** features of the library and thus keep the size of the library to
** a minimum.
*/
/* #define SQLITE_OMIT_AUTHORIZATION  1 */
/* #define SQLITE_OMIT_INMEMORYDB     1 */
/* #define SQLITE_OMIT_VACUUM         1 */
/* #define SQLITE_OMIT_DATETIME_FUNCS 1 */
/* #define SQLITE_OMIT_PROGRESS_CALLBACK 1 */

I now look in the implementation. 
auth.c for example reads:
#ifndef SQLITE_OMIT_AUTHORIZATION

date.c reads:
#ifndef SQLITE_OMIT_DATETIME_FUNCS

vacuum.c reads:
#if !defined(SQLITE_OMIT_VACUUM) || SQLITE_OMIT_VACUUM

That according to my understanding means:
I define SQLITE_OMIT_AUTHORIZATION and the auth feature is omitted.
I define SQLITE_OMIT_DATETIME_FUNCS and date and time functions are
omitted.
But what when I define SQLITE_OMIT_VACUUM? If OMIT is _not_ defined the
vacuum code is compiled. Of course!
But why is there an additional test for SQLITE_OMIT_VACUUM?
This is true - so far I understand - if  SQLITE_OMIT_VACUUM is defined
and it's value is one. The value one traditionally means TRUE. That
means I define OMIT TRUE and it's not omitted? That's strange!
Please explain your thoughts and understanding of this code.

Best,
Bernhard

Reply via email to