From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | Michael Meskes <meskes(at)postgresql(dot)org>, "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: compile warnings |
Date: | 2003-06-25 15:22:58 |
Message-ID: | 3371.1056554578@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Joe Conway <mail(at)joeconway(dot)com> writes:
> Other than these 4 warnings, I get a clean compile on Red Hat 9 and 8.0
> systems.
I see a couple other warnings when building on HPUX, but all are in ecpg:
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'
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 common.o common.c
common.c: In function `pgtypes_fmt_replace':
common.c:83: warning: implicit declaration of function `snprintf'
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 dt_common.o dt_common.c
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.)
AFAIK the only way to get rid of the flex-related warnings is to not use
yylineno. This seems like a good idea to me (when I got rid of yylineno
in plpgsql's lexer, there were a number of benefits), but I don't have
time to look at it ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2003-06-25 15:30:31 | Re: [GENERAL] Physical Database Configuration |
Previous Message | nolan | 2003-06-25 15:19:42 | Re: Physical Database Configuration |