ecpg test
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:/# gmakeFirst 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@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachments:
/bjm/difftext/plainDownload+5-4
Import Notes
Reply to msg id not found: 008001c3d774$ba991a80$c53da8c0@home