From: | Olleg <olleg(at)telecom(dot)mipt(dot)ru> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Conflicts with autoconf macroses |
Date: | 2003-12-03 07:57:05 |
Message-ID: | 3FCD9751.8010505@telecom.mipt.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
SuSE Linux 8.2 (i586)
PostgreSQL REL7_4_STABLE (cvs), 7.4
compiled with:
gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux)
flex version 2.5.4
bison (GNU Bison) 1.875
PostgreSQL config.status 7.4
configured by ./configure, generated by GNU Autoconf 2.53,
with options "'--prefix=/opt/pgsql' '--enable-integer-datetimes'
'--enable-thread-safety' '--disable-largefile' '--with-java'
'--with-pam' '--with-openss' '--with-gnu-ld'"
I develop postgresql module and use autoconf to perform some check and
configure. When I try to compile with PostgreSQL 7.4 I get ugly messages
like:
../config.h:56:1: warning: "PACKAGE_VERSION" redefined
In file included from /opt/pgsql/include/server/c.h:53,
from /opt/pgsql/include/server/postgres.h:48,
from pgat.h:8,
from pgat1.c:3:
/opt/pgsql/include/server/pg_config.h:571:1: warning: this is the
location of the previous definition
It's bug, autoconf headers may not be included in "library headers".
Workaround:
#include <postgres.h>
/* Undefine conflict macroses from pg_config.h included in postgres.h
and our config.h
*/
#undef PACKAGE_VERSION
#undef PACKAGE_TARNAME
#undef PACKAGE_STRING
#undef PACKAGE_NAME
#undef PACKAGE_BUGREPORT
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
--
Olleg
From | Date | Subject | |
---|---|---|---|
Next Message | Olleg | 2003-12-03 07:57:25 | Autocomit off in psql don't work |
Previous Message | Tom Lane | 2003-12-03 04:52:02 | Re: Setting time zone commands |