Re: ESQLC Function Prototypes for 5.00/5.02
Posted in 1994
>From ilist@rmy.emory.edu Fri Apr 8 18:07:51 1994 >From: kenm@vcd.hp.com (Ken Miles) >Message-Id: <CnyJz1.Env@vcd.hp.com> >Subject: ESQLC Function Prototypes for 5.00/5.02 >Date: Fri, 8 Apr 1994 20:37:48 GMT >Organization: Hewlett-Packard VCD >Sender: informix-list-owner@rmy.emory.edu >To: informix-list@rmy.emory.edu >X-Informix-List-To: eu-informix-distr@inflon.informix.com >X-Informix-List-Id: <news.6212> > > >The attached is a version of the function prototype definitions for ESQLC >on 5.00 that Jonathan has posted in the past. We have been using this >successfully to compile both with cc in ANSI mode and with the CC >compiler on an HP9000/700. >Jonathan or others at Informix, are you watching? Of course. >Now we are about to move to 5.02 UC1. My question is: Are there any >changes in the prototype definitions for 5.02? Has anyone used Jonathan's >prototype definitions on 5.01 or 5.02? Good question. One aspect which has to be worried about is _iqlocate_cursor(); it is now defined in $INFORMIXDIR/incl/esql/sqlhdr.h and interferes with any prototyped definition in the headers I supplied. You'll probably want to modify the distributed sqlhdr.h to comment out the declaration. I have just used GCC (with no special arguments) to compile my reference program, and apart from running foul of _iqlocate_cursor() in a big way, there are also some places where const is needed, and two places where I think we have a bug in the generated C code. Two revised prototypes (const added): extern int _iqcddcl(_SQCURSOR *cursor, const char *curname, _SQCURSOR *stmt, int flags); extern int _iqslct(_SQCURSOR *cursor, const char **cmdtxt, int icnt, struct sqlvar_struct *ibind, int ocnt, struct sqlvar_struct *obind, int chkind); I get incorrect (char *)0 instead of (struct sqlvar_struct *)0) for the 4th argument of _iqslct() from the following select statement: $ SELECT T.Tabid INTO $tabid FROM "informix".Systables T WHERE T.Tabid = 1; I also get incorrect (char *)0 for (struct sqlda *)0 in arg 2 and (char *)0 for (struct value *values)0 in arg 4 of the call to _iqexecute() for the following statement: $ EXECUTE s_statement; There's not much I can do about these. I have not fully covered the functionality of the product, so there are probably a few other changes of a similar nature required. 6.00 ESQL/C comes with prototypes. Hooray! Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>