From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Nikola Milutinovic <Nikola(dot)Milutinovic(at)ev(dot)co(dot)yu> |
Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | ecpg test |
Date: | 2004-01-13 01:31:18 |
Message-ID: | 200401130131.i0D1VIr12928@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Nikola Milutinovic wrote:
> > Oh, glad you asked! Compile/run interfaces/ecpg/test/test_thread.pgc.
>
> Just tried this:
>
> Legba:/# cd /home/r/root/build/postgresql-7.4.1/src/interfaces/ecpg/test
> Legba:/# gmake
>
> First it failed complaining on "bad object format in ../pgtypeslib".
> Aparently, the linker dislikes a space in "-L ../pgtypeslib". Deleting that
> space made the compile go through. The in failed on test3.cpg:
>
> ../preproc/ecpg -I./../include test3.pgc
> MM: birthinfo
> cc -std -O -ieee -I./../include -I../../../../src/interfaces/libpq -I../../
> ../../src/include -pthread -c -o test3.o test3.c
> cc: Error: test3.pgc, line 71: In this statement, "ind_married" and "0" may
> not be compared with a relational operator.
> if (ind_married >= 0)
> --------------------^
>
> I've looked into the code. "ind_married" is defined as "int
> *ind_married=NULL". It really cannot be compared this way and I have a
> feeling it was not the intention.
Yes, that test is clearly wrong because ind_married is an int *. I
think the test should be :
*ind_married >= 0
and have applied the following patch to fix it. I also added an include
required for malloc() on my system.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 2.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Patrick Samson | 2004-01-14 09:40:24 | pltcl - cannot create 'normal' interpreter - Tcl_CreateSlave() fails - A solution |
Previous Message | Kris Jurka | 2004-01-12 18:32:16 | COPY allows parameters which corrupt output |