声明:本SQLite源码剖析系列为刘兴(http://deepfuture.iteye.com/)原创,未经笔者授权,任何人和机构不能转载
/*
** The SQLITE_DEFAULT_MEMSTATUS macro must be defined as either 0 or 1.
** It determines whether or not the features related to
** SQLITE_CONFIG_MEMSTATUS are available by default or not. This value can
** be overridden at runtime using the sqlite3_config() API.
*/
// SQLITE_DEFAULT_MEMSTATUS宏被定义为0或1,在运行时可使
//用sqlite3_config() API修改该值
#if !defined(SQLITE_DEFAULT_MEMSTATUS)
# define SQLITE_DEFAULT_MEMSTATUS 1
#endif
/*
** Exactly one of the following macros must be defined in order to
** specify which memory allocation subsystem to use.
**该宏不一定要被定义,使用SQLITE_SYSTEM_MALLOC标准内存分配系统malloc()还是malloc()的SQLITE_MEMDEBUG调试版本
** SQLITE_SYSTEM_MALLOC // Use normal system malloc()
** SQLITE_MEMDEBUG // Debugging version of system malloc()
**
** (Historical note: There used to be several other options, but we've
** pared it down to just these two.)
**
** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as
** the default.
*/
//SQLITE_SYSTEM_MALLOC和SQLITE_MEMDEBUG不能同时被定义
#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)>1
# error "At most one of the following compile-time configuration options\
is allows: SQLITE_SYSTEM_MALLOC, SQLITE_MEMDEBUG"
#endif
//默认使用SQLITE_SYSTEM_MALLOC标准
#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)==0
# define SQLITE_SYSTEM_MALLOC 1
#endif
/*
** If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the
** sizes of memory allocations below this value where possible.
*/
// SQLITE_MALLOC_SOFT_LIMIT非0,则试图把分配的内存控制在这些值以内
#if !defined(SQLITE_MALLOC_SOFT_LIMIT)
# define SQLITE_MALLOC_SOFT_LIMIT 1024
#endif
/*
** We need to define _XOPEN_SOURCE as follows in order to enable
** recursive mutexes on most Unix systems. But Mac OS X is different.
** The _XOPEN_SOURCE define causes problems for Mac OS X we are told,
** so it is omitted there. See ticket #2673.
**,
** Later we learn that _XOPEN_SOURCE is poorly or incorrectly
** implemented on some systems. So we avoid defining it at all
** if it is already defined or if it is unneeded because we are
** not doing a threadsafe build. Ticket #2681.
**
** See also ticket #2741.
*/
//在大多数UNIX系统中,我们需要定义_XOPEN_SOURCE允许递归互斥
//对于Mac OS X, _XOPEN_SOURCE导致一些问题发生
#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE
# define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */
#endif
/*
** The TCL headers are only needed when compiling the TCL bindings.
**TCL(Tool Command Language)是一种解释执行的脚本语言。具有良好的跨平台特性和**可扩展性,TCL本身是用C语言实现的,可以很方便的通过C语言进行扩充,增加新的**命令,也可以很方便的把TCL解释器嵌入你的程序中。TCL解释器也是公开源代码的。
**当编译TCL绑定时,才需要TCL头文件
*/
//如果需要绑定TCL,则包括tcl.h
#if defined(SQLITE_TCL) || defined(TCLSH)
# include <tcl.h>
#endif
分享到:
相关推荐
sqlite源码分析文档,sqlite源码分析文档,sqlite源码分析文档,sqlite源码分析文档,sqlite源码分析文档,sqlite源码分析文档,
文档包含sqlite源码,源码分析,以及使用教程
SQLite源码精髓,值得学习!!SQLite源码精髓,值得学习!!SQLite源码精髓,值得学习!!
开源数据库源码sqlite 开源数据库sqlite源码 开源数据库sqlite源码
SQLite是一个小型的,支持嵌入式的数据库,C语言开发,架构清晰。适合研究SQLite源码使用。
sqlite源码分析数据库高级教程,包括里面所有的代码
Android 数据库 SQLite 详细文档 以及 源代码
学习sqlite时需要用到的源码,是最新的版本,希望对你有用。
用源码整合sqlite3 odbc + wxsqlite3 编译 用 AES128 加密方式的ODBC驱动程序, 并附带修改sqlite3 db密码工具. 需要自行替换或注册 sqlite3odbc.dll. 稳定通过各种测试.(PB, VC++等)
sqlite源码在自己工程中的应用,可以不依赖于其他安装程序和插件,并且纯C语言具有跨平台的特性。 工程是在Qt下的,不过代码是很简单的Demo。
这是sqlite数据库的源代码,有兴趣的可以看看是怎么实现的 方便大家学习和查阅。。。。。。。。。。。。。。
当使用sqlite3库编写程序时,需要的函数源码。
sqlite3源码,用vs2013打开项目,可以直接编译成库使用,用于访问sqlite数据库
sqlite3 安装 源码 配置 ,./configure, sudo make ,sudo make install
QT操作sqlite数据库源码,包括添加,删除,更新操作
源码调用sqlite3.dll接口API实现SQLite3数据库操作。Tags:sqlite3。
此文件包含免安装sqlite数据库程序,解压即可运行。
这是一个安装中使用sqlite的源码,用面向对象写的,可供参考