On Wed, Jun 25, 2003 at 11:22:58AM -0400, Tom Lane wrote:
> I see a couple other warnings when building on HPUX, but all are in ecpg:

The problem is that I do not have access to HP-UX. All my development
and testing is done on Linux right now. And on my Debian system I get no
warning at all.

> gcc -O1 -Wall -Wmissing-prototypes -Wmissing-declarations -g -fpic 
> -I../../../../src/interfaces/ecpg/include -I../../../../src/include/utils 
> -I../../../../src/include -D_XOPEN_SOURCE_EXTENDED  -g  -c -o datetime.o datetime.c
> datetime.c: In function `PGTYPESdate_fmt_asc':
> datetime.c:240: warning: implicit declaration of function `snprintf'

This is strange. According to my man page snprintf is declared in
stdio.h which indeed is included. Where does HP-UX declare snprintf?

> This happens because the ecpg versions of these files ignore the
> Postgres convention that everything should include postgres.h or
> postgres_fe.h first.  I have been planning to bug Michael about why that
> is; I think it will create a bunch of portability gotchas beyond this
> one.  (Our code associated with 64-bit-offset file I/O, in particular,
> is known to break on some platforms when this rule is violated.)

pgtypes is supposed to live alone and outside of postgresql. I just
checked and found one file including postgres_fe.h. I will change this
as it does not really need to include it.

This would be different if we found a way to use pgtypes from the
backend instead of implementing the stuff twice. But I'm still not sure
how high the performance penalty will be.

As for yylineno, it is used in ecpg, yes. Does anyone know how to get
rid of it and still get the correct line number?

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM: michaelmeskes, Jabber: [EMAIL PROTECTED]
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to