Re: BUG #4549: ecpg produces code that don't compile

From: "Clemens A(dot) Fischer" <clemens(dot)fischer(at)mbs-software(dot)de>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Clemens Fischer <cfi(at)mbs-software(dot)de>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4549: ecpg produces code that don't compile
Date: 2008-11-26 13:56:33
Message-ID: 1227707793.3280.7.camel@linux2-cfi.dhcp.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hallo Michael,

thanks for the patch, but ...
compiling ecpg fails:
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-fno-strict-aliasing -Wno-error -I../include
-I../../../../src/interfaces/ecpg/include -I. -DMAJOR_VERSION=4
-DMINOR_VERSION=4 -DPATCHLEVEL=1 -I../../../../src/include -D_GNU_SOURCE
-I/opt/include -c -o type.o type.c
type.c: In function `ECPGdump_a_simple':
type.c:356: warning: implicit declaration of function `strchrnul'
type.c:356: invalid type argument of `unary *'
make: *** [type.o] Error 1

Is it possible to expand 'strchrnul' to
if(var_name != NULL) *(strchr( ...
or something like that?

Clemens

Am Mittwoch, den 26.11.2008, 14:20 +0100 schrieb Michael Meskes:
> On Tue, Nov 25, 2008 at 10:44:32AM +0000, Clemens Fischer wrote:
> > Using ecpg and gcc generates the following output:
> > ecpg -t -o ecpgtest-multidim.c ecpgtest-multidim.pgc
> > cc -c -I/usr/local/pgsql/include ecpgtest-multidim.c
> > ecpgtest-multidim.pgc: In function `main':
> > ecpgtest-multidim.pgc:30: parse error before `_13'
> > cc: /usr/qnx630/host/qnx6/x86/usr/lib/gcc-lib/ntox86/2.95.3/cc1 error 33
> > make: *** [ecpgtest-multidim.o] Error 1
>
> Thanks for reporting. Fixed in CVS HEAD and 8.3.
>
> Patch is attached, it was just a small oversight that happened when the new
> varchar naming was introduced.
>
> Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Clemens A. Fischer 2008-11-26 14:02:24 Re: BUG #4550: ecpg problem with copy command and hostvar
Previous Message Michael Meskes 2008-11-26 13:49:48 Re: BUG #4550: ecpg problem with copy command and hostvar