It appears there is a bad check when setting up the
pread (and pwrite) callback:

#if defined(USE_PREAD) || defined(SQLITE_ENABLE_LOCKING_STYLE)
   { "pread",        (sqlite3_syscall_ptr)pread,      0  },
#else
   { "pread",        (sqlite3_syscall_ptr)0,          0  },
#endif


SQLite forces SQLITE_ENABLE_LOCKING_STYLE to _always_ be defined:

#if !defined(SQLITE_ENABLE_LOCKING_STYLE)
#  if defined(__APPLE__)
#    define SQLITE_ENABLE_LOCKING_STYLE 1
#  else
#    define SQLITE_ENABLE_LOCKING_STYLE 0
#  endif
#endif


So locking style is defined as '0', so I'm thinking the check
_should_ have been:

#if defined(USE_PREAD) || SQLITE_ENABLE_LOCKING_STYLE


There are 2 other instances of checks for
   defined(SQLITE_ENABLE_LOCKING_STYLE)
that should also be changed in the code.

If you want, I can provide a patch against trunk to fix the build
issue.  I've currently, though, only modified the amalgamation 3.7.6.1
build in my local repo.

Thanks.
-Brad

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

Reply via email to