Re: ecpg compile error on AIX
От
Michael Meskes
Тема
Re: ecpg compile error on AIX
Дата
Msg-id
20020108142239.GE6735@feivel.fam-meskes.de
Ответ на
Re: ecpg compile error on AIX (Tom Lane)
Список
Дерево обсуждения
ecpg compile error on AIX Tatsuo Ishii <t-ishii@sra.co.jp>
Re: ecpg compile error on AIX Tom Lane <tgl@sss.pgh.pa.us>
Re: ecpg compile error on AIX Bruce Momjian <pgman@candle.pha.pa.us>
Re: ecpg compile error on AIX Peter Eisentraut <peter_e@gmx.net>
Re: ecpg compile error on AIX Bruce Momjian <pgman@candle.pha.pa.us>
Re: ecpg compile error on AIX Tom Lane <tgl@sss.pgh.pa.us>
Re: ecpg compile error on AIX Peter Eisentraut <peter_e@gmx.net>
Re: ecpg compile error on AIX Tom Lane <tgl@sss.pgh.pa.us>
Re: ecpg compile error on AIX Tom Lane <tgl@sss.pgh.pa.us>
Re: ecpg compile error on AIX Bruce Momjian <pgman@candle.pha.pa.us>
Re: ecpg compile error on AIX Michael Meskes <meskes@postgresql.org>
Re: ecpg compile error on AIX Michael Meskes <meskes@postgresql.org>
Re: ecpg compile error on AIX Tom Lane <tgl@sss.pgh.pa.us>
Re: ecpg compile error on AIX Michael Meskes <meskes@postgresql.org>
On Mon, Jan 07, 2002 at 12:40:07PM -0500, Tom Lane wrote: > ind_offset is already a sizeof() measure, isn't it? > I would guess that what you want is > > > *((long long int *) ((char *)ind + ind_offset*act_tuple)) = variable->len; > > since ind_offset*act_tuple is a number expressed in bytes, and should > not be scaled up by sizeof(long long int). Yes, you're right of course. I should have thought more before typing. > Also, if the code works for you at all, it's because GCC is (in > violation of the ANSI C standard) interpreting the construct as > addition to char* rather than addition to void*. Casting to anything > other than char* will change the behavior. That's what I was afraid of and why I asked for some testing on other archs. Right now I only have access to Intel based Linux. > (Might be a lot easier just to declare ind as char* instead of void* > in the first place...) Did that. My test cases all work well. Please test on HP, AIX or whatever. Michael -- Michael Meskes Michael@Fam-Meskes.De Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!
В списке pgsql-hackers по дате отправления