Informix EC program compatible issues from UNIX to Redhat transplantation

xiaoxiao2021-03-06  40

surroundings:

HPunix11

Redhet Linux E3

Informix 9.4

Informix Client SDK 2.81 UC3

Compiling errors occur when transplanting the code on UNIX in the above environment:

Undefined reference to _ctype_bundefined reference to _ctype_toupperundefined Reference to _ctype_tolower

This is due to the incompatibility of the Redhat Linux and the high version of the Informix ESQLC library file. To resolve this problem, name the following code "LinuxPatch.c", including the file in the code to be transplanted, and call in the main function The CTSETUP function can be compiled.

#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 ());