Exclude statements inside C header files
If the IBM®
Informix® ESQL/C preprocessor
has problems with certain statements in C header files, you can exclude
specific lines from the preprocessing that the Informix
ESQL/C preprocessor
performs as shown in the following example.
Figure 1. ESQL/C and C excerpt that uses
a common C header file
/*header file i.h*/
#ifndef ESBDS /*define empty macros, if included by a C\
source*/
#define ESBDS
#define ESEDS
#endif
⋮
ESEDS
statement that you do not want ESQL/C preprocessor to see
ESBDS
/*name.ec*/
#define ESBDS “EXEC SQL BEGIN DECLARE SECTION;”
#define ESEDS “EXEC SQL END DECLARE SECTION”
main ()
{...
EXEC SQL BEGIN DECLARE SECTION;
#include “i.h”
EXEC SQL END DECLARE SECTION;
⋮
}