X
首页 数据库相关软件开发 red hat linux 9.0版本下informix esql编译报错解决
red hat linux 9.0版本下informix esql编译报错解决
We used a brute force approach. Make the following code into a .c file,
and include it in your program. At the start of main(), catll ctSetup()....

 

linux 9.0版本下informix esql编译报错解决:

We used a brute force approach. Make the following code into a .c file,
and include it in your program. At the start of main(), catll ctSetup().

Make sure you compile statically or else the dynamic loader will cause
problems.(此处强调编译时必须使用esql -static参数)

I've seen others use macros, but this worked good enough for us...


#include


__const unsigned short int *__ctype_b;
__const __int32_t *__ctype_tolower;
__const __int32_t *__ctype_toupper;


void ctSetup()
{
__ctype_b = *(__ctype_b_loc());
__ctype_toupper = *(__ctype_toupper_loc());
__ctype_tolower = *(__ctype_tolower_loc());
}