A conflicting scenario in header file sqltypes.h of Timesten and Informix

Oracle is usually used as the phisycal database when TimesTen is working as in-memory database, because the data synchronization is very easy by using cache connect in such situation. But we have to use informix acting as the physical database in some projects and we encountered problems just at the compilation stage.

 

In our product, the database access component which is based on esql includes the header file $INFORMIXDIR/incl/esql/sqltypes.h, and the component for accessing TimesTen is ODBC-oriented and includes the header file $TIMESTEN_HOME/include/sqltypes.h.

 

These two files are identical in file name but not in content. What's more, there are some identical macro names which differ either in data type or value.  For example, SQLCHAR is one of the macros defined as follows:

 

//definition in Informix

#define SQLCHAR         0

 

//definition in TT

typedef unsigned char           UCHAR;
typedef UCHAR     SQLCHAR;

 

 

These components are compiled in a big project with the above two header file directories included by -I option. So errors will occur in the compilation process. 

If the directory of Informix is included prior to that of TT, errors occur when compiling the component for TT, and vice versa.

 

The solution is to change the directory inclusion sequence according to which component is compiling.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值