Linux下OTL 使用long long类型支持数据库的BIGINT

时间:2014-06-18 08:08:31   收藏:0   阅读:546

代码如下:


#define OTL_BIGINT  long long
#define OTL_STR_TO_BIGINT(str,n) { 	n=atoll(str); }

#define OTL_BIGINT_TO_STR(n,str) { 	sprintf(str,"%lld", n); }
#include "otlv4.h"// include the OTL 4.0 header file

从上面可以看出,OTL并没有实际做什么工作,它只是用宏的方式预留了接口,具体的你自己根据操作系统对应的函数实现。上面是Linux里面的实现,Windows下面的是另外的函数,具体自己去查。

Linux下OTL 使用long long类型支持数据库的BIGINT,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!