Re: Informix ESQL/C SQLDA-structure problem
Posted in 1991
Path: emory!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!hplabs!nsc!pyramid!infmx!markj From: markj@informix.com (Mark Jeske(Chicago Consultan)t) Newsgroups: comp.databases Keywords: INFORMIX DYNAMIC ESQL/C Message-ID: <1991Jul2.150323.5748@informix.com> Date: 2 Jul 91 15:03:23 GMT References: <1991Jun26.121056.19420@nntp.hut.fi> <344@devnull.mpd.tandem.com> <1991Jul1.151629.3175@visionware.co.uk> Sender: news@informix.com (Usenet News) Organization: Informix Software, Inc. In article <1991Jul1.151629.3175@visionware.co.uk> chris@visionware.co.uk (Chris Davies) writes: >In article <1991Jun26.121056.19420@nntp.hut.fi> vwa@cs.hut.fi writes: >>When storing integer information in the sqlda-structure >> sqlda->sqlvar[i].sqldata = malloc (SIZINT) > >In article <344@devnull.mpd.tandem.com> lance@mpd.tandem.com (Lance >Hartmann) writes: >>Remember that a malloc() doesn't force any kind of boundary alignment. > >From the AT&T SVID (System V definition), "The function <malloc> >returns a pointer... suitably aligned for any use". > >From the SunOS manual page, "malloc() returns a pointer to a block... >which is appropriately aligned" (Currently I don't have access to true >BSD). > >However, it is important still to use rtypalign() and force the types >to be those for C rather than for internal Informix use. To keep your code portable use rtypalign(). You may not need it on some machines, but why worry? mark